Hands-on Background Services in Android
4.6 (109 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
348 students enrolled

Hands-on Background Services in Android

Implement background services into Android Apps
4.6 (109 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
348 students enrolled
Created by Packt Publishing
Last updated 6/2018
English
English [Auto-generated]
Current price: $86.99 Original price: $124.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 3 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Delve into using Android background Service capabilities effectively
  • Get acquainted with the Main UI Thread, Worker or Background Thread, and Process, and understand how they are related to Services and their role in supporting Background Services
  • Perform longrunning tasks using background services
  • Use IntentService to execute tasks in your application
  • Pass data to a service and get back results from it
  • Master restrictions in using background services in Android Oreo along with workarounds such as using JobIntentService
  • Explore the lifecycle of your Service
  • Deal with common problems and issues that might arise when using the services in your live projects
Course content
Expand all 29 lectures 03:01:56
+ Exploring Background Service in Practical Apps
8 lectures 48:03
This video gives an overview of the entire course.
Preview 06:37
The video starts with section overview and thereafter introduces various Android Components and why they are called building blocks of Android apps.
Exploring Android Components
02:36

In this video, we will get a brief introduction to the Android Components such as Activity, Broadcast Receiver and Content Provider. Using practical apps example get clarity about.

Exploring Activity, Broadcast Receiver, and Content Provider
09:18
In this video, we will get familiar with what is a Service in context of day to day usage of applications.
Introduction to Service
05:11

This video gives you overall idea of various categories of Service.

Types of Service
04:52
In this video, we will understand that a Started Services is categorised into Foreground Service and Background Service.
Foreground Versus Background Service
09:58

In this video, we will understand that Threads and Processes are very crucial concepts in order to understand the concept of Service. The video is a prerequisite to upcoming sections.

Understanding Threads and Processes
06:43
In this video, we will see how apart from Service, a background task can be executed using JobScheduler API or Job Dispatcher API.
Different Ways to Perform Background Operations
02:48
+ Creating a Background Service
6 lectures 37:40
In this video we will get Section overview and setup project in Android Studio.
Preview 05:36
In this video we will, learn to create Background Service step by step.
Implementing Background Service
06:08
In this video, we will explore various scenarios in which you can start or stop a Service.
Start and Stop a Background Service
06:42

In this video, we will learn about few predefined flags that can be returned in onStartCommand method.

Return Flags for Background Service
03:44
In this video, we will learn how does Started Service uses Main Thread to execute tasks.In this video, we will learn about the MVVM Architecture.
Background Service Runs in Main Thread
05:25
In this video, we will see how AsyncTask is one of the most primitive way to perform long running task in Background.
Using AsyncTask with Background Service
10:05
+ Working with IntentService That Uses Worker Thread
3 lectures 18:17

In this video, we will see how IntentService is an advanced form of Background Started Service and it uses worker thread to perform long running operations without blocking the UI.

Why IntentService?
06:18
In this video, we will learn to create IntentService step by step.
Performing Operations Using IntentService in a Worker Thread
09:33
In this video, we will Explore the key differences between a Started Background Service and the IntentService.
Started Service Versus IntentService
02:26
+ Interacting with Background Service
3 lectures 19:41

In this video, we will understand that, by default, a Background Service has no mechanism to send back results to the calling components.

Create and Send a Work Request to an IntentService
06:18
In this video, we will visually explore how to broadcast event from a Service and receive result in the calling component such as Activity.
Use Local Broadcasts to Interact with Background Service
03:10
In this video, we will Implement Local Broadcasts to send back results to the calling component.
Reporting Work Status to the Calling Component
10:13
+ Exploring the Lifecycle of a Service
3 lectures 16:01

In this video, we will see how a Started Service has its own Lifecycle similar to an Activity.

Exploring Lifecycle of Started Service
06:52
In this video, we will Explore theoretically the importance of Service lifecycle methods.
Importance of Lifecycle Methods
02:36
In this video, we will understand that using Started Service can jeopardise app’s security.
Enhancing Application Security Using Started Service
06:33
+ Background Service Limitations and Work Around
4 lectures 36:02
In this video, we will see that there are certain restriction imposed on Background Services from Android Oreo onwards.
What’s New for Background Execution in Android Oreo
08:31
In this video, we will practically check out what are the Background Service limitations.
Background Service Limitation
11:23

In this video, we will understand the solution of the limitations imposed on Background Services from Oreo onwards.

Work Around – JobIntentService
04:13

In this video, we will Integrate JobIntentService in our application.

Demo – JobIntentService
11:55
+ Troubleshooting Background Service
2 lectures 06:12
In this video, we will summarize the course along with points to remember for best practices for implementing Background Services in our apps.
Best Practices for Implementing Background Service in Apps
04:44

In this video, we will conclude the course with topics to explore after this course.

In Conclusion the Next Steps
01:28
Requirements
  • Basic Android Development
Description

This course helps developers who want to build applications working in the background, by exposing you to using Android Background Service capabilities effectively. Services come out as the best option with backward app compatibility.

You will learn a variety of topics like starting and stopping your service, interacting with the background service and creating and sending a work request, exploring the lifecycle of your service along with understanding the security issues in using it. You will learn to use IntentService, which utilizes a worker or background thread to execute tasks. You will explore what's new in the Background Service in Android Oreo and check out its limitations, and then overcome those limitations. You will then learn best practices and how to deal with problems and issues that might arise

By the end of the course, you will have a strong foundation in background services in Android and will be able to build the function you need to ensure you won't drain the battery excessively, compromise the user's security, consume too much data, or hamper the device's performance.    

About the Author

Book of Brains creates and distributes high-quality technology training content. We aim to teach technology the way it is used in industry and the professional world. Our trained team of professionals delivers hands-on workshops and training content for mobile as well web development technologies. We constantly monitor current industry trends and keep our training materials and workshops up to date.

Who this course is for:
  • This course targets working Android developers who want to extend their capabilities with background services. Experience with background services will not be required.