Now, Your Friends Are Alarmed
Extra Credit................................................................................................
Here are some things you can try beyond those step-by-step instructions:
- Offer a user preference whereby PostMonitor will start collecting
timeline updates on boot and will buffer some number of updates,
so when Patchy connects, updates are available immediately and
fewer are missed in between Patchy runs. This will require the initial
alarm to be set from the on-boot receiver, rather than from the
service's onCreate().
- Extend the above extra credit component by offering a user
preference to have PostMonitor raise a Notification if certain sorts of
status updates are received while Patchy itself is not running.
Further Reading........................................................................................
You can learn more about the AlarmManager and the WakefulIntentService in
the "Using System Services" chapter of The Busy Coder's Guide to Advanced
Android Development.