Re: [android-developers] When using LocationManager.requestLocationUpdates, do I need a WakeLock?
Am Sonntag, 10. Oktober 2010 23:50:35 UTC+2 schrieb Mark Murphy: I strongly suspect that you need to hold a WakeLock for as long as you are seeking fixes. I am not aware that any location provider has the ability to wake up the device. Sorry for digging up this ancient topic, but an trying to find an answer to the same question. In my app so I am able to receive location updates even if I put the device to sleep, without explicitly holding a WakeLock. I came across what appears to be the Android 2.2 source of the GpsLocationProviderhttp://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/com/android/internal/location/GpsLocationProvider.java/?v=source, and assuming I did not misinterpret the code, it looks like it is really able to wake up the device via the AlarmManager. Can anyone confirm this? -- 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
Re: [android-developers] When using LocationManager.requestLocationUpdates, do I need a WakeLock?
On Friday, May 11, 2012 4:57:35 AM UTC-7, ste1024 wrote: Sorry for digging up this ancient topic, but an trying to find an answer to the same question. In my app so I am able to receive location updates even if I put the device to sleep, without explicitly holding a WakeLock. I came across what appears to be the Android 2.2 source of the GpsLocationProviderhttp://grepcode.com/file_/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/com/android/internal/location/GpsLocationProvider.java/?v=source, and assuming I did not misinterpret the code, it looks like it is really able to wake up the device via the AlarmManager. Can anyone confirm this? I am experiencing the same thing. My GPS app runs for hours and hours getting coordinates every 6 seconds, whether it's asleep or not. Either WakeLock is not needed for the LocationManager to work non-stop or one of the other apps I have installed is using WakeLock. I'm assuming the latter, since I have Tasker and AutomateIt running, both off which are time-based services. I guess I should check their permissions for WakeLock. Or they could just be waking the CPU via the AlarmManager? It makes me wonder if it's necessary for me to add a WakeLock to my app or just rely on the fact that other apps will keep the CPU alive for me. -- 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
Re: [android-developers] When using LocationManager.requestLocationUpdates, do I need a WakeLock?
Just a followup: Tasker and AutomateIt both do have Prevent device from sleeping (ie WakeLock) as permissions. -- 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
Re: [android-developers] When using LocationManager.requestLocationUpdates, do I need a WakeLock?
On Fri, Oct 8, 2010 at 9:54 AM, iamnoah iamn...@gmail.com wrote: I'm trying to get a definitive answer to this question: http://stackoverflow.com/questions/3814852/android-when-using-locationmanager-requestlocationupdates-do-i-need-a-wakelock Assuming that I receive an RTC_WAKEUP alarm in a broadcast receiver and hold a wake lock until I have called requestLocationUpdates, is there any need to retain the wake lock to continue to receive updates in a timely fashion? My guess is that there is not, as having to retain a wakelock would cause all kinds of problems for long running location checks, but an authoritative word from a platform developer would be good to have as the documentation is completely silent on this topic. I strongly suspect that you need to hold a WakeLock for as long as you are seeking fixes. I am not aware that any location provider has the ability to wake up the device. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 3.0.1 Available! -- 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