Questions tagged [fusedlocationproviderclient]
164 questions
0
votes
0 answers
GPS Accuracy issues in mobile apps
i am developing an mobile app [as part of project] which computes live location (using phone gps) every 10 seconds using flutter and native android location libraries and calculates distance of our current location from a fixed gps point (whose…

Naveen
- 1
- 2
0
votes
1 answer
Android battery consumption in case of frequent call of fusedLocationProviderClient lastKnownLocation?
I have this use-case of sending the user's location when I hit a certain API. As this API call is frequent, I want to avoid the battery consumption of the app.
I am okay with using the lastKnownLocation of the user and sending the same.
fun…

Ritt
- 3,181
- 3
- 22
- 51
0
votes
1 answer
Obtain GPS or Network provider from Fused Location Provider
I'm using a location service in the background using Fused Location Provider, it returns "fused" when I call the method getProvider() instead of Network or GPS. Is there a way I can get the provider from this?
I know that using LocationManager with…

rodolfo
- 3
- 1
0
votes
1 answer
getLastLocation() returns a random location in the middle of russia
I war trying to send users last know location over SMS, but lastKnownLocation() keeps returning either null or a random location in the middle of nowhere off the coast of russia any help is appreciated!
I was earlier trying to getLocation via…

Malhotraji
- 3
- 1
0
votes
1 answer
Get New User Location in Kotlin Not working
Good day everyone,
I have built code from a tutorial similar to what is below. However, with the new Kotlin update it wont allow you to run fusedLocationProviderClient.requestLocationUpdates(parameters) without a permission check, which I am not…

Lyndon2309
- 49
- 8
0
votes
0 answers
Location update takes a long time after reboot, using FusedLocationProviderClient
I'm using the FusedLocationProviderClient to access the lastLocation of the user. If it's null, I'm waiting for requestLocationUpdates to return.
I've tested this on my Pixel 3a by rebooting the device, which clears the last location, however it…

JamieNewman
- 917
- 1
- 12
- 20
0
votes
0 answers
I am new to android services and I have some questions
I want to develop a service that will work in background even the app gets killed. In my scenario I am getting location updates using fusedlocationproviderclient and sending it to database. The problem is that when I put app to background using…

AloneGun
- 1
- 2
0
votes
2 answers
Does FusedLocationProviderClient need to initialize? location often null
I am using FusedLocationProviderClient to get GPS location but I've noticed that it is often null, especially on the first couple of location pulls. Does it need to initialize for it to pull the location on the first try? Here is the code I'm using…

Tom
- 717
- 2
- 6
- 23
0
votes
0 answers
Fluctuation of GPS Altitude stops when second app is running
I have developed an Android app for recording (paraglider) flights and the altitude recording from (GPS-) location data is usually fine.
But now I got a complaint that the recorded altitude is fluctuating heavily. (Android 10 on Pixel 3a)
The…

user2808624
- 2,502
- 14
- 28
0
votes
0 answers
FusedLocationProviderClient giving noisy location data
I have been using the FusedLocationProviderClient (FLP) and testing it's accuray.
I keep getting systematic erratic readings. I suspect it's location fixes provided by cell towers, but they are far too noisy. Does anyone else have this problem?
If…

Jordan Simba
- 1,046
- 7
- 10
0
votes
1 answer
How to extract coordinates from addOnSuccessListener in FusedLocationProviderClient
I need to extract coordinates from addOnSuccessListener method. Help me please with that
fusedLocationClient.lastLocation.addOnSuccessListener { location ->
// I need to return value
}
}

Artem
- 33
- 6
0
votes
1 answer
FusedLocation not trigger locationcallback for android api <= 21
so I want to get the latitude and longitude from the device, but when I build my application on android Lollipop or API 22 I'm not getting the current latitude and longitude. is this because of android permission or what? here is my code
I'm using…

Irgi Ahmad Maulana
- 107
- 2
- 10
0
votes
1 answer
LocationCallback onLocationResult isn't getting called when device GPS is turned on after initializing LocationCallback
I have a foreground service which gets initialized on start of the app and runs even when the app is destroyed. I have initialized LocationCallback inside my foreground service as shown below:
new LocationCallback() {
@Override
…

mang4521
- 742
- 6
- 22
0
votes
1 answer
Activity automatically refreshes after saving coordinates on Firebase?
In my code, I am getting the user's location using FusedLocationProviderClient. In the callback, I am saving the latitude and longitude of the user on Firebase real time database. Everything works fine even when the user moves from one place to…

Hussain Developers
- 13
- 4
0
votes
0 answers
Location Service on Android 10
I am trying to get lat long after some intervals using FusedLocationProviderClient. I have created a service which runs in background. But the issue is that when my device is locked (Screen is off) the device sends about 3-5 lat long and then stops…

Mohammad Saad Abdul Rahim
- 111
- 5
- 10