Posted by Caren Chang, Developer Relations Engineer
In case you missed it, we’ve simply completed a MAD Skills series on WorkManager. We began by introducing WorkManager for these new to the library after which proceeded to speak extra about superior usages together with easy methods to check and debug your WorkManager code. The sequence ended with an episode on easy methods to migrate your previous code from GCMNetworkManager and FirebaseJobDispatcher to make use of WorkManager as an alternative.
Here’s a fast abstract of what we coated.
Episode 1: WorkManager: Basics
In our first episode, we explored the fundamentals of WorkManager by way of the WorkManager codelab. We began by understanding easy methods to outline work we would like carried out, and easy methods to schedule the work. We then moved on to implementing several types of work: distinctive and periodic. Finally, we ended the episode by having a look at app standby buckets to higher perceive how WorkManager schedules work.
If you’re new to WorkManager, we additionally suggest having a look on the following articles:
Episode 2: WorkManager: Working within the background
The sequence continued with Ben giving a extra in-depth take a look at how WorkManager offers with multi-threading. When working with threads, you have got the choice of utilizing Executors, coroutines or RxJava, and Ben demonstrated every of those approaches with WorkManager. The episode concluded by demonstrating easy methods to return a end result when the work is accomplished in order that the UI might be up to date.
If you’re excited by utilizing WorkManager with coroutines, we additionally suggest this text from Florina: WorkManager – Kotlin APIs
Episode 3: WorkManager: Advanced configuration and testing
In episode 3, we took a take a look at easy methods to customise the initialization of WorkManager and assist apps that span a number of processes. We’ve gotten a variety of questions from builders round testing and debugging, so Ben additionally dove into easy methods to check your Workers, and helpful debugging strategies.
Episode 4: Migrating from GCM NetworkManager and FirebaseJobDispatcher to WorkManager
In episode 4, we centered on easy methods to migrate from previous job scheduling libraries (GCMNetworkManager and FirebaseJobDispatcher) to WorkManager. Once your app begins concentrating on API degree 30 and above, GCM NetworkManager and FirebaseJobDispatcher will not work on gadgets working Android Marshmallow (6.0) and above. If your app continues to be utilizing both of these libraries, now’s the time to replace your apps to make use of WorkManager as an alternative!
Episode 5: WorkManager with Hugo
Android GDE Hugo Visser talked about why he selected to make use of WorkManager in a well being app he not too long ago labored on and the way the library has helped his improvement course of.
Episode 6: Live Q&A
The sequence wrapped up with a stay Q&A session the place we answered your WorkManager associated questions. Watch the recording to see all of your questions answered, together with future plans for WorkManager, dealing with duplicate work, retrying failed work, and extra!
