Now in Android: 01 – Room, KTX Extensions, AndroidX, Conference Videos, ADB podcast & more!

[Music] hey Android developers welcome to the first ever video for now in Android now an android is a series of articles that i've been posting on medium trying to help people understand including us what we've actually done on the android team recently in terms of releases of new libraries new documentation new samples and code labs videos anything that helps developers understand and learn Android it's a little hard to follow it externally because this content tends to get posted in many many places do android comm youtube medium developers blog all over the place right so what we try to do is now in android is collect that information and then put it out there with links to make it easier to find it and consume it and learn what you need to learn but we realized as long as we're collecting the information for these articles every couple of weeks ish why don't we actually try to do the same thing with video reuse that content in case some people actually tend to get their information from video so I'm basically going to regurgitate not physically but verbally the information that's in an article every time on this video series as well and at the same time it turns out this is a really technical interesting piece of information I think it turns out that videos have an audio track on them so what we're gonna do is strip out the audio track and that becomes a podcast so ideally every time we issue a now an Android article we also issue an episode of now and Android in video form as well as podcast form so no matter what form you take for consuming your content as long as it's not carrier Pidgeon there should be a way of getting it from us now let's actually start the show this first series on video and maybe podcast if we get around to it is for the January 8 episode of now and Android we're a little bit late recording this one because we're still getting everything together so it's getting out there well after the article but hopefully it'll get there eventually the other ones should be a little bit more synchronized in time as we go so in this one we are going to start with documentation first up let's talk about articles there are some new guides available on deed Android comm that are worth checking out first is room there's a couple of things there that are worth looking at first I want to point out that relationships are hard aren't they wouldn't it be nice if there was documentation that helped explain how to deal with them we can't possibly offer that but we can offer documentation that helps you understand relationships in room and that's exactly what Alex Cooke one of the people on the tech writing team for Android has done so he created a guide on room relationships there was a recent article by Florina month Enescu on medium which you can check out which covers this information as well has a great example of how to do this but now that information and more is in a guide on da Android calm so you can see the reference to how these api's are supposed to work also in the room area is pre-populating the room database this was a feature that was available in room 2.

2 where you can basically initialize your database on application start up from a local file on the device so that capability was already in the library and now there is actually a guide that helps explain how to actually make it work and then finally there's a new list for KTX extensions KTX is a set of extensions that we came out with a couple of years ago for Kotlin developers that basically make our api is better so we live in a reality where we cannot change the api's of android even if we look at a method and hate it we cannot change it because any application that is using that API in its current form would break on future platforms if we change the way that it works if we delete it from the API if we change the method the parameters that it takes whatever all right so we can't change it but what we can do is introduce better methods as extensions in cowan which essentially look like methods on the same class but which are more geared towards the things that people need now maybe there's simpler to use maybe they need maybe they use new capabilities of the common language to make it easier for common developers whatever it is so we've introduced tons of extensions across the api's of android including some in the anime area including some for bitmaps and drawables just all these simple use cases where a simple extension method makes many things much easier to use and reduces a lot of boilerplate so the problem with KTX extension was if you wanted to know what was there you kind of needed to know what was there it was a little weird the documentation for it was essentially embedded in the package documentation so you kind of needed to know that it was in the package or the class in order to go looking for it so there was not really a way for you to say gee what's in KTX and then look through a list and then figure out what you wanted to do from there now there is there's a list of KTX extensions that joshua baxter has published on deegeu.

com and you can check those out see what's available see all the api's that have extensions associated with it and go from there so check it out next up Android X releases we have released a few different versions of a few different libraries as time first up in the stable releases you'll want to check out the biometric library so biometric is interesting it used to be that the biometric capabilities were in api's that were only in the platform and then that evolved over time so maybe we started out with fingerprint and then we added face recognition and then there's enhancements on that and other things to do wouldn't it be nice if instead there was a static library that allowed you to authenticate using whatever capabilities the platform offered and that is what the biometric library is it was already out there and now is there's a new version in stable that is basically bug fix release browser API is the browser static library and Android X has introduced new dark theme as well as trusted web activities capabilities the enterprise feedback api's just went stable with their first version so you can check that out and the paging library which enables gradual data loading when you're working with recyclerview that's new stable version has some minor improvements on the previous one and then finally the room latest version has some minor bug fixes room which we already talked about is basically an abstraction and an API on top of sequel Lite so if you're using sequel Lite for a local persistent data storage room is kind of a better way to do that gives you type safety and build time capabilities that you don't get just using Ross equally also in Android X we have a new alpha library that might be worth checking out if you like the futures capability of the guava library but you don't really want to take in all of guava because it tends to be kind of a lot then you could check out this one it's in alpha so maybe not ready for primetime and expect it to change but if you've been waiting for this capability on its own standalone then go ahead and check that library out there's also a new article that Florina montón sq has published called observing room databases with flow so in room 2.

