Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Asynchronous Android Programming - Second Edition

You're reading from  Asynchronous Android Programming - Second Edition

Product type Book
Published in Jul 2016
Publisher Packt
ISBN-13 9781785883248
Pages 394 pages
Edition 2nd Edition
Languages
Author (1):
Steve Liles Steve Liles
Profile icon Steve Liles

Table of Contents (19) Chapters

Asynchronous Android Programming Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Asynchronous Programming in Android 2. Performing Work with Looper, Handler, and HandlerThread 3. Exploring the AsyncTask 4. Exploring the Loader 5. Interacting with Services 6. Scheduling Work with AlarmManager 7. Exploring the JobScheduler API 8. Interacting with the Network 9. Asynchronous Work on the Native Layer 10. Network Interactions with GCM 11. Exploring Bus-based Communications 12. Asynchronous Programing with RxJava Index

Applications of Loader


The obvious applications include reading any kind of data from files or databases local to the device, or Android content providers, as we've done in the examples in this chapter.

One strong advantage of Loaders over direct use of AsyncTask is that their lifecycle is very flexible with respect to the Activity and Fragment lifecycles. Without any extra effort we can handle configuration changes such as an orientation change.

We can even start loading in one Activity, navigate through the app, and collect the result in a completely separate Activity, if that makes sense for our app.

In some ways, this decoupling from the Activity lifecycle makes Loader a better candidate than AsyncTask to perform network transfers such as HTTP downloads; however, they require more code and still aren't a perfect fit.

The framework is very powerful for managing asynchronous data loading; however, it does not provide a mechanism to show the loading progress, as we have on the AsyncTask framework...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $19.99/month. Cancel anytime}