Modern Android development: Android Jetpack, Kotlin, and more (Google I/O 2018)

Поділитися
Вставка
  • Опубліковано 9 вер 2024
  • The last couple of years have seen a plethora of new features and patterns for Android developers. But how do developers know when to use existing APIs and features vs. new ones? This session will help developers understand how they all work together and learn what they should use to build solid, modern Android applications.
    Rate this session by signing-in on the I/O website here → goo.gl/TSwGKh
    Watch more Android sessions from I/O '18 here → goo.gl/R9L42F
    See all the sessions from Google I/O '18 here → goo.gl/q1Tr8x
    Subscribe to the Android Developers channel → goo.gl/GEh1ds
    #io18 #GoogleIO #GoogleIO2018

КОМЕНТАРІ • 99

  • @codinginflow
    @codinginflow 6 років тому +25

    The Architecture Components are really fun to work with

    • @2NormalHuman
      @2NormalHuman 5 років тому +1

      haha didn't expect to run into you here. I like your lessons

  • @typingcat
    @typingcat 6 років тому +115

    It is surprising how he has the ability to make it sound like French when he is speaking in English.

    • @OlavLadnav
      @OlavLadnav 6 років тому +1

      He was speaking English O_o?

    • @Zhuinden
      @Zhuinden 6 років тому +6

      I've heard English in Britain that was far less comprehensible. Just gotta pay attention in this case.

    • @NghiNguyenVan
      @NghiNguyenVan 6 років тому +4

      Just because his mother language is French.

    • @RS-kt6is
      @RS-kt6is 6 років тому

      He's more likely to actually make the Android framework simpler and more comprehensible, as well as actually make his ConstraintLayout editor actually work (it's full of bugs that make it almost unusable) than actually speaking understandable English

    • @codinginflow
      @codinginflow 6 років тому +1

      I love listening to him

  • @codinginflow
    @codinginflow 6 років тому +6

    These guys also have a great podcast

  • @theaninova
    @theaninova 3 роки тому +2

    We need this every year

  • @AllanDaemon
    @AllanDaemon 6 років тому +3

    This talk was not only really good, as it was really funny as well.

  • @realharo
    @realharo 6 років тому +12

    That huge fragment lifecycle diagram someone created is not even correct...

  • @Actinesque
    @Actinesque 6 років тому +12

    Despite some good points, I'm still not sold on the "single activity" approach. Quite on the opposite actually, since I learned Activities could be styled to look as dialogs and whatnot, I tend to prefer them over Fragments. It mostly has to do with navigation (e.g. screens started from notifications) and properly restoring the state.

    • @Zhuinden
      @Zhuinden 6 років тому

      Fragments are pretty good at properly restoring the state - hell, that's the one thing that they do really well.

    • @advice-13
      @advice-13 6 років тому +1

      A single activity app will honestly feel a lot better from a UX standpoint. All the apps I create try to have as few Activities as possible, and the end result is a lot better. When I use an app that uses that Activity A -> slide transition -> Activity B, it just hurts how old, and terrible that is.
      Trust me, use Fragments as much as possible, it'll make the app feel a lot smoother. Fragments and BottomSheets.

    • @PrageethKumara
      @PrageethKumara 6 років тому +2

      It is good in conceptual but wouldn't it clutter a single Activity code so it be a maintenance nightmare? Idk

    • @Zhuinden
      @Zhuinden 6 років тому +2

      Prageeth Kumara one of our apps had around 21 screens and only 1 Activity, and the activity code was around ~150 lines total. All that logic you assume to be in the activity is either in a separate layer, or in the fragments.

    • @advice-13
      @advice-13 6 років тому +3

      Yeah, the Activity just contains the logic for replacing the Fragments, the Fragments know exactly what they're doing and can handle themselves. You can pretty much just convert all other Activities into Fragments, and then throw them into one Activity, and you won't have to change much in terms of code.

  • @vikasnamdeo720
    @vikasnamdeo720 Рік тому +2

    Nice video

  • @CodeWithCal
    @CodeWithCal 3 роки тому

    Great talk even 3 years later

  • @fidelitychauke
    @fidelitychauke 6 років тому +12

    After the keynote, this is my favourite video so far. My apps generally have a lot of Activities, I had found it to be an easy way to handle UI changes, and many tutorials seem structured in this way. Is there a good source I can read that lean more to single activity applications?

    • @fmbalvarez
      @fmbalvarez 5 років тому

      Have you find anything? I'm looking for the same thing

    • @Pulkit__7
      @Pulkit__7 5 років тому

      I hope this helped : ua-cam.com/video/2k8x8V77CrU/v-deo.html

  • @damolaOnikoyi
    @damolaOnikoyi 2 роки тому

    I enjoyed this talk

  • @DiogoPereira90
    @DiogoPereira90 6 років тому +22

    "Engineers will be unhappy with every new option you give them. Specially if they are french."

  • @FedJimSmith
    @FedJimSmith 6 років тому +1

    still remember the time during I"m developing for Android Jelly Bean.. The changes are so significant I can say... BTW, nice presentation format

  • @justinutube
    @justinutube 6 років тому +2

    38:23 Crickets.... :-D (probably not enough native English speakers in the room to appreciate your jokes!)

  • @dtienloi
    @dtienloi 6 років тому +4

    Moving I/O outdoor is really a dumb choice.

  • @amicloud_yt
    @amicloud_yt 3 роки тому +1

    that absolute layout joke was great lmao

  • @WilliamSnale
    @WilliamSnale 6 років тому +1

    matching glasses on point

  • @publiccrown3264
    @publiccrown3264 3 роки тому

    very excellent

  • @ratixyz
    @ratixyz 6 років тому +7

    Fantastic talk!

  • @AmonTLC2014
    @AmonTLC2014 6 років тому +24

    I built my first app 7 months ago, it is high time to upload it on the store :) going to do this tomorrow! I have it already on my smartphone. Name : Chat@Scale R-Control

    • @twistentiger5610
      @twistentiger5610 5 років тому +1

      congratulations mate, I am on the process of developing mine and will be uploading this coming 2019, cannot wait

  • @sonnetsatisfyingvideo
    @sonnetsatisfyingvideo 5 місяців тому

    Nice❤

  • @Nithin_Coorg
    @Nithin_Coorg 6 років тому +1

    Love these guys! nice talk!

  • @witoldsienski1709
    @witoldsienski1709 6 років тому

    Thanks for fixing fragments :)

  • @hassan-usman
    @hassan-usman 6 років тому

    Sounds Good

  • @vivdroid
    @vivdroid 6 років тому

    Great

  • @megaman9422
    @megaman9422 2 роки тому

    too little too late, you should've done this a looong time ago, now iOS is light years ahead of Android

  • @igrecha
    @igrecha 6 років тому

    Isn't that new Paging Library (really a boring name) an extended version of DiffUtil?

    • @Zhuinden
      @Zhuinden 6 років тому +3

      If you disregard the ability to define a custom data source that can back itself from DB or from network to only load pages of data automatically and handle background thread writes to DB to re-fetch new data automatically, and load only pages asynchronously, while also providing a BoundaryCallback to handle when you ran out of data to show and should probably go fetch some more, then yes

  • @TuanNguyen-xx5iq
    @TuanNguyen-xx5iq 6 років тому

    Does anyone know what's brand of presentation remote these guys are using? Thank!

  • @fahmisidik8134
    @fahmisidik8134 6 років тому +1

    Really funny and informative talks :D

  • @kennguyen1016
    @kennguyen1016 6 років тому

    I didn't see any words about Jetpack in this video :O

  • @freemov2101
    @freemov2101 6 років тому +2

    No treble talk???? I/0 18

  • @bor3007
    @bor3007 6 років тому

    Need time breakpoints in comments

  • @Rak54321
    @Rak54321 6 років тому

    A spammers warns me that he will create my website as his android app and upload in play store. How can I stop the spammer and report to google??

  • @BenG610
    @BenG610 6 років тому

    语速好酸爽!😄

  • @vlastos
    @vlastos 6 років тому

    Single activity app hmmm, what about changing themes per screen, I usually have some translucent statusbar ui somewhere, id needto restart the app with single activity arch

    • @Zhuinden
      @Zhuinden 6 років тому

      activity.recreate()?

    • @vlastos
      @vlastos 6 років тому

      Zhuinden Restarting the whole app, recreating whole backstack for ui change

    • @Zhuinden
      @Zhuinden 6 років тому

      vlastos "whole backstack" is an overstatement, that's all Parcelable. You only need to inflate current view and it actually happens seamlessly. We've had to do it before. Although I think you can set theme on Api 21+ easily dynamically, but I do know that for example locale change within your app requires recreating the activity because the base context must be reconfigured and it is unavoidable no matter how many Activities you have. Except you'll have to tell ALL of them to die! That's when people hack with clear task new task instead :D

  • @aiders4352
    @aiders4352 6 років тому

    Surprised the design library wasn't in the timeline.

  • @alxkub
    @alxkub 6 років тому

    Single Activity application? No way! That’s just absurd.

  • @mdafsharhossain1984
    @mdafsharhossain1984 6 років тому

    I am from bangladesh..very nice sir

  • @thantzin1700
    @thantzin1700 6 років тому

    Hello..

  • @CoderJava
    @CoderJava 6 років тому

    R.I.P AbsoluteLayout. hahaha...

  • @haloavenger
    @haloavenger 6 років тому +1

    Wtf is with that enum pronounciation

  • @sams.3224
    @sams.3224 5 років тому

    Too much bla bla and the code on the slides is awful to read.

  • @SasLuca
    @SasLuca 6 років тому +37

    This talk shows just how bad Android is from a developer stand point.

    • @yenihayatisland
      @yenihayatisland 6 років тому +1

      Any elaboration for your strong opinion?

    • @SasLuca
      @SasLuca 6 років тому +52

      1. 12:02 They literally explain how it was a performance pattern to not use enums because their virtual machine was too bad. I'm sorry but it's depressing that not using enum's is a "performance" pattern in 2018 considering in that in the 70's (almost 50 years ago) you could use them as much as you wanted in C with 0 performance penalty.
      2. 22:28 They literally show you the history of all the Layout types they created for Android and how most of them are bad and you should never use and that their new idea is now going to work. Except that is what they said about RelativeLayout back in the day, and before that about GridLayout and so on. The Android API clearly has a pattern of very very very bad choices.
      3. 24:54 They literally show you just how horrible it is to do animations on Android because guess what, the API is so fricking bad.
      4. 25:48 They literally joke about how stupidly hard it is to make a RecyclerView change its orientation.
      5. 26:52 They tell you all about how Fragments for the longest time even they at Google had no idea how to use, how they deprecated their original implementation and how even now, they realize that it's complicated to work with them but hey you do what you have to do. I remember a few years ago watching a presentation from Google IO about Fragments and how in the beginning of the talk the guys presenting were like "Hey, so we know no one really uses Fragments because you have 0 idea how to and we understand you because we at Google also have 0 idea how to use them but good news, now we at Google now how to use them so we are going to show you. And sorry btw that we made it so bad in the first place." (I'm paraphrasing because I don't remember the original video).
      6. 28:04 They said that in the past they wanted you to use a separate Activity for everything in your app but now they realize that doesn't work and you should use just one.
      7. 31:20 They show a monster of a diagram of the lifecycle of a fragment and its not even complete.
      8. 31:38 They explain how no one even overrides the lifecycle methods of an Activity correctly (maybe because their API and documentation is awful).
      9. 31:56 They tell you how it is all their fault because instead of giving you the information about the lifecycle they apply OOP principles to try an encapsulate and hide it behind all those methods. Now they realize this doesn't work so they just give you an even more complex API which involves you creating another object called and LifecycleObserver. But please trust them that this time it's ok and they won't change their mind in a few years and deprecate this API.
      10. 32:57 "Abstract it into this other thing over there..." yeah, cuz you know, this worked so great in the past.
      11. 38:15 Well I wish I could "Minimize my memory consumption" but the fact that you choose a garbage language that can't allocate objects like iterators on the stack or in which enums are considered to have too big of a memory footprint, makes my life quite hard and miserable to develop for your shitty platform.
      12. There are way more examples I could give but just by looking at random talks from Google IO you can find more. In one Q&A for example they asked the Android team why the Clear All apps button was removed in Android P and the head of the Android team sighed and said "I had the same question for the team and they just ..." and then they give the mic to a guy from the Android team who says "Yeah well we thought that Android should just handle memory management of the apps better and that you shouldn't need a Clear All button. Sorry for that, we are working on putting it back."
      I'm not sure if you will read all of my points but it doesn't take a lot of time watching random talks from Google IO to figure out that Android has massive problems. It's APIs are a mess and has a whole history of bad choices, Java as a primary language was one of the worst decisions possible considering how slow Android is (and don't pull the "but Java is not slow" argument on me, when you have to avoid using enums (a thing that has the performance cost of an int in C) for performance and official apps from Google drop frames all the time.).
      I know making an OS is hard, but the pattern of bad choices made by Google when it comes to Android is pretty clear. And it's sad that the most popular mobile OS is so bad.

    • @yenihayatisland
      @yenihayatisland 6 років тому +5

      As for your 1. to 7. , I see it with a quite different developer's view. If Android has stopped it's improvements over API and low level architecture, it would be a very boring OS and many could start to consider other career choices. The reason for the API changes is the magic word "powerful", that a simple function can do more things than expected. In a somewhat extreme case, everyone who begin writing opengl code ask the same question: why these 100 lines of code while my intention is very straightforward? Because it seems simple but actually not so, you are creating an object in a context, API implementation need your definition of object and context.
      Yet another way to put it... mobile industry is highly mobile, to keep up with the mobility, things need changes. The talk basically goes like: some changes we made are good, and here are the wrong stuff that we are trying to fix and before it's done you may try this and that.
      And for the Java argument, I think everyone could find the reason why Android adopt Java. To dominate the market, google choose a developer friendly and portable language. JVM is also good for security concern.

    • @marklinton4567
      @marklinton4567 6 років тому +14

      Coming from C# to Android, I find the endless deprecation to be a bit ridiculous. Just stick with something and make it better rather than constantly throwing stuff out in favor of a new miracle API that will ultimately be deprecated in 2 years for the next miracle API.

    • @Mooooov0815
      @Mooooov0815 6 років тому +8

      I really like Android and I think its a great system. However, I always had some struggle with animations, fragments, etc.. Basically everything you criticized. I always thought it was my fault, so it's nice to see that there are other people with the same problems :D (I am just a hobby developer btw.)
      The endless deprecations, the hundreds of API levels to support and the millions of support libraries make building Android apps really painful and confusing, especially if you don't have a lot of experience.
      I think the announcements from IO18 mark a good way to go (Jetpack, Android X and *finally* a material theme editor) but especially for beginners there are still a lot of questions to be answered. I'll wait for the first stable releases until I start my new project using the new features announced at this IO.

  • @anonimo0486
    @anonimo0486 6 років тому +1

    Romain Guy is so cute😍

  • @tellvivk
    @tellvivk 6 років тому

    Time to go full react native.

  • @dmitriyobidin6049
    @dmitriyobidin6049 6 років тому +1

    Native android development is dying, why would we learn kotlin?

  • @DanielVivek
    @DanielVivek 6 років тому

    I'm an iOS developer as well and I see that they are moving towards Xcode.

    • @fidelitychauke
      @fidelitychauke 6 років тому +3

      Xcode as nothing on android studio. Yes, they (xcode) may have some good ideas, but android studio does them better

    • @DanielVivek
      @DanielVivek 6 років тому +5

      It is okay to adopt something better even though the android studio is good. The storyboard layout for navigating is something that has been adopted. One of the examples is constraint layout.

    • @fidelitychauke
      @fidelitychauke 6 років тому

      True, storyboard is quite cool, although it can get quite cluttered for large projects. The constraint layout on xcode was hard for me to learn compared to the android one. Everyone I know who has used both professionally agrees that android studio is a better experience (except for the build times on the emulator).

    • @advice-13
      @advice-13 6 років тому

      I'd blow my brains out if I had to use xcode.

    • @DanielVivek
      @DanielVivek 6 років тому

      You will be left with no choice then.

  • @CloakedC
    @CloakedC 6 років тому +3

    Hey Google, don't spam my feed. XD

    • @typingcat
      @typingcat 6 років тому

      Sorry, I can't help you with that yet.

  • @meow75714
    @meow75714 6 років тому +8

    Instead of going to Kotlin, it would have been better for you to switch to modern C++ instead

    • @70ME3E
      @70ME3E 6 років тому +6

      whaaaa'
      ? oO ? O_o

    • @Zhuinden
      @Zhuinden 5 років тому

      heavens no

  • @scigama71
    @scigama71 6 років тому

    witty humor

  • @tizon509
    @tizon509 6 років тому +3

    Bye Java !

  • @shh1909
    @shh1909 6 років тому

    I'm watching this video so that Google will hire me as a Android developer.

    • @areebjamaliam
      @areebjamaliam 6 років тому +2

      **insert That's not how it works.jpg**