Questions tagged [fusedlocationproviderapi]

The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs.

436 questions
4
votes
1 answer

How to get location using Fused Location Provider in android using Network?

I have been trying to get location (lat/lon) using Fused Location Api in andriod. My code works fine when both wifi and gps are on. If I turn off the gps then i don't get any location update. I am using BALANCED_POWER_ACCURACY for location…
4
votes
3 answers

Android FusedLocationProvider stops giving location when phone is idle

I'm working on location tracking application using FusedLocationProvider. I have a background service which tracks location of phone in every 5 minutes. All works well with it, but once the phone goes idle then after 3 to 4 hours of time, the…
4
votes
0 answers

Track GPS Route accurately Android

I am writting an application to tracks users real time location and show it on map. However the results I am seeing are not satisfactory. When I compare my app with others present on play store the difference is a lot. Here are the things which I…
4
votes
1 answer

Fused location provider behavior in Android 5.0 unexpected

I am trying to make use of android fused location provider to get the device location every 30 minutes using PRIORITY_HIGH_ACCURACY. What is surprising to me is that, When GPS is disabled, I am expecting the API to make use of network provider and…
Kaps
  • 2,345
  • 2
  • 26
  • 37
4
votes
0 answers

Android Fused Location Api is not using GPS even with PRIORITY_HIGH_ACCURACY?

I am developing a tracking application for buses, I need to use GPS only, I followed this tutorial , however it only use network location not GPS even when using PRIORITY_HIGH_ACCURACY !! protected void createLocationRequest() { mLocationRequest…
4
votes
1 answer

Dynamically Change setPriority in Android Location Services

I have some code where a service starts the Google Play Services Location/Activity, when the Activity intent is called, I want to change the setPriority for the Location service. // Location mLocationRequest = LocationRequest.create(); …
eWizardII
  • 1,916
  • 4
  • 32
  • 55
4
votes
2 answers

Location client's priority against setInterval,setFastestInterval and setSmallestDisplacement?

If locationClient.setInterval(60*1000); locationClient.setSmallesDisplacement(10); locationClient.setFastestInterval(1000); is given, then when will the updates be called? If user have moved 10mts within 60secs, will location updates…
3
votes
1 answer

Background location update BroadcastReceiver not triggered

Even though Android documentation insists heavily on not using background location updates, my app really needs them, so I updated everything to request permissions properly and abide by the new rules. Now once I have ACCESS_BACKGROUND_LOCATION…
Sebastien
  • 3,583
  • 4
  • 43
  • 82
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

How to return fusedLocationProviderClient().lastLocation as flow from a function in kotlin coroutines

What i am doing So i am developing a weather forecast application in which i am accessing the device location using fusedLocationProviderClient.lastLocation and most of us knows that the location provider return a task, so for that i am using…
3
votes
0 answers

Location doesn't update after changing the location on emulator (Google Maps API)

I am currently developing an app that requires your current location. I am using the Google Maps API and my problem is that when I run the app on a real phone, it gives the correct location, but when I am using the emulator it continues to give me a…
3
votes
1 answer

Customise alert message for Location Services when using FusedLocationProviderApi

I am using Fused Location Provider API to get device location in my project. When the location services are off it shows an alert dialog asking the user to turn it on. Is there any way to customize this alert dialog to show a different…
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

Location call backs not stopping after calling removeLocationUpdates

I am receiving location update through this class everything working fine, except sometimes location callbacks don't stop after calling StopLocationUpdate(). Please help me to rectify the bug. I have checked answers available to stop location…
3
votes
0 answers

Work Manager problem with Periodic Work Request and Location Updates

Work Manager version : 1.0.0-alpha08 i tested it for many days it worked fine. But now its not working properly. Actually I was fetching device location at interval of 15 minutes and sending it to the server. So I used Periodic Work Request for…