Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint