Android : Can I use fusedlocationproviderapi and force using GPS only?

on Sunday, March 29, 2015


I am using fusedlocationproviderapi in my Android app to transmit the users location. This works fine except sometimes the location jumps to a location in town and later shows that same location. I believe that the app switches from GPS to cell tower trialulation and in our area this does not work well.(MN) I use



<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


in the manifest file and I would be fine with a way to ignore the faulty locations or detect those and not transmit those.



mLocationRequest = LocationRequest.create();
mLocationRequest.setInterval(UpdateSeconds * 1000);
mLocationRequest.setFastestInterval(UpdateSeconds * 1000);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);


I use the above code which works pretty good when I get a GPS location.


0 comments:

Post a Comment