Questions tagged [fusedlocationproviderclient]

164 questions
4
votes
1 answer

How does FusedLocationProviderClient.getCurrentLocation work? CancellationToken

I'm trying to request the current location, and if the task goes wrong, call if location is on. private void getCurrentLocation() { fusedClient.getCurrentLocation(LocationRequest.PRIORITY_HIGH_ACCURACY, new CancellationToken() { …
4
votes
1 answer

Android Fusedlocationproviderclient not working with APN Sim its working with Wifi or ordinary internet or Offline

Android Fusedlocationproviderclient not working with APN Sim (which means private internet, not all can access ) it's working with Wifi or ordinary internet (which means global mobile internet) and I also try Location manager (Play service does not…
RDY
  • 613
  • 1
  • 9
  • 25
4
votes
1 answer

Where does FusedLocationProviderClient fit in MVVM on Android?

I am working on an Android application where I have to display weather data to users when they start the app. I'm following MVVM architecture and have successfully followed MVVM in all the use cases I have implemented including displaying data to…
Abdul Mateen
  • 1,418
  • 1
  • 14
  • 32
4
votes
0 answers

fusedLocationProviderClient requestLocationUpdates with pendingIntent does not fire

I am trying to run a location tracker in the background. To do this, i read i need to use pendingIntent with fusedLocationProviderClient, so that my app will continue to query the user's location every x seconds, even if the app is…
4
votes
1 answer

FusedLocationProvider gives wrong location sometimes

I am using FusedLocationProviderClient to get location updates in a foreground service. On testing and observing for few days, I found wrong locations which was far away from my actual location by around 4 kms similar to this, but the LocationResult…
4
votes
0 answers

FusedLocationProviderClient requestLocationUpdates doesn't trigger LocationCallBack for API 23 above

I have run out of possible ways on how to solve this issue. I am technically using the same code that is working in API 23 and above before I made tweaks on my app. The callback (in the requestLocationUpdate) does not trigger in phones that are…
4
votes
3 answers

Does FusedLocationProviderClient leak memory?

in one of my activity, I am using the FusedLocationProviderClient to get constant location update. My codes are based on this method: https://developer.android.com/training/location/receive-location-updates In my onCreate, I setup the provider and…
Chao Li
  • 391
  • 1
  • 2
  • 13
4
votes
1 answer

FusedLocationClient doesn't stop searching for gps after request

My FusedLocationProviderClient is not stopping after I call fusedLocationClient.removeLocationUpdates(locationCallback); The GPS location icon shows indefinitely in the notification bar until I manually terminate the service. I am calling…
TheChubbyPanda
  • 1,721
  • 2
  • 16
  • 37
4
votes
2 answers

Updating location using FusedLocationProviderClient, JobScheduler and JobService

I'm trying to create background location tracking service using new FusedLocationProviderClient with JobScheduler and JobService. I've read here that we should use requestLocationUpdates (LocationRequest request, PendingIntent callbackIntent) for…
3
votes
2 answers

Android FusedLocationProviderClient suddenly no longer calling callback with Location

About two weeks ago, several areas of our app stopped working randomly, specifically those that relied on up to date location. This is happening on multiple devices, both real devices and emulators. Before this, it was working every time.…
3
votes
1 answer

FusedLocationProviderClient Background Service for Android 9 and Later

I am trying to get location after every 10 second using FusedLocationProviderClient, However when i minimize the app or terminate it the location updates stops. Below is my code. Right now i am using android 9.0. I have no idea why this is happening…
3
votes
1 answer

Is com.google.android.gms.location.LocationCallback an Interface or Class?

I want to get Location Updates using this method : FusedLocationProviderClient#requestLocationUpdates(LocationRequest locationRequest, LocationCallback locationCallback, Looper looper) And most of the answers in Stackoverflow implementing this…
3
votes
1 answer

Requesting location updates using FusedLocationProviderClient is not working, callback is never called

I'm trying to use Firebase Cloud Messaging to send a command to my Android app that prompts it to determine its current location. This is done in the class "FCMService". The class "SingleShotLocationProvider" then performs the actual work by…
DeBukkIt
  • 86
  • 1
  • 7
3
votes
2 answers

FusedLocationProviderClient constructor is marked as internal

I just updated my Google dependencies to 12.0.1 and now I'm getting this error where I'm using FusedLocationProviderClient. Any idea why is this happening? Looking into source code, I can see the the constructors are now hidden: @Hide public…
Guy
  • 6,414
  • 19
  • 66
  • 136
2
votes
0 answers

How to get location updates using FusedLocationProviderClient?

I'm an Android noob and also this is my first post on stackoverflow. I've been trying for some time to find a solution to my problem but couldn't find anything so that's why I'm asking here. I'm trying to make an app that has a courier activity and…
1
2
3
10 11