lordgreg / Sfen

12 stars 4 forks source link

Geofences (Location events) not working thanks to Google :) #57

Open lordgreg opened 9 years ago

lordgreg commented 9 years ago

One of my biggest bug finders and reporters, Ron, was submitting bugs for the past 2 weeks. Daily. Several times. With logs. :+1:

The problem he described was that sometimes, his location events triggered, sometimes didn't. When I was then checking and testing the events it worked. I was watching constantly catlog with Sfen running. Everything worked as it should.

Until 2 days back, I've was finaly able to reproduce the bug he was having. Geofence pending intends don't trigger if application is in background (or activity closed). This is nowhere to be found in official documentation OR in official example code.

Thank god for stackoverflow...

http://stackoverflow.com/questions/21299424/pending-intents-not-fired http://stackoverflow.com/questions/19505614/android-geofence-eventually-stop-getting-transition-intents

Testing it, I've found out that location transitions don't get reported AT ALL if app is not in foreground. Will try to switch it from its own service to BroadcastReciever.

lordgreg commented 9 years ago

testing again on 4.4.4 with ReceiveTransitionsIntentService.