android / location-samples

Multiple samples showing the best practices in location APIs on Android.
Apache License 2.0
2.7k stars 2.78k forks source link

Geofence isn't triggered until another app uses GPS #124

Open sohail77 opened 6 years ago

sohail77 commented 6 years ago

I'm trying to implement geofencing but the problem is in the sample geofences are triggered i.e the notification is displayed(while the app is in the background) only when i use another app such as Google Maps that uses gps. Is there a way i could make the app check for location updates and trigger geofences while the app is close or in the background

itap commented 6 years ago

@sohail77 I am running into the same issue as of lately - did you manage to find what was causing this behaviour, or maybe a way to make it work?

ben-j69 commented 5 years ago

Same issue for me...

sreekanth-krishnan commented 5 years ago

Anyone had luck with this? I'm stuck on this

murat0 commented 4 years ago

Any updates on this guys?

ihrigb commented 4 years ago

Same issue for me! I'd also be looking for a solution.

DomClaxton commented 3 years ago

Me too! Using the emulator I can only trigger the geofence notifications when i open the Google maps app!

Jake-Russell commented 3 years ago

Experiencing the same issue - has a solution been found?

DomClaxton commented 3 years ago

I haven’t found a solution exactly, except to say I experience the issue in the emulator but when tested on a real device it did seem to work. It was very frustrating because I spent quite a few hours trying to get it triggering in the emulator and then on a hunch I tried it on a real device and it worked - without the need to open another GPS app. So the GPS trick is the thing to do if you want to test in the emulator. That was my experience.

Jake-Russell commented 3 years ago

Unfortunately the issue persists even on a real device for me :( I need to have Google Maps (or my app) open for the geofence notifications to be triggered

sreenath2406 commented 3 years ago

I haven’t found a solution exactly, except to say I experience the issue in the emulator but when tested on a real device it did seem to work. It was very frustrating because I spent quite a few hours trying to get it triggering in the emulator and then on a hunch I tried it on a real device and it worked - without the need to open another GPS app. So the GPS trick is the thing to do if you want to test in the emulator. That was my experience.

Unfortunately, It's not working in real device as well. I have to open google maps, only then the geofence notifications are triggered.

GambitDev commented 2 years ago

I'm having the same issue.. have anyone found a solution for this?

Clopma commented 2 years ago

Same problem here, please can this thread receive some attention?

arosca commented 2 years ago

Help :)

axeloehrli commented 2 years ago

Same problem :(

coinzdude commented 1 year ago

July 2022 and having exactly this issue. Sad.