Questions tagged [fusedlocationproviderclient]
164 questions
0
votes
1 answer
Android studio (Kotlin) Get X and Y coordinates of device in class
I have made a Location class myself with two Double val's (the longitude and latitude)
Now in an empty constructor I would like to use a FusedLocationProviderClient to get the device's current location which I then store in the two val's to…

HobbyProgrammer123
- 21
- 1
- 5
0
votes
1 answer
How accuarated is coarse location?
So, my app depends on users to be in a certain area, lets say 2km by radius, I was using GPS with high accuarcy to determine if the users were inside this radius, but for some reason, some users are experimenting delays on the loading screen doing…

SNM
- 5,625
- 9
- 28
- 77
0
votes
1 answer
Requesting location using FusedLocationClient in a Foreground Service inAndroid
I am trying to get the current location of the device in foreground service using the Fused Location Provider Client in Android O. But the service is killed right after location request is made. I am thinking the service is killed because the fused…

Harith Sankalpa
- 1
- 2
0
votes
0 answers
FusedLocationProviderClient getLastLocation elapsedRealtimeNanos is sometimes strange
I have the same problem with this.
FusedLocationProviderClient getLastLocation elapsedRealtimeNanos mostly current system time
My code currently compares the time value of location by FLP getLastLocation() with the current time value and requests a…
0
votes
1 answer
Get Location Updates in Background Service - Android Studio
after researching the Android Location FusedLocationProviderClient I am very confused about what you should and should not do!
The use case is: The App holds different locations with latitude and longitude. While the user is walking around the app…

user1827421
- 51
- 1
- 7
0
votes
0 answers
Android Don't execute anything until location variable exists
Goodmorning,
I've tried to implement the method that request permission first and than execute something but without success ...
Here is my MainActivity code:
public class MainActivity extends AppCompatActivity {
public static String…

Cristian Capannini
- 15
- 1
- 5
0
votes
0 answers
FusedLocationProviderClient getSpeed Latency
iam implementing an speedometer and try to get the current speed of the device.The idea is as soon as the device is moving i want to display the speed. Even with the following settings, i notice a latency of a second until the actually speed is…
user12424231
0
votes
0 answers
unable to fetch current location in android after installing second time
Im developing a uber clone app the problem im facing is as mentioned above when i install the app on a device on which it isnt installed already it fetches my current location and shows and even tracks my movements, but when i log out or come out of…

Suraj Kamble
- 13
- 6
0
votes
0 answers
FusedLocationProviderClient Can not update location
I am Using Fused Location Provider Google API to update location for my app, but it got the same location although I moved device when I got value. Please help me find my wrong?
I'm using the button in ExpandableListAdapter. When user click the…
0
votes
1 answer
Android device is stable-at one place only but still getting km traveled as more than 2Km sometime
I am developing an App into which i am taking user current location using FusedLocationProviderClient. something like below code.
I am not able to understand why it takes current location as different location sometimes its 2+KM far away from…

Android Dev
- 31
- 4
0
votes
0 answers
Android FusedLocationProviderClient : slightly off position
We are using FusedLocationProviderClient to fetch GPS location continuously in our app. We find that the location provided is slightly off (about 200mtrs) and delayed by about 15-20secs. This causes problems while driving.
The code snippet is below.…

Krishnan VS
- 1
- 4
0
votes
1 answer
How to only update location based on minimum location accuracy
I'm currently developing a location tracking app requiring high accuracy location updates.
This is my very first app and I might be in over my head but I am learning as I go.
The accuracy that I'm getting from the fusedLocationProviderClient when…

tom
- 3
- 2
0
votes
1 answer
FusedLocationProviderClient returns inaccurate locations
I am using Google's fusedlocationproviderclient to track location of user in real time on android using a foreground service.
I have noticed some times fusedlocationproviderclient returns same locations multiple times in a row.
As of now I am…

onkar vhatkar
- 46
- 2
- 8
0
votes
1 answer
How to get dependencies right for WorkManager and LocationServices?
I've been unable to get the dependencies right for an app that uses a worker for obtaining device locations. I suspect that I'm using the wrong location service with androidx, but I haven't found anything else. Here's my build.gradle:
apply plugin:…

Lars H
- 49
- 6
0
votes
0 answers
"Call requires permission which may be rejected by user" when using fusedLocationProviderClient
I understand you need to check if the user has allowed location before performing methods on fusedLocationProviderClient. So I created a global method like so:
fun locationAllowed(context: Context): Int {
if…

Zorgan
- 8,227
- 23
- 106
- 207