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
90
votes
7 answers

Android LocationServices.FusedLocationApi deprecated

I couldn't figure out why LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient,mLocationRequest, this); "FusedLocationApi" is cross out and point at it saying is deprecated. Click here to view Image import…
vvvv
  • 1,003
  • 1
  • 8
  • 6
44
votes
14 answers

Why is FusedLocationApi.getLastLocation null

I am trying to get location by using FusedLocationApi.getLastLocation and I've got the location permissions in the manifest file:
42
votes
5 answers

How to get current Location in GoogleMap using FusedLocationProviderClient

I want to get periodic (say every 2 minutes) current location updates for this I'm following official documentation, I wrote this code but its not giving current location updates every two minutes even specified in LocationRequest object that I'm…
blackHawk
  • 6,047
  • 13
  • 57
  • 100
16
votes
1 answer

Android app can't access location on emulator using FusedLocationApi

I have an Android app that gets location: private LocationRequest createLocationRequest() { LocationRequest mLocationRequest = new LocationRequest(); mLocationRequest.setInterval(120000); mLocationRequest.setFastestInterval(60000); …
14
votes
3 answers

Blue dot and circle is not shown on MyLocation using android fused location api

I was using LocationManager to track the user current location, Now after changing location manager to FusedLocation API, the blue dot and circle is not shown even after setting map.setMyLocationEnabled(true). I can see the current location icon on…
flexdroid
  • 8,437
  • 2
  • 21
  • 27
13
votes
1 answer

How can location updates from FusedLocationProviderClient be processed with Work Manager?

First of all, I'm a total Android noob. Have looked for solutions for some time now, but can't find any helpful hints in the right direction so far. This might be generally caused by the nature of the issue itself, being quite niche. The working…
13
votes
2 answers

How can we listen for location permission changes in Android (without triggering a permission request)?

Is it even possible? I would like to be able to create a listener which will be notified about location permission changes (whether the app triggers them or not). As far as I can see, there are methods for getting the current permission status and…
Rupert
  • 2,097
  • 19
  • 28
12
votes
4 answers

Application getting wrong location until open inbuilt Google Map application

I have developed one application which is used to find current location of device. I have used Fused Location API to get current location. I am facing very strange issue, in some of devices i am not getting accurate current location until i open…
Chirag
  • 56,621
  • 29
  • 151
  • 198
12
votes
2 answers

I want to get accurate location with google fused location api?

I am using Fused location Api, i am getting the location with approximately 10 meters accuracy. Some times it gives 4 to 8 meters accuracy. I want more accuracy using this fused location Api or with any other way. Is there any way to get location…
9
votes
2 answers

Fused Location Api setSmallestDisplacement ignored/not working

I am trying to create a service that will receive location updates every x sec and after y distance. I receive updates after x sec but never after y distance. I have tested it multiple times with different values and it seems that…
8
votes
2 answers

Android: App is rejected by Google because of background location

I have issues with my app recently, when it is out of nowhere rejected by Google Play because they found that I'm using background location. But in fact I'm not using this feature. I have only ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION…
8
votes
2 answers

FusedLocationProviderClient getLastLocation elapsedRealtimeNanos mostly current system time

Update 2 I had a talk with a google engineer on Google I/O '18. He told me that I can trust the fusedLocationProvider. If he marks the last known location with a new timestamp the user is probably still at the same location. I'd like to do a few…
8
votes
3 answers

Fetch accurate intermediate Location points in background and calculate Distance of Starting and ending locations in Android

There may be similar questions regarding this topic,But I need your thoughts and suggestions on some specific requirement. Here is my need - We are developing one app which tracks User's trip. The app will start collecting the location of that user…
7
votes
1 answer

How to retrieve the current geolocation synchronously?

Due to the way our app works, I need to synchronously get the users current location. Our current implementation uses the com.google.android.gms.location.LocationListener to receive location updates. Problem is, I need to update the location…
7
votes
1 answer

Android Play Services FusedLocatioAPI getLastLocation crashes with SecurityException

A few days ago Crashlytics startet reporting weird crashes within my Google Play Services Location API Implementation. After the Google Play Services API is connected I try to get the last known location with FusedLocationApi.getLastLocation(...)…
1
2 3
21 22