2 had this great feature in it where all of a sudden you could use flow for observing changes that happen in your database which made it a lot easier to figure out okay well if stuff has changed over there then I can react to it in my UI in my business logic whatever right so that capability was there but wouldn't be nice if it was a little easier to understand actually how to use it besides just the pure reference stocks of the library so Florina has published this article it's on medium you can check it out good sample code and explains really how to get your hands into this new API there's a new code lab out there called advanced co-routines with Kotlin flow and live data this is a code lab that was written by Tim song and Shawn McClellan for the recent Kotlin conf conference that happened in December there was a workshop that the team did they're covering all kinds of things including the ability to use code routines with live data and then also using it with flow so check out that code lab there's also a link to the raw code so you can either do the sort of code lab LED version step-by-step for the full version of how this stuff works or you can just dive right into the project and take a look at the code if you want to see what's going on so conference videos one of the great things about conferences in the last few years is that almost every conference certainly of a certain size and the planet NOW records the sessions that are done and either live strains them or at least post those videos online soon we certainly do that with the conferences that we sponsor here for Google i/o and Andrew Deb summit and the other Google conferences but a lot of other conferences do this as well it seems a little strange because don't they want the people there well there's still an advantage to being at a conference if you have the time and ability to be there if you can travel if it's local whatever like the ability to actually talk with other people there I know I enjoy that it allows me to really soak in the content for a couple of days where otherwise I may not take the time out of my life it also allows me the ability to talk to people to interact with them about that the way that our stuff works or maybe problems that they're having answer their questions take feedback to the engineering team whatever it is right so being at a conference locally I think still has advantages but all of the technical data that you're getting from those sessions is going to be available soon if not even live and this has happened for a couple of conferences recently Android space it seems worth mentioning first of all there was droidcon SF that happened at the end of November lots of great technical sessions there so you can go to their sites and see those videos and also Collin conf which I mentioned earlier happened in early December this is not just Android there was a lot of Android content there there's also a lot of and a lot of content about the Collin language itself a language feature is multi-platform related stuff things happening in cloud backends server all kinds of stuff so if you are a Kotlin developer or you are looking to become one that's a good place to go to get some content on learning how to do all that stuff and then finally I'd like to use this time on this video and podcast a link to another podcast if you do not yet know about the ad beat podcast it's Android developers backstage it's a podcast that I co-host with home on geek and Tourneur be we've been doing this for I don't know five years now we just published episode 130 so we've got a few of those out there to listen to a couple of episodes that came out recently were episode 129 which is display input and haptics we talked with Michael Wright who works in the London team for Android on all of those things he works at a very low level and knows a lot of stuff about how display drivers work and how we Seve input from sensors and then turn that into events in the system how haptics work so interesting sort of nerdy details about all of that stuff very good stuff and episode 130 was posted recently it's called first law of motion layout we talked with Nicola hua and John Hufford on the tools team about motion layout and constraint layouts motion layout just came out with its beta release at the Android dev summit or soon after can't remember the timing details on that anyway it is in beta right now it just downloaded beta for last night I believe so you can play with that the great thing about the beta release is they also release the editor for it so you can go ahead and play with it in Android studio motion layout was really cool from the beginning but actually creating a motion layout just writing raw XML was not really for the timid it was intended to be used in concert with a visual tool and that's what you can now do so go ahead and grab the latest bits and listen to the podcast for more about motion layout as well as about constraint layout and finally I'd like to say thanks for watching or listening if you're hearing this on a podcast and watch for future episodes of this in video form in article form and in podcast form and finally obviously it's hard to kind of link to these things as I'm talking along so if you want the the URLs if you want the links to the stuff that I've been talking about please do check out the article on medium because all of the links are embedded in the article it's the same content there but links make it a little bit easier to get to those sites thanks talk to you next time you [Music].

Hãy bình luận đầu tiên

Để lại một phản hồi

Thư điện tử của bạn sẽ không được hiện thị công khai.