Handling Lengthy Operations in Google's Android, Page 4
The article mainly deals with two issues:
- When operations take a long time to finish, Android's system automatically pops up a dialog called ANR (Application Not Responding). You provide a sample solution to put them into child threads so that the main thread can continue without any interruption for user interaction.
- If the lengthy operations need to update the view in the main thread, child threads cannot do that directly. A message handling scheme is employed for this purpose to post back the result from child threads to communicate with the main thread for the view update.
You also pass along the recommendations from Android designers to build software applications that will enhance user experiences. With these in mind, hopefully when you come up with your own creations next time, not only development time and efforts are better accounted for, but users will also like the products better. It is suggested you find more details about design philosophy at http://code.google.com/android/toolbox/philosophy.html.
- Download and save the entire software project
- Android - An Open Handset Alliance Project at http://code.google.com/android/
- Android Development Community at http://www.anddev.org
- Androidlet at http://www.androidlet.com
About the Author