Am Mittwoch, 9. Mai 2012 16:11:56 UTC+2 schrieb Nadeem Hasan:
>
> Your phone is using wifi as the location source. If wifi is set to stay up 
>> during phone sleep, LocationManager will continue to provide updates unless 
>> you remove your location update subscription in onSuspend().
>
>
I tried the same this time with disabled WIFI, using the GPS location 
provider instead, and I also continued to receive location updates during 
sleep.

So does the location provider subscription keep the CPU awake all the time 
or only during certain intervals when it tries to get a location fix?

The LocationManager 
documentation<http://developer.android.com/reference/android/location/LocationManager.html>is
 rather vague on that, it only mentions something like that in the 
documentation for 
public void addProximityAlert (double latitude, double longitude, float 
radius, long expiration, 
PendingIntent<http://developer.android.com/reference/android/app/PendingIntent.html>intent)
 :
>
> In case the screen goes to sleep, checks for proximity alerts happen only 
> once every 4 minutes. This conserves battery life by ensuring that the 
> device isn't perpetually awake. 
>
However, I am not using that function, and also I get uptates as often as 
once per minute.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to