fusedlocationproviderapi

ACCESS_COARSE_LOCATION permission gives a cell tower precision on Android

那年仲夏 提交于 2019-11-27 04:05:29
I am making some tests with the requestLocationUpdates() function from the FusedLocationApi . I am using the PRIORITY_BALANCED_POWER_ACCURACY . A city block precision is fine for me. When I request the ACCESS_FINE_LOCATION permission, I get around a 100m precision which is great with GPS off. As I do not need a GPS precision but a city block precision, I would like to request only the ACCESS_COARSE_LOCATION permission. However when I request the ACCESS_COARSE_LOCATION permission, I get a 2 km precision. It seems that the device does not use anymore the Wifi permission and only a cell tower

Fused Location Provider setsmallestDisplacement doesn't work in Android

守給你的承諾、 提交于 2019-11-27 01:20:43
问题 Hi I have implemented Fused Location provider Api for getting location updates in a service. I was able to get the onlocationchanged event fired according to the interval set. However when i set the setsmallestDisplacement to 10 metres, the event is getting fired even if the device is still. Does any one have problem similar to this. please provide suggestions. Below is the code mlocationrequest = LocationRequest.create(); mlocationrequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);

Why is FusedLocationApi.getLastLocation null

强颜欢笑 提交于 2019-11-26 13:45:50
问题 I am trying to get location by using FusedLocationApi.getLastLocation and I've got the location permissions in the manifest file: <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> However, I am getting null when I request the location from the system. I was just testing turning off and on location services so it may be related to that (of course, it's ON when I'm trying this). But even after

ACCESS_COARSE_LOCATION permission gives a cell tower precision on Android

淺唱寂寞╮ 提交于 2019-11-26 10:58:40
问题 I am making some tests with the requestLocationUpdates() function from the FusedLocationApi . I am using the PRIORITY_BALANCED_POWER_ACCURACY. A city block precision is fine for me. When I request the ACCESS_FINE_LOCATION permission, I get around a 100m precision which is great with GPS off. As I do not need a GPS precision but a city block precision, I would like to request only the ACCESS_COARSE_LOCATION permission. However when I request the ACCESS_COARSE_LOCATION permission, I get a 2 km

Android play services 6.5: LocationClient is missing

我与影子孤独终老i 提交于 2019-11-26 06:39:18
问题 After updating to Google Play Services 6.5.87 my app was failed to compile because of missing LocationCLient class. The documentation link is corrupted at the moment (404 Not Found) How can I fix it? I want to receive location updates, work with geofences, etc.. 回答1: The LocationClient class has been replaced with the new FusedLocationProviderApi and the GeofencingApi, both of which use the common GoogleApiClient connection technique to connect to Google Play Services. Once you are connected,

Best way to get user GPS location in background in Android [duplicate]

随声附和 提交于 2019-11-26 01:30:34
问题 This question already has an answer here: Get GPS location via a service in Android 6 answers In my android app i want to get user current location every few minute interval and update in to my center server using web service. Currently i am using Fused Location Provide for get user current location, See link now i want to know what is the best way to get user location frequently and call web service. below is my code which gives me user current location: - locationrequest = LocationRequest