Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this chapter, you learned about the life cycle of a service and why services are crucial to the architecture of your applications. You learned how to create a simple service and saw that services are not inherently multithreaded, but simply classes. You worked with System.Threading and System.Threading.Tasks to make your services multithreaded. Learning how to implement IntentService enabled you to create multithreaded services with relative ease, handling intents received from BroadcastReceivers.
You covered creating notifications to interact with users, and you implemented communication between services and the UI via several methods. You also covered creating alarms that repeated with high efficiency to send intents at scheduled intervals to your BroadcastReceivers and services.