Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)
For the More Curious: JobScheduler and JobServices public class PollService extends JobService { @Override public boolean onStar ...
Chapter 28 Background Services When onStopJob(...) is called, your service is about to be shut down. No waiting is allowed: You ...
JobScheduler and the future of background work JobScheduler and the future of background work In this chapter, we showed you how ...
Chapter 28 Background Services Sync adapters also integrate nicely with the OS from a user perspective. You can expose your app ...
29. Broadcast Intents In this chapter you will polish PhotoGallery in two big ways. First, you will make the app poll for new se ...
Chapter 29 Broadcast Intents Activities and services should respond to implicit intents whenever they are used as part of a pub ...
Creating and registering a standalone receiver Next, open AndroidManifest.xml and hook up StartupReceiver as a standalone receiv ...
Chapter 29 Broadcast Intents Time to verify that StartupReceiver’s onReceive(...) is executed when the device boots up. First, ...
Using receivers Using receivers The fact that broadcast receivers live such short lives restricts the things you can do with the ...
Chapter 29 Broadcast Intents Next, update PollService.setServiceAlarm(...) to write to shared preferences when the alarm is set ...
Filtering Foreground Notifications Filtering Foreground Notifications With that sharp corner filed down a bit, let’s turn to ano ...
Chapter 29 Broadcast Intents Creating and registering a dynamic receiver Next, you need a receiver for your ACTION_SHOW_NOTIFIC ...
Creating and registering a dynamic receiver Any IntentFilter you can express in XML can also be expressed in code this way. Just ...
Chapter 29 Broadcast Intents Limiting broadcasts to your app using private permissions One issue with a broadcast like this is ...
Limiting broadcasts to your app using private permissions Now, use your permission by defining a corresponding constant in code ...
Chapter 29 Broadcast Intents More about protection levels Every custom permission has to specify a value for android:protection ...
Passing and receiving data with ordered broadcasts Right now you are sending your own personal private broadcast, but so far you ...
Chapter 29 Broadcast Intents Modify VisibleFragment to tell the sender of SHOW_NOTIFICATION whether the notification should be ...
Passing and receiving data with ordered broadcasts Listing 29.13 Sending an ordered broadcast (PollService.java) public static ...
Chapter 29 Broadcast Intents First, create a new BroadcastReceiver subclass called NotificationReceiver. Implement it as follow ...
«
25
26
27
28
29
30
31
32
33
34
»
Free download pdf