Leveraging the Power of the Android Platform

Android provides a powerful threading model and rich background execution capabilities. In this course, you'll learn how to leverage these capabilities through the use of AsyncTask, Handlers, Services, Job Scheduler, Broadcast Receivers, and more.
Course info
Rating
(17)
Level
Advanced
Updated
Nov 7, 2017
Duration
3h 3m
Table of contents
Understanding the Android Threading Model
Performing Background Work with Services
Scheduling Background Work with JobScheduler
Working with Broadcast Receivers
Using Alarms to Schedule Time-sensitive Tasks
Description
Course info
Rating
(17)
Level
Advanced
Updated
Nov 7, 2017
Duration
3h 3m
Description

Modern applications include many rich time-based and background behaviors that extend well beyond direct interaction with the user. In this course, Leveraging the Power of the Android Platform, you'll learn how to use the powerful capabilities of the Android platform to create applications that incorporate these and other related behaviors. First, you'll explore how to utilize the Android threading model, AsyncTasks, Handlers, and StrictMode to effectively perform long-running work in a way that doesn't impact the user experience. Next, you'll discover how to use Android Services for background work that can be safely performed even after the user exits your application. After that, you'll learn how to use the Android Job Scheduler to create background jobs that rely on run criteria such as networking and power requirements, and delegate those jobs to the Android system for management and execution. Additionally, you'll cover how to use Android Broadcasts and Broadcast Receivers to publish information from one application, and allow other applications running on the same device to subscribe to that information. Finally, you'll delve into scheduling time-sensitive tasks using the Android Alarm Manager. By the end of this course, you'll have the skills and knowledge to create your own Android applications that incorporate the rich time-based and background execution behaviors required to create a successful application.

About the author
About the author

Jim Wilson is president of JW Hedgehog, Inc., a consulting firm specializing in solutions for the Android, iOS, and Microsoft platforms. Jim has over 30 years of software engineering experience, with the past 15 years heavily focused on creating mobile device and location-based solutions.

More from the author
Introduction to Xamarin.Forms
Beginner
3h 37m
May 13, 2019
More courses by Jim Wilson
Section Introduction Transcripts
Section Introduction Transcripts

Performing Background Work with Services
Welcome to our next module, Performing Background Work with Services. This is the Pluralsight course, Leveraging the Power of the Android Platform. My name is Jim Wilson. Applications often need to perform non-UI background work and in many cases that work may need to run for an extended period of time. Now attempting this sort of work with an activity can often lead to problems so we need a better solution. In this module we dig into that solution, which is Android Services. So we'll start out and we'll look at the limitations of performing background work within an activity. We'll then see the advantages of using services to perform background work. Then we'll see how to implement a service. In particular, we'll see how to implement a service using the IntentService class. We'll then see how to start a service from within our application and then we'll wrap up with how we can start a service using a PendingIntent.

Scheduling Background Work with JobScheduler
Welcome to our next module, Scheduling Background Work with JobScheduler. This is the Pluralsight course, Leveraging the Power of the Android Platform. My name is Jim Wilson. Performing background work effectively presents challenges both for the Android system as well as for developers. So in this module we'll look at how we can alleviate many of those challenges by using the Android JobScheduler. So we'll start with an overview of the Android JobScheduler. We'll then see how to create the class that will serve as our job's implementation class. We'll then take a look at how to create information and criteria for our job as well as schedule a job. We'll see the appropriate way to launch our work running in the background, and as part of that we'll see the appropriate way to handle the situation with the JobScheduler indicating that our work needs to stop before our work is actually completed, and then we'll finish up with a look at how to choose between a traditional Android service using the JobScheduler to perform our app's background work.

Working with Broadcast Receivers
This is the Pluralsight course, Leveraging the Power of the Android Platform; my name is Jim Wilson. Oftentimes applications need to be informed when significant events of interest occur. These events may come from the Android system, or they may come from other applications. In this module we'll see how Android makes distributing and handling these sort of events possible. So we'll start out with a look at Android broadcasts. Then we'll see how our applications can send Android broadcasts, and then we'll see how to handle those broadcasts by implementing something known as a broadcast receiver. Now in many cases we want to create our broadcast receivers at runtime, so we'll learn how to do that using something called a context registered receiver, and then we'll finish up by seeing how the system can automatically launch or broadcast receivers using something known as a manifest declared receiver.

Using Alarms to Schedule Time-sensitive Tasks
Welcome to our next module, Using Alarms to Schedule Time-sensitive Tasks. This is the Pluralsight course, Leveraging the Power of the Android Platform. My name is Jim Wilson. Applications frequently need to schedule tasks to be performed at some later point in time and in many cases, those tasks need to occur even if the user is no longer engaged with the app. So in this module we'll see how the alarm manager allows us to reliably schedule just these sort of tasks. So we'll start out with a look at the way our application handles this Note Reminder feature and see how scheduling that reminder at some point in the future would actually improve that feature. We'll then take a look at the alarm manager and just how it works. We'll then see how to create a broadcast receiver that we're going to associate with the with the alarm manager. We'll see how to set the alarm, and then we'll finish up with seeing how to use the alarm manager to improve our application's Note Reminder feature to show that reminder at some point in the future.