Header Ads

Background Optimizations (Android Development Patterns S3 Ep 14)

Android 7.0 Nougat contains a number of optimizations around background processing, intending to limit the amount of memory thrashing caused when many apps listen for the same implicit broadcast via manifest registered receivers, leading to poor overall system performance when the device is switching networks or when a picture or video was just captured.

When targeting API 24, you’ll no longer receive CONNECTIVITY_CHANGE broadcasts to manifest registered receivers (although runtime receivers will continue to work as your process is already in memory) - consider using JobScheduler to listen for network change events.

For all apps, regardless of whether they target API 24 or not, you’ll no longer be able to send or receive NEW_PICTURE or NEW_VIDEO broadcasts, usually sent immediately after taking a new picture or new video, respectively. Instead, use JobScheduler’s new ability to trigger based on content URI changes to kick off your job.

Read the documentation for all the details: https://goo.gl/37QRQz

#AndroidN #BuildBetterApps


No comments:

Powered by Blogger.