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

How to subscribe to providers status change events using Fused Location?

Google recommends using FusedLocationProviderClient instead of LocationManager Using LocationManager I could subscribe to change status events of providers by using LocationListener interface: void onProviderEnabled(@NonNull String provider) {} void…
user924
  • 8,146
  • 7
  • 57
  • 139
0
votes
1 answer

Location Update from Work Manager Doesn't work

Recently I've been trying to implement the logic in order to get Location Updates from a FusedLocationProviderClient using Work Manager, every 15 mins (as that's the minimum background execution delay). However requestLocationUpdates() function from…
Stefan
  • 2,829
  • 5
  • 20
  • 44
0
votes
2 answers

What is the best way to receive location updates in background?

I am trying to write an app that tracks location in background and sends data to a server -- to monitor where my family members are, for example. Currently I am playing with https://github.com/android/location-samples, particularly with…
Alexey Burdin
  • 122
  • 2
  • 9
0
votes
1 answer

getLastLocation() returns a random location in the middle of russia

I war trying to send users last know location over SMS, but lastKnownLocation() keeps returning either null or a random location in the middle of nowhere off the coast of russia any help is appreciated! I was earlier trying to getLocation via…
0
votes
2 answers

Right way of requesting permissions for location coordinates in Android 10

Below code does not work on Android 10 until you manually enable the location from settings. When I go through the Android 10 documentation, it says if you are fetching location from the visible activity, if that was the case you don't need any…
0
votes
1 answer

Unable to set device location

I get this error when I run the code below: None of the following functions can be called with the arguments supplied: public constructor FusedLocationProviderClient(p0: Activity) defined in…
user13273341
0
votes
1 answer

Problem with FusedLocationApi, it is deprecated

I've made a google maps app but it shuts down when I accept the permissions. All the code is okay but the onConnected method. Here it is: @Override public void onConnected(@Nullable Bundle bundle) { //La aplicacion busca la ubicación dentro de…
0
votes
1 answer

FusedLocations doesn't send location updates when map.isMyLocationEnabled = false. Strange behaviour

I want to add a custom image as the my location indicator. The only way to hide the blue dot is to setIsMyLocationEnabled = false. Doing this somehow also disables the updates from FusedLocation. I want to know if this is intended or its just a…
0
votes
0 answers

FusedLocationProviderClient getLastLocation elapsedRealtimeNanos is sometimes strange

I have the same problem with this. FusedLocationProviderClient getLastLocation elapsedRealtimeNanos mostly current system time My code currently compares the time value of location by FLP getLastLocation() with the current time value and requests a…
0
votes
0 answers

How to get location from firebase and animate the car marker

I have stored location into firebase as latitude and longitude. now i want to fetch the value of those and with help of that, car marker should be animated like car moving. so i did car marker animation. but it will show only for current location. i…
0
votes
0 answers

Geocoder using random latitude and longitude instead of passed values

I am obtaining location with FusedLocationProvider and trying to get complete address from latitude and longitude. I get correct values but when i pass them to geocoder.getFromLocation they change to some russian place. Am i doing something wrong or…
0
votes
1 answer

LocationUpdatesForegroundService app process is still running after closing app

I am doing some investigation on Google Play Location Service Google Play Location Samples I am experiment the following issue on LocationUpdatesForegroundService sample application: the app process is still running after closing the app. Steps to…
cristallo
  • 1,951
  • 2
  • 25
  • 42
0
votes
0 answers

Corrupted longitude when using Android Fused provider

I have an Android app that uses Fused provider and reports lng,lat,accuracy every 3 seconds. While driving in a vehicle and building a route from the reported samples we can see that from time to time, the GPS provides bad longitude while accuracy…
0
votes
1 answer

last known location is always 0

Inspite of my best effort, I am unable to get my location correct. This is my main.java public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
BaRud
  • 3,055
  • 7
  • 41
  • 89
0
votes
1 answer

How to properly handle location service toggling

In my app, I have a button that gets the user's current location using the FusedLocationProviderClient. This works correctly until location services are turned off and then back on on the device. When this occurs,…