[android-developers] Re: LocationManager - called very often when moving

2011-07-23 Thread Jan Nielsen
, Jan Nielsen j...@air-port.dk wrote: I dont think there is any other programs requesting GPS, I have navigation app, but not running when I tested my app. I only request the update one place and before that I remove any registered listeners. LocationManager mlocManager = (LocationManager

[android-developers] Re: LocationManager - called very often when moving

2011-07-21 Thread Jan Nielsen
I dont think there is any other programs requesting GPS, I have navigation app, but not running when I tested my app. I only request the update one place and before that I remove any registered listeners. LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);

[android-developers] Re: Service Being paused on screen off.

2011-07-20 Thread Jan Nielsen
The common ways to sleep in java, only counts cpu time on the Android platform. So a Thread.sleep(60 * 1000); may become 5 or 10 minutes if the phone is in standby, since it only counts when the cpu is awake. afaik you need to use AlarmManager to get called when the phone is in standby. Even a

[android-developers] LocationManager - called very often when moving

2011-07-19 Thread Jan Nielsen
Hi, I am using this code to request updates. LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, delay * 60 * 1000, 25000, this); delay is a user defined value, but we can assume 1 for this