Android Background Processing

Sep 23 2022 · Kotlin 1.6, Android 12, Android Studio Chipmunk 2021.2.1

Part 3: Use Android Services

22. Conclusion

Episode complete

Play next episode

Next
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 21. Challenge - Communication Between Components Next episode: 23. Introduction

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 22. Conclusion

The student materials have been reviewed and are updated as of SEPTEMBER 2022.

Transcript: 22. Conclusion

Awesome to see you at the end of the third part of this course! :] Well done! You’ve learned a lot, but there’s always more.

In this part of the course, you learned about different types of services. Services are used to run code in parallel with the rest of the app, and they usually represent a long running operation, like playing music, or deleting files.

There are categories each service can be a part of. You learned about foreground and background services, which are different only by the fact that the user knows about foreground services visually, and doesn’t know about background services at all. You also learned about bound and unbound services.

You learned services can extend three different classes - the Service, IntentService, and JobIntentService classes to be exact. The base Service is when you want a service which runs as long as you don’t stop it, and receives commands over time.

The other two are used when you have one-off work, that you need to run in the background. The difference between them is that IntentService is deprecated, and JobIntentService determines if it can use an IntentService, or a Job from the JobScheduler API.

As of Android Oreo, apps are very limited in what they can work on while in the background. In fact, apps can only receive a small set of messages and brodcasts when they are backgrounded.

So your services have to use a foreground notification, if you want to work with them, even if your app is not being used.

And to finish off with services, you used BroadcastReceivers, a special component of Android, used to receive broadcasts, and notify the UI of such events. Specifically, you used receivers to notify the user that an operation is finished, using a Toast.

This has been a really exciting part! You’re now able to implement many different ways to process data in the background.

In the final part of the course, we’ll pay tribute to some legacy concepts of background processing in Android! See you there! :]