Questions tagged [location-updates]

22 questions
8
votes
1 answer

Location Updates with FusedLocationProviderClient produces memory leaks

I can't understand why this very simple activity produces memory leaks. It follows the guidelines given here: https://developer.android.com/training/location/receive-location-updates.html and the example code given here:…
4
votes
0 answers

fusedLocationProviderClient requestLocationUpdates with pendingIntent does not fire

I am trying to run a location tracker in the background. To do this, i read i need to use pendingIntent with fusedLocationProviderClient, so that my app will continue to query the user's location every x seconds, even if the app is…
4
votes
2 answers

Update location in Background

I want to get user location even when the user does not use the app.now i can get location after press home button and application goes to background state, but after a few second location update stoped. And when I'm killing the app location update…
ava
  • 1,148
  • 5
  • 15
  • 44
2
votes
0 answers

Location Updates only when the app is opened for the second time

In android studio, while using a GoogleApiClient, after the user grants permissions, when the app is first launched, I do not get any location updates,but when I open the app again,I start receiving the updates. This started happening happening…
2
votes
2 answers

Move marker instead of adding it after requestLocationUpdates in kotlin

I'm using google map in kotlin with help of this tutorial Introduction to Google Maps API for Android with Kotlin. in this tutorial showed how can add a marker after location updated but when it updated,there is still a marker in previous location…
1
vote
0 answers

How Should I check if someone is in a certain location when Database Updates

I'm currently trying to build something similar to Amber Alerts where whenever a database table is updated, I check if users are in a certain area. For example, let's say a user makes a report that they found a wallet at their current location. The…
1
vote
0 answers

Android Background App - Foreground FusedLocationProviderClient Service Stops Providing Location Updates

I've been running into this problem for a couple months now. My android app uses a foreground service (modeled on this to track the location of for brief periods. This was working well through Android P, but with the release of Android 10/Q, the…
1
vote
0 answers

Location updates when app is in Backtound Android 8

Since Android Oreo is released, location updates are only happening a few times in an hour when app is in background. In my case, I have an app that needs frequent location updates when user locks screen (app is in background). The Google Developer…
1
vote
1 answer

IntentService for background location updates

I have a problem about using IntentService.If my app is in background or close i cant update my current location and cant get notification.If I open app again i get notification . So i cant get notification on time.I mean i dont have a problem…
1
vote
2 answers

Getting location trigger from Android OS

Is there a way to get a trigger from Android OS, if a user enters in a predefined area(Lat long list given to the OS) ? e.g. If I give lat long of a particular restaurant to the OS, is there a way OS can send me a trigger when user enters the…
MobileAppDeveloper
  • 1,048
  • 2
  • 16
  • 27
1
vote
0 answers

click event on recycler view wont work with location updates (Xamarin.Android)

I have a problem I hope you can help me with! I have an activity where I have a recycler view with some items and I use the google fused location API to get the distance from the user location to the items in the recycler view. I have made a click…
0
votes
1 answer

Android foreground service stops Requesting updates for locations after some days

I have an endless foreground service that request locations updates every 10 sec, in parallel, it sends this locations and others informations to a database. I managed to update the location while the app is in the background or when the phone is on…
0
votes
1 answer

Location update Receiver not getting location updates android

i have used pending intent to launch broadcast receiver get location updates. app was working fine before. but from last couple of months it stopped working. i checked and found LocationReceiver.kt is not getting any updates class LocationReceiver :…
0
votes
1 answer

Mastering LiveData StateHandling Chaos

I'm using a MapView to show some markers based on current user location or a selected map position. The problem is when I navigate to another fragment using navigation component and back. Some steps below fires the livedata value twice. The loading…
0
votes
1 answer

What happen if requestLocationUpdates() parameters minTime and minDistance are both 0

If I code: locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener); Is that mean the location will be updated in real-time (every 0 millisecond and every 0 meter) or it won't be updated? Sorry if my question is…
1
2