Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Geofencing API bug with GPS?

I found some people reporting a similar issue but no answers for that.

I'm using the android Geofencing API released in Google I/O 2013. I followed the "Creating and Monitoring Geofences" lesson and its sample.

When I use this API with wi-fi coverage it works perfectly. The problem is when I'm outside. It never used the GPS to track the location however the GPS sensor is turned ON.


The only way I found to manage this is by forcing the app to use the GPS by calling

mLocationClient.requestLocationUpdates(mLocationRequest, mLocationListener);

and with mLocationRequest with a priority of high accuracy

mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);

By forcing the GPS usage it works good but I need to stop its updates programmatically.


My questions are:

1) Shouldn't the API be aware of when to use or not the GPS sensor?

2) Does the Geofence radius affect the sensors that the API use?

3) For those who might got it work properly: does the GPS sensor "blinks" when it's the only sensor turned on ?

I'm struggling to get more documentation for this API, so I would like to know your experience. Thanks in advance ;)

like image 226
Derma Avatar asked Nov 12 '22 22:11

Derma


1 Answers

did you got this up and running? I tried the same sample but i got it running properly on when i turnned the google maps app on. Thanks MArlus

like image 148
Marlus Misael Avatar answered Nov 15 '22 02:11

Marlus Misael