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
0 answers

Android location updates are too frequent contrary to documentation

I've been trying to wrap my head around all the new limitations that were introduced in Oreo regarding background broadcasts and location updates. I've cloned the sample repo to play around with it, but it seems the actual behaviour does not match…
0
votes
2 answers

How to most accurately determine the location of an Android device?

I'm building an app that should be able to report the users exact location. There is only a need for a single location, i.e. I don't need to track the device continuously. I want the location to be as accurate as possible, and it's okay to wait a…
0
votes
1 answer

onLocationChange method is not executing when I move

I'm trying to execute a piece of code each time within 10 meters, when I first run my app, it executes all the code inside onLocationChange, but after I move more than 10 meters it seems like the listener is not working anymore or the location is…
Todd
  • 179
  • 15
0
votes
1 answer

Location keep changing even if the device is not moving

I am getting current Lats and Longs using FusedLocationProviderClient and I am using the below code to get current lats and longs of the device: public class FusedGpsService extends Service { private FusedLocationProviderClient…
0
votes
1 answer

How to get a good accuracy using fusedLocation?

In my app, I need to keep track of the user location. To do so, I'm using FusedLocation, from which, I'm asking the location every 10s. Unfortunately, the location that is return has a accuracy of 500.0 meter or 164O feet. In the Android…
0
votes
1 answer

Google Maps Using Fragments

I'm using google maps in fragments(Navigation Drawer). When the application starts the first fragment is shown with google maps. I've initialized the google maps in onViewCreated method. First time it shows the google maps perfectly fine with my…
user10002053
0
votes
1 answer

FusedLocationApi is crossed or deprecated

I really have to find a way to use or find something to replace the crossed line which is FusedLocationApi I wish you could give me an answer public void onConnected(@Nullable Bundle bundle) { locationRequest = new LocationRequest; …
0
votes
1 answer

Separate class or Service for FusedLocationProvider Location updates?

I currently have a class named LocationCheck. public class SpeedCheck { Here the location is retrieved every 3 seconds and is ongoing until the user stops it. To start checking for locations, the class is called in the Main Activity: startLoc =…
0
votes
2 answers

App Crashes While Requesting Location Updates With The Help Of Fused Location

I was requesting the location updates with the help of LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, locationListener); But As I tried to mention this on a swtich onClickListener , it crashed. However…
0
votes
2 answers

getLastLocation().addOnSuccessListener not work in the button

I want to set a button, when I put the button, then get location. FusedLocationProviderClient userLocationProviderClient = LocationServices.getFusedLocationProviderClient(this); This can work in onCreate, but I want to set a button, when I put the…
Greg
  • 155
  • 1
  • 4
  • 7
0
votes
1 answer

FusedLocationApi.getLastLocation and requestLocationUpdates take very long time to return

I face todays a problem with a fresh mobile. when i do : mLocationRequest = new…
0
votes
1 answer

App is crashing while running AVD in Android Studio. I am running on virtual device pixel 5x with API 27

When I try to create and instance of FusedLocationApi it doesn't get recognized some How. it is in red. It is not importing any classes. seems to me that there might be some problem in Gradle Build App. Please Check it out. This is My…
0
votes
1 answer

For getting a more accurate location result in Android which one to use FusedLocationApi vs FusedLocationProviderClient?

I was going to develop an android application that deals with users' current location. Then there I noticed two type of examples on the web. One using FusedLocationApi and another one using FusedLocationProviderClient. The first one is very much…
0
votes
0 answers

FusionLocationProvider not getting location update when application went background

I'm using FusionLocationProviderClient to get the location update periodically in the background. It's working fine. But, Having some issue in Oreo. Location update stops as soon as application goes background. mFusedLocationClient =…
0
votes
1 answer

get updated and lastknownlocation in a fragment

Being very new to java, I am very confused about getting lastknownlocation and updated location. Over last few days, I have managed to get the mark on a predefined location, but I am struggling very much on getting my current location using…
BaRud
  • 3,055
  • 7
  • 41
  • 89