I am observing a serious side effect of the requestLocationUpdates method, 
both inside my own applications as well as towards other applications on my 
device.
 
I am using two location requests in my application:
a) requestLocationUpdates
b) addProximityAlert
 
a) Calling 
myLocationManager<eclipse-javadoc:%E2%98%82=TrackLoc/C:%5C/android-sdk-windows%5C/platforms%5C/android-4%5C/android.jar%3Candroid.location(LocationManager.class%E2%98%83LocationManager>
.requestLocationUpdates("gps", 120000, 200, intent1) does what it should do. 
intent1 is fired every 2 minutes, given the location has changed 200 meters, 
minimum. GPS receiver is enabled every 2 minutes, saving battery in the mean 
time.
 
b) Calling 
myLocationManager<eclipse-javadoc:%E2%98%82=TrackLoc/C:%5C/android-sdk-windows%5C/platforms%5C/android-4%5C/android.jar%3Candroid.location(LocationManager.class%E2%98%83LocationManager>.addProximityAlert(latitude,
 
longitude, radius, 2000000000, intent2) on itself does what it should do. 
intent2 is fired as soon as the device enters or leaves the defined area. 
GPS receiver is permenantly enabled, as long as the screen is active.
 
Using both a) and b) in the same application, a) has a side effect on b).  
GPS receiver is enabled every 2 minutes, proximity is checked every 2 
minutes, only.
 
Even worse, using a) in my application has a side effect on other 
applications on my device, e,g, a map application or a restaurant finder. 
Those applications can not receive GPS information in the mean time between 
the 2 minutes time frames. I am strongy hasitating to distribute an 
application with such a serious side effect.
 
Has this been observed by others? Is there any way around?
 
P.S. I am using LG P500 Optimus One with Android 2.2
 

-- 
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