March 2016
Intermediate to advanced
428 pages
9h 2m
English
Throughout this book, we have mentioned the importance of not blocking the main thread. Performing long running operations on the main thread can cause your application to appear sluggish, or worse, hang. If your application doesn't respond within about 5 seconds, the system will likely display the Application Not Responding (ANR) dialog with the option to terminate your app. (This is something you will want to avoid as it's a good way to get your app uninstalled.)
Android applications use a single thread model with two simple rules, as follows:
When Android starts your application, it automatically creates the main (or UI) thread. This ...
Read now
Unlock full access