Android Programming: The Big Nerd Ranch Guide, 5th Edition
by Bryan Sills, Brian Gardner, Kristin Marsicano, Chris Stewart
22 WorkManager
PhotoGallery can now download interesting images from Flickr, find images based on a user’s search query, and remember the query when the user leaves the app. In this chapter, you will add functionality to poll Flickr and determine whether there are new photos the user has not seen yet.
This work will happen in the background, meaning it will execute even if the user is not actively using your app. If there are new photos, the app will display a notification prompting the user to return to the app and see the new content.
Tools from the Jetpack WorkManager architecture component library will handle the periodic work of checking Flickr for new photos. You will create a Worker class to perform the actual work, then ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access