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
7
votes
1 answer

FusedLocationApi with PendingIntent for background location updates. Unable to receive updates

The sample source code from google was to easy to implement continuous location updates on frontend, but I still can;t get or understand clearly how the background location updates work using FusedLocationApi and PendingIntent. LocationService…
7
votes
1 answer

Setting mock location in FusedLocationProviderApi

I'm trying to get mock updates from FusedLocationProviderApi, but I can't seem to make it work. This my set up method in android instrumentation test: locationProvider = new…
7
votes
1 answer

How to get FusedLocation from IntentService

How to retrieve current location by using the new FusedLocation API from an IntentService? How can i make sure that IntentService will receive all callbacks from FusedLocation API? ie, How can i obtain the location object synchronously?
6
votes
2 answers

FusedLocationProviderClient always reports LocationAvailability false

I have an app which has been live for a couple of years now, but lately, I've been getting reports about the location system not functioning properly. I have tracked the issue down to the LocationCallback.onLocationAvailability(availability:…
6
votes
2 answers

Android: Use FusedLocationProviderClient to get location once?

With FusedLocationProviderApi being deprecated, I'm having a hard time using FusedLocationProviderClient to get location of a user just once after a button click.
6
votes
0 answers

LocationSettingsStatusCodes.RESOLUTION_REQUIRED

I'm using FusedLocationAPI it is working properly but when user disabled location i'm using SettingsApi to show dialog to user to enable location. In marshmallow and above devices it is working fine but in kitkat if location is enabled or disabled,…
6
votes
1 answer

FusedLocation API - onLocationChanged is not called

The flow in our app is the following: show a fullscreen activity explaining to the user why we need the GPS-location acquire the permission for GPS display loading spinner get first geolocation send first location to server load relevant data from…
6
votes
1 answer

Android - Fused Location Provider API issues with satellite information (count, signal, etc)

I am working on a project where we are trying to track the position of a device and keep the data for later use. Before I talk about the issue I would like to provide some background. By searching around StackExchange and Google and everywhere else,…
6
votes
1 answer

Android Fused Location Won't Deliver Periodic Updates

I want to get a hard location fix every certain minutes & a soft location fix every certain minutes and if user has moved more then certain meters. I been testing the logic with following piece of code walking (tried it with larger parameters as…
6
votes
0 answers

FusedLocationApi Background Location service stops receiving updates randomly

i'm trying to use FusedLocationApi with pending intent to get period location updates so i can send the data to some server for processing. Everything works. However, there are some instances where the broadcast just stops receiving. I would need to…
5
votes
1 answer

Android FusedLocationClient does not request new samples

How to force FusedLocationProviderClient explicitly ask for a new location? A few months ago, I upgraded the FusedLocationProviderClient. Ever since, requesting to sample a new location won't provide a new one. // Request a single location. // …
5
votes
1 answer

Getting last location, so many ways

When I check Android tutorials and/or the Android official documentation, it seems multiple different ways are there to query location. I am confused as I am not sure which way is the right way or if documentation is outdated. For example, 1)…
Snake
  • 14,228
  • 27
  • 117
  • 250
5
votes
1 answer

Android Location "going for a walk" by itself

I am working on the GPS part of a project and I would like to get something past the community. I have searched around for all the typical GPS "jumping and drifting" and I have worked on improving what I get but last week I got some really weird…
5
votes
1 answer

Android background location update is not coming when the screen is off

We are working on mobile tracking app. For location updates, Fused location API is used with High Accuracy as priority. Location update is required even when the screen is off. So, we are using background Service. Background Service is also…
4
votes
1 answer

RequestLocationUpdates() with no location updates on Foreground for Android 12 +

I'm currently working on a location feature to track device location using FusedLocationProviderClient. When App is visible the tracking is working as intented on all Android versions. But when switching to foreground (app not visible), location are…
1
2
3
21 22