27
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 schedule it to execute on an interval. When new photos are found, you will post a Notification to the user with the NotificationManager.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.69.152