Welcome to Now in Android, your ongoing guide to what’s new and notable in the world of Android development.
Migrate to WorkManager… Now!
Caren Chang posted an article on the Android Developers Blog about the upcoming deprecation of GcmNetworkManager, and the need to move to WorkManager. In November of 2020, GcmNetworkManager will be deprecated, and apps targeting releases after Android 10 will no longer have access to this older API, so if you’re using GcmNetworkManager, now is an excellent time to look into WorkManager instead. There’s a good chance you’re using WorkManager already — if so, congratulations! You’re done! You win the opportunity to move on to the next item below without even finishing this sentence.
But if you’re still using APIs for GcmNetworkManager (or Firebase JobDispatcher), then you’ll want to migrate to WorkManager soon, because both of those APIs are going away.
Back when WorkManager began, it wrapped all of the options for deferred work into one single API. Under the hood, it deferred to the platform JobScheduler API when available, or GcmNetworkManager functionality when JobScheduler isn’t available, or the more manual AlarmManager approach as a fallback. It was essentially doing what most apps had to do internally to have coverage across the broad ecosystem of devices and releases.
Now that WorkManager is fully functional, we decided that it makes more sense to offer the single solution of WorkManager instead of the potentially confusing approach of continuing to offer the GCM NetworkManager API as well.
In 2020, both Firebase JobDispatcher and GcmNetworkManager will be deprecated, so you’ll need to migrate your code to use WorkManager instead. Same great functionality, but with a single, simpler, API.
Read Caren’s article for more details and links.
Several libraries went stable recently, so if you’ve been holding out on using them until they were actually done, now’s the time.
Benchmarking 1.0.0 This library helps you instrument your code to create reproducible performance tests. AndroidX uses Benchmark to add regression tests to its Continuous Integration system, and you can too. Be sure to check out the Benchmarking session at the Android Dev Summit, the recent blog post, and ADB podcast episode, in which the team talks about the library and tips on how to use it for CI.
Exifinterface 1.1.0 This API supports reading and writing of Exif data from/to image files such as JPEG and RAW. This latest version also supports HEIF.
ViewPager2 1.0.0 This one has been a long time in the making. It provides all of the functionality from the old ViewPager API, but additional features like RTL support and vertical orientation, plus increased flexibility that comes from being based on RecyclerView. Check out Tiem Song’s lightning talk at the Android Developer Summit, the ViewPager2 sample, and the migration guide for more information on this API.
Biometric 1.0.0 Biometric authentication has been rapidly involving over the last few years, starting with fingerprint and then broadening out to include face detection. This presented a great opportunity for an API in Jetpack, so that developers can use a single API for a library built into their application, rather than different APIs per version of the platform. Who knows what other senses will be involved in the years to come — I can almost taste the future.
By the way, we’ve added an RSS feed for AndroidX releases. Now you can find out about all of the AndroidX library releases, as they happen. Check out the blurb on the Android X versions page (for the “All” channel), or add the feed directly to your reader.
Plenty of Room
ADS Schedule App Open-Sourced
Jose Alcérreca announced that we’ve open-sourced the scheduling app that we used at the Android Dev Summit. This app (which we continue iterating on for every I/O and Dev Summit event) is a good place to look for how to use some of the latest features and APIs in Android. Some of the features enabled in this version include gesture navigation support, dark theme, and coroutines.
Android Developer Challenge
Have you submitted your idea for the Android Developer Challenge yet? We’re looking for ideas for the theme of Helpful Innovation with Machine Learning. We’ll pick the top 10 ideas and bring the developers to Google to learn more about the technologies to help you write great applications that we will then help feature at Google I/O and on the Play Store.
[Observant followers of Now in Android will at this point be thinking “You already talked about the Developer Challenge! This is not new! Are you just keeping old items around to bloat the reading time on your articles? Bring me fresh content!” And you would be completely correct (except about the reading time. Sadly, the longer a piece is, the fewer people reach the end. The Internet favors brevity; there are no bonus points awarded for length).]
But the deadline of December 2nd is approaching faster than a monthly Security OTA, so it seemed worth one more callout. Check out the article on the Android Developers Blog and the Android Developer Challenge site, and submit those ideas. We need your ideas — what, you think we have ML bots coming up with their own ML ideas? Stack overflow from infinite recursion!
ADB Podcast Episodes
There have been a few episodes of Android Developers Backstage posted since the last Now in Android. Check them out at the links below, or in your favorite podcast client:
ADB 125: ADB Live at the Android Dev Summit This episode was a first for ADB, as we did our usual thing in unusual circumstances, recording a conversation between Chet, Tor, and Romain with Android developers Zarah Dominguez and Cyril Mottier, live at the ADS event. You can listen to the podcast as usual, or check out the video if you want to see it instead.
ADB 126: Gesture Nav In which Chet and Tor talk with Chris Banes, Adam Cohen, Dan Sandler, and Allen Huang about Gesture Navigation, including the changes in Android 10 and the overall UI experience in general.
ADB 127: Gradle to Crave In which Tor chats with Jerome Dochez, Chris Warrington and Xavier Ducrohet from the Android Studio build system team.
That’s it for this time. Go migrate your job-scheduling code to WorkManager! Check out the latest AndroidX stable releases! Read about Relations in Room! Check out the source code for the ADS Scheduling app! Submit your innovative ML ideas for the Android Developers Challenge while there’s still time! Listen to the latest ADB podcast episodes! And check back here soon for more updates in the Android development universe.