Background Optimizations (Android Development Patterns S3 Ep 14)

86 436
43.7
Опубликовано 6 октября 2016, 16:55
For documentation on all background optimizations, (including those after API 24) check out - goo.gle/2SO7gSf

Check out the newer WorkManager library, which is built on top of JobScheduler - goo.gle/2SLTK1A

----------------------------------------------------------------------

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: goo.gl/37QRQz

#AndroidN #BuildBetterApps #adp #bgoptimizations #jobscheduler #battery #background
автотехномузыкадетское