An IntentService is an Android service that runs once to completion. You trigger it with an intent object that contains instructions, and it then runs in a background thread until its task is complete.
- [Instructor] There are a number of different ways…to run background tasks in Android…using the async task class, threads, and other approaches,…but one of the best is the intent service,…a service that's designed to run one time to completion…and then exit automatically.…Android Studio has a template…that lets you create an intent service very quickly…and use it very simply…but it takes a little bit of explanation.…In this application,…I'm going to go to the project window…and right click on the app module, and select new, service,…and then I'll select the second option…labeled intent service,…and I'll accept the name my intent service,…and leave the option…to include helper start methods selected.…
I'll finish and that creates a new class…and I'll accept the option to add the file…to my git repository.…And here's my new class.…Let's walk through it.…First of all, the class extends the intent service class.…This is a part of the core Android SDK.…There are a number of private fields here,…constants, for actions, and extras.…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.