Questions tagged [fusedlocationproviderapi]

The Fused Location Provider intelligently manages the underlying location technology and gives you the best location according to your needs.

436 questions
1
vote
1 answer

Kotlin: FusedLocationProviderClient.removeLocationUpdates always return false

This question seems like a duplicate of this one but trust me I've tried the solutions but couldn't figure out the reason behind my problem. I'm a newbie in Kotlin and I'm requesting location updates with the FusedLocationProvider. Relevant…
Itban Saeed
  • 1,660
  • 5
  • 25
  • 38
1
vote
1 answer

Unresolved reference: LocationRequest for Android S (12)

Android 12 SDK seems to be stable now if compileSdkVersion 30 buildToolsVersion "30.0.3" defaultConfig { minSdkVersion 23 targetSdkVersion 30 then Play Services Location works fine but if compileSdkVersion 31 buildToolsVersion…
1
vote
0 answers

What are the request limits on background location in Android 11+ in a foreground service (FLP)?

Our Android app starts a foreground service that is guaranteed to be foregrounded by the user before use. However, we now need to get user location even when the user has backgrounded the app or locked the phone or something. If the app has been…
1
vote
1 answer

SMS manager not sending the message

I am using Fused Location API there are no errors in the code but when I run the application it is requesting only the location but not requesting any SMS permissions to send a alert message (this app sends location SMS(latitude and longitude) to…
1
vote
0 answers

Android location update using fused returns null. How to ensure I get it from foreground activity?

I need the location once in my foreground activity. But I get a null response. Weirdly once I open google maps the location callback returns a valid object. What is google maps doing that I'm not? How do I ensure the value is not null in my…
ir2pid
  • 5,604
  • 12
  • 63
  • 107
1
vote
1 answer

Android FusedLocationClient with PendingIntent not receiving location update when app is in background

I'm using FusedLocationClient and broadcast receiver to get location in background, i enabled background location background permission and locations (FINE and COARSE) permission. i receive location update when app in foreground but when moving app…
1
vote
0 answers

GPS coordinates (Latitude and longitude) are not displaying in my textview

I've been following 2 tutorials and neither ones have worked, I made sure I had the permission and dependencies added. This is my code: @Override protected void onCreate(Bundle savedInstanceState) { …
1
vote
2 answers

Get Location Synchronously In Function Call Android

I'm trying to get a user's last known location with Android. I can do it using fused locations, but I'm trying to make a simple method to return a user's latitude and longitude location. Here is what I've tried: public static double[]…
Jack
  • 57
  • 7
1
vote
1 answer

FusedLocationProviderClient.getCurrentLocation(): Background apps calling this method will be throttled under background location limits

In the docs for FusedLocationProviderClient.getCurrentLocation() it says as follows: This method may return locations that are a few seconds old, but never returns much older locations. This is suitable for foreground applications that need a…
1
vote
0 answers

Fusedlocation requestLocationUpdates not working in background

I am trying to print out my location from my app. It works fine in the foreground, but as soon as I move to background, it stops printing out. I have made a location class, i.e. it's a normal class and not an activity or fragment. I start up the…
1
vote
2 answers

How can I get continuous location updates in Android?

The GoogleApiClient has been depreceted and now I am having some trouble learning the latest way to get constant location updates. Also, can I get the location updates using LocationCallback and LocationRequetMethod??
1
vote
1 answer

Service is not giving Location Updates

I am trying to have an app give location updates while the app is in the background. When the app is open the service works fine. When the app is in the background the service continues running but the location updates stop. I have tried using a…
1
vote
1 answer

fusedLocationClient.getLastLocation always returns NULL

i implemented the method used in Lib android this, see: fusedLocationProviderClient.getLastLocation().addOnSuccessListener(new OnSuccessListener() { @Override public void onSuccess(Location location) { …
1
vote
1 answer

ApiClient tag and others have been deprecated. What to replace with?

I made this page a while back but I've come back to it and a lot of the tags have depreciated. Could anyone give me some help on what to replace them with? I'm hoping it isn't the case but I'm expecting the rest of the code to be useless now that…
1
vote
0 answers

Cant get LocationData into loader

Hello there i am having a problem in my project.I am trying to get the users location and then get some data from the URL.But the problem is that the userLongitude and userLatitude are shown to be zero when I build my Url.There is no problem in the…