Questions tagged [android-fusedlocation]

Synonym for Android Fused Location Provider which intelligently manages the underlying location technology and gives you the best location according to your needs.

Fused location provider:

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

  • Simple APIs: Lets you specify high-level needs like "high accuracy" or "low power", instead of having to worry about location providers. Immediately available: Gives your apps immediate access to the best, most recent location.

  • Power-efficiency: Minimizes your app's use of power. Based on all incoming location requests and available sensors, fused location provider chooses the most efficient way to meet those needs.

  • Versatility: Meets a wide range of needs, from foreground uses that need highly accurate location to background uses that need periodic location updates with negligible power impact.

Tutorials:

328 questions
1
vote
1 answer

Now that FusedLocationApi is deprecated how can i implement FusedLocationProvideClient when i also have location listener?

I'm building a class that tracks orders origin to deliver packages, im getting an error message that states that FusedLocationProviderApi is deprecated and seems now i have to use FusedLocationProviderClient instead, when i applied…
1
vote
0 answers

Foreground service stops after some time if phone kept in sleep mode

I have developed an application that tracks user's location and records the distance traveled by the user. To make the app robust, I have used foreground service that spawns a thread with a handler inside it. The FusedLocationProvider sends location…
1
vote
0 answers

FusedLocation is not always accurate

I'm developing an app for my work. It's main goal is to verify if workers are in the place they're supposed to be. So, they Check-in at a pint of sale, and immediately a tracking Job is fired, getting user's location every hour. When they leave the…
1
vote
1 answer

FusedLocationApi not providing the proper location sometimes

I am developing an application that is highly dependent on user location and geo fencing. I am trying to get the user location first and based on that further operations are carried out. Everything is working fine except for the fact that, some…
Animesh Jena
  • 1,541
  • 1
  • 25
  • 44
1
vote
2 answers

Google play service sample not getting location offline

I'm working on location based app. I am using LocationUpdatesForegroundService sample code. Which is a Service to get location details At some case location are not getting. like. GPS and Internet are on I'm getting location details. but, GPS and…
1
vote
3 answers

How to wait for requestLocationUpdates() callback intent to finish?

I want to wait for the callback intent in FusedLocationProviderClient.requestLocationUpdates() to finish. Is a while loop with a timeout the best solution? Below is an example, sans timeout. Normally I would use startWakefulService() to wait for an…
paperduck
  • 1,175
  • 1
  • 16
  • 26
1
vote
1 answer

How to find location name from given lattitude & longitude?

I am trying to get location name or address. I have successfully fetched the latitude and longitude by Google Fused Location API. Now I want to fetch the location address (example : City name,Road no, or specific address) by using the latitude and…
1
vote
1 answer

FusedLocationProviderApi: how does LocationRequest.setPriority work with "Location mode" device setting?

Two questions: How does setting LocationRequest.setPriority(priority) work with the "Location mode" device setting? If application calls LocationRequest.setPriority(PRIORITY_HIGH_ACCURACY) is called and device setting is set to "Battery saving", I…
Don Box
  • 3,166
  • 3
  • 26
  • 55
1
vote
3 answers

Why does Android return a "stale" location after a "fresh" one?

I have a location-aware Android app that uses the FusedLocationApi for location management. When the app needs to get its location, it first fetches the last known location. If the location is not older than a minute, it uses that, otherwise it…
Gitahi Ng'ang'a
  • 901
  • 3
  • 10
  • 23
1
vote
1 answer

Android Fused Location API problems when requesting location for the first time

I have an app that needs to get location to work and everything goes smoothly except when (from what i've gathered researching about this) my app is the first one to request a location and no lat and long have yet been retrieved. How can I get…
1
vote
0 answers

run fused location geocoder into asynctask

i am pretty new to android an now i want that my app show the Address (from coordinates (fused location is used)). at the moment the UI is hanging when i try to get the address and the mobile network quality poor. after a few seconds the address is…
1
vote
1 answer

Stop location updates if the device has not moved and if it moves a distance of 300m then get it's location

i am making an android application. I want to stop location updates if the device is still and if it moves a distance of 300 or 400m then get it's location again. I don't want to check continuously for location updates and measure distance between…
1
vote
1 answer

Is getLastLocation() make a request for the current location?

I'm using google api fused location. I would like to get the current location with high accuracy without continuously track location with LocationListener interface. I have a simple use case : A user tap on the button, the application would display…
CuirMoustachu
  • 121
  • 2
  • 10
1
vote
1 answer

Does Fused Location Provider not work without wifi or is it just less accurate?

I read in this document the following [...]"Google introduced its Fused Location Provider (FLP) [42]; however, these techniques depend on Wi-Fi for fine-grained results, which is not always available." source:…
1
vote
2 answers

Unable to view current coordinates on button click in android studio

I am creating an app which will get a user name from DB and print the ID and then on button click it will show the current GPS coordinates. I have implemented it but don't know why its not working. Here is my Manifest file
Moeez
  • 494
  • 9
  • 55
  • 147