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

RecyclerView: No adapter attached; skipping layout, when trying to get device location

item_place_picker.xml -- activity_explore.xml--activity_maps There is a lot of similar questions, but I couldn't get answers. My problem is that when I am trying to use FusedLocationProviderClient to get users location, nothing show up on the…
0
votes
0 answers

App Crashes when Starting Service

I am Using GoogleFusedLocationAPI and I have 2 service in my App. My service is meant for below reason and Name is as A- BackGroundService (This will Track Location in every 2 minutes) B- TripStartedService(This will Track Location In every 10…
user9192300
0
votes
0 answers

FusedLocationProviderClient doesn't retrieve any locations

I've been using the FusedLocationProvider api for a couple months now, but after an uncertain period, users report issues that stem from FusedLocationProviderClient not returning any locations in onLocationResult here is a gist containing my…
0
votes
1 answer

Get the result of a Task without a callback

I am currently trying to migrate all my location calls to use the new Task model flow but one question I have is that is there a way to get the result of a task without having to wait for a callback? The reason I ask is because I need to get the…
tyczj
  • 71,600
  • 54
  • 194
  • 296
0
votes
2 answers

Detect GPS in case if Disabled

I want to detect user trip and when trip is started, I have to get LatLng in every 5 seconds. I am using Google FusedLocationAPI and My problem is until My GPS is enabled then its calculating all distance but Once I disabled GPS the its stucked. How…
0
votes
1 answer

Fused Location Provider : getLastKnowLocation is returning null and onLocationChange is not getting called?

There is a lot of similar question and blogs but non of those help me to solve my problem. I have written the code below but the location returning by the getLastKnowLocation is null it's okay sometimes getLastKnowLocation can return null with some…
Yirga
  • 881
  • 1
  • 12
  • 31
0
votes
0 answers

which is best way to get the exact location for every 2 min even when device is in bag or pocket and without internet?

I am developing an app in that i am given to options (start trip and end trip) where i have to track a person where he is travelling by getting location(lat,long),by clicking start and end options.when he start trip i have to save latlong in local…
0
votes
1 answer

Can not get accurate location while travelling in bus without internet

I am developing offline car tracker android application. It will update location after 5 min and stores it in SQLite.I used FusedLocationAPI but can not get accurate location while travelling in bus without Internet. I am getting accuracy 999m and…
0
votes
1 answer

Getting wrong Location lat/long

I'm using Nexus 6p with Android 7.1.2. I set the device location accuracy to be HIGH_ACCURACY. In my code, I have a background service for location update, using the FusedLocation API. As you can see I also set the location request priority to be…
Elior
  • 3,178
  • 6
  • 37
  • 67
0
votes
0 answers

LocationListener.onLocationChanged not called for Oreo Device

Callback method LocationListener.onLocationChanged() not called in the Oreo devices and on devices below Oreo it's working fine. Is this coming due to using of deprecated class LocationServices.FusedLocationApi?
0
votes
2 answers

FusedLocationAPI returning null for the first time after adding permission

I am implementing fusedLocationAPI in my app. For android phones with >= Marshmallow, I am adding up the permissions. The issue is for the first time after installation, the lat and long values are returned as null. But next time after starting the…
Animesh Jena
  • 1,541
  • 1
  • 25
  • 44
0
votes
0 answers

FusedLocationApi is not working while scheduling it with JobScheduler

Calling FusedLocationApi within jobscheduler doesn't work. I have tried in 2 ways but onConnected() are never called in both of them. How can I make it work? Thankyou MainActivity.class public class MainActivity extends AppCompatActivity implements…
0
votes
0 answers

Not able to get Location updates using fused Api client

Im trying to make an app for android wear that shows real time location of the user in a map. Im using LocationServices.FusedLocationApi.requestLocationUpdates for get location updates using this location request: protected void…
0
votes
1 answer

Android O: what will be effect of the new version of Android on Location Updates?

My app is currently using PendingIntent.getBroadcast to receive location updates from FusedLocationApi. How will my location updates be affected in Android O? I went through the documentation given in this link:…
Kanika
  • 714
  • 8
  • 24
0
votes
0 answers

ResourcesNotFoundException in the devices below marshmallow for fused location provider

The fused location provider works fine in android marshmallow but it fails to install the versions below it. The code, build.gradle, manifest and build error are below. Please have a look. My code: protected void onCreate(Bundle savedInstanceState)…
Amrita Stha
  • 2,973
  • 3
  • 25
  • 46