On Thu, Sep 16, 2010 at 11:49 AM, Samuh <[email protected]> wrote: > 1. What is causing these exceptions?
Probably because of this: > The IntentService class fires a few AsyncTask from its onHandleIntent() > callback. IntentService already uses a background thread for onHandleIntent(). Hence, do not use AsyncTask -- just execute your code in onHandleIntent(). > 2. How can such exceptions be avoided? Do not use AsyncTask -- just execute your code in onHandleIntent(). Also, you might consider using a WakefulIntentService, or your own pattern derived from it, to keep the device awake while you are doing work: http://github.com/commonsguy/cwac-wakeful > 3. What happens when the device sleeps? All processes and threads are suspended. > 4. I've read somewhere that if the network connectivity is through > WiFi, it is disabled when the device sleeps. Correct. > What are the cases that a > developer should take care of when a device wakes up? That is impossible to answer in the abstract. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

