Good set of questions. I've been wondering many of them myself.. just
waiting to find out when I get to them. Will be nice if someone knows the
specific answers.

On Wed, Jan 20, 2010 at 6:38 AM, Android Development <[email protected]>wrote:

> Hello,
>
> When the device goes to sleep, any activity that was in the foreground is
> paused. It is like someone has launched a black screen activity on top. Is
> this understanding correct ?
>
> I have some doubts on device sleep impact during the following scenarios:
>
> 1. If my device goes to sleep just when some AsyncTask was executing, what
> will happen ? Will the task execution stop and wait till the device turns
> back on ? Or will execution go on as usual ? Same question for Android
> Handlers. As per my understanding, when there is no Wake Lock, then the CPU
> will stop..and so will all scheduling services that use it.
>
> 2. The same question, if i have spawned a custom worker thread which was
> active..and the device slept. What will be the status of my worker thread ?
>
> 3. If the application had bound itself to a network interface (suppose an
> IP address obtained due to a WiFi connection)..and the device goes to sleep.
> Will this connection be lost if I do not take a WiFiLock ?
>
> 4. Affect of sleep behavior on an android service that is currently doing
> some work (downloading something or playing music) ?
>
> 5. Is it possible to test the deep sleep behavior using the Emulator to do
> some sanity testing for my application ? I could not find a way to do so.
>
> 6. In some of the use cases that i have, the screen can be turned
> off...however i want the CPU running for sometime after the screen is dark.
> For such scenarios, is the 
> PARTIAL_WAKE_LOCK<http://developer.android.com/reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK>
>  the best approach  for me?
>
> Thanks in advance
>
> Best Regards
>
> Indodroid.
>
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
-- 
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

Reply via email to