Pro Android 5 by MacLean Dave & Komatineni Satya & Allen Grant
Author:MacLean , Dave & Komatineni, Satya & Allen, Grant
Language: eng
Format: epub
ISBN: 978-1-4302-4680-0
Publisher: Apress
Published: 2015-06-09T16:00:00+00:00
Exploring Long-Running Broadcast Service Abstraction
WakefulIntentService is a good abstraction. However, we want to go a step further so that our abstraction parallels the method of extending IntentService as in Listing 16-7 and does everything that an IntentService does but also provides few more benefits:
Pass the original intent that was passed to the broadcast receiver to the overridden method onHandleIntent. This allows us to largely hide the broadcast receiver, simulating a programming experience that a service is started in response to a broadcast message. This is really the goal for this abstraction while some extras are thrown in.
Acquire and release wake locks (similar to WakefulIntentService).
Deal with a service being restarted.
Allow a uniform way to deal with the wake lock for multiple receivers and multiple services in the same process.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Circuits | Digital Design |
Electric Machinery & Motors | Electronics |
Fiber Optics | Networks |
Superconductivity |
Whiskies Galore by Ian Buxton(40748)
Introduction to Aircraft Design (Cambridge Aerospace Series) by John P. Fielding(32384)
Small Unmanned Fixed-wing Aircraft Design by Andrew J. Keane Andras Sobester James P. Scanlan & András Sóbester & James P. Scanlan(32162)
Craft Beer for the Homebrewer by Michael Agnew(17481)
Turbulence by E. J. Noyes(7098)
The Complete Stick Figure Physics Tutorials by Allen Sarah(6667)
Kaplan MCAT General Chemistry Review by Kaplan(6095)
The Thirst by Nesbo Jo(5827)
Bad Blood by John Carreyrou(5807)
Learning SQL by Alan Beaulieu(5459)
Weapons of Math Destruction by Cathy O'Neil(5087)
Man-made Catastrophes and Risk Information Concealment by Dmitry Chernov & Didier Sornette(4793)
iGen by Jean M. Twenge(4722)
Digital Minimalism by Cal Newport;(4628)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(4549)
Audition by Ryu Murakami(4134)
Electronic Devices & Circuits by Jacob Millman & Christos C. Halkias(4074)
1,001 ASVAB Practice Questions For Dummies by Powers Rod(4068)
Pale Blue Dot by Carl Sagan(4046)