The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs.
Questions tagged [fusedlocationproviderapi]
436 questions
3
votes
1 answer
FusedLocationProviderApi.KEY_LOCATION_CHANGED deprecated. What to do now?
I had a LocationReceiver which used FusedLocationProviderApi.KEY_LOCATION_CHANGED to extract a Location from an Intent. But now KEY_LOCATION_CHANGED is deprecated what should I change it to?
Current code:
@Override
public void onReceive(Context…

MidasLefko
- 4,499
- 1
- 31
- 44
3
votes
0 answers
Android Fused Location API Location Not Accurate
I am using Fused Location API for one of my app. I have set the priority to LocationRequest.PRIORITY_HIGH_ACCURACY. When I set interval/fastest interval to few milli seconds, what I observe is that GPS is on all the time and I get Lat Lng with…

Mandeep Rajpal
- 1,667
- 2
- 11
- 16
3
votes
1 answer
Default accept "Improve Location Accuracy" popup when Google play services is updated [ROOT]
I have an application which is installed in the phones cab drivers use to track the location and distance traveled by the cab. (The phone is rooted and we have all privileges on the phone). In the first implementation of our application we used…

nagamanojv
- 301
- 5
- 16
3
votes
2 answers
How to track if user has intentionally turned off location, using Fused Location Provider API
I have used the Fused Location Provider API to get user's current location.Things work well when the user has turned location on.
But I want to provide a message to the user if he has turned location off. When location is turned off, the…

maya
- 159
- 1
- 17
3
votes
1 answer
GoogleApiClient won´t connect
I want to use the FusedLocationProviderApi to get the last known location. I did it like the Google tutorial says, but it seems, that the GoogleApiClient dosn´t connect, at least it dosn´t trigger either the onConnected nor the onConnectionFailed…

Luca Thiede
- 3,229
- 4
- 21
- 32
2
votes
1 answer
Background locations on Wear OS 3 on Galaxy Watch 4
I have 2 apps that require background location. One is for Golfing, and one is for Sailing. In sailing you probably dont have the phone connected. In Golf it continuously connects and disconnects.
So what I found out is that the Wear OS simulator…

Pieter Oskam
- 61
- 3
2
votes
0 answers
Map fragment doesn't move to current location when Recreated
Greetings to the community. This is my first question, please guide me if I did any mistake.
I have four fragments in my app. An activity(Main Activity) that hosts all the four fragments.
Google Maps Fragment
Fragment two
Fragment three
Fragment…
2
votes
1 answer
Location Services Work But Not Once The User Grants Permission
So I used a tutorial and pretty much copied and only changed a little if the user grants permission the app works after the user leaves the app and comes back. If they open the app and grant permission nothing happens, also if they deny permission…

Miasto
- 33
- 4
2
votes
1 answer
Which is a better method to check if user's location(android app) is inside a polygon
I am building an android app(Geofencing) wherein I need to check if the user's location is within a given polygon. The application can tolerate some delays in detection but has to be battery efficient.
What I am currently doing is as follows - Set…

Jeetendra Gan
- 165
- 13
2
votes
1 answer
Android FusedLocationProviderClient.requestLocationUpdates() returning same location coordinates
I found two types of question like this one on SO, but both have no answers.
I'm using FusedLocationProviderClient to get the location of my device. I've lunched a background service to get the location using requestLocationUpdates().
Even when the…

Mohamad Mousheimish
- 1,641
- 3
- 16
- 48
2
votes
1 answer
Getting current location on Android
I want to find out where my location is currently on the device connected to my computer, but since my location has not changed, it does not fall into the onLocationChanged function and therefore returns location = null. How do I enter the…

freud
- 25
- 5
2
votes
0 answers
LocationCallback leak in Android Kotlin
I am receiving an alert from Leak Canary stating that there is a leak coming from locationCallbacks. I have tried everything including making the locationCallback object itself a weak reference, which just causes a crash as it is deallocated…

paul_f
- 1,296
- 17
- 20
2
votes
0 answers
Fused Location provider api stops sending location update after several hours
Trying to get location update every 5 mins to track the location of the users.
Tried setting priority as PRIORITY_HIGH_ACCURACY, removed setExpirationDuration and using Foreground service
Location Service Class
public class ForegroundLocationService…

user1482953
- 181
- 2
- 2
- 9
2
votes
1 answer
Fused Location Provider - getting high accuracy
I'm trying to find a way to improve the accuracy obtained from Google Play Services's Fused Location Provider.
I'm testing an app that uses LocationServices and allows the user to choose from a set of update frequencies (every 30 seconds, every min,…

favq
- 739
- 1
- 11
- 25
2
votes
0 answers
Get FusedLocationProviderClient BroadcastReceiver to restart on boot completed
I've managed to implement background location updates using FusedLocationProviderClient PendingIntent and BroadcastReceiver inside my MainActivity class but when I restart my phone I am unable to get it triggering again.
I added

snowcheese
- 21
- 2