GeoFence Device when app is in background
Asked Answered
E

1

7

I have implemented the geoFence api and everything is working good. But there are some problems, I want more clarification regarding my confusions.

Here are some of the confusions and problems:

  1. I want my user to get notified when he enters a geofenced area. I have implemented the GeofenceTransitionsIntentService as per guideline but it is not triggering the transition when the app is in background. What should I need to do?

  2. GeoFence Expire time: it is pretty obvious that if we enter Never it is not going to expire, but I am confused about the time. For example if I set it to 10 minutes, what does that exactly do? Will the geofence expire after the given time since it is created or it would expire when the user arrives at that place and then the timer would start? How can we get the geofence to expire when the user gets there.

  3. How is Google tracking us? How does the geofence actually work? We are not sending our location, then now it is tracking ? Does it start tracking us when we add a geofence and then notify us when arrived at that place?

Please tell me and discuss about these confusions, especially my confusion about it working while the app is closed or destroyed.

Eleanoreleanora answered 1/6, 2016 at 9:55 Comment(0)
U
5

About 1.) According to this Google I/O Talk When you're using PendingIntents the Location API should wake up your app even if it's runnning in the background, although from my experience the Geofencing events are quite unreliable, but this might be related to a bad GPS receiver in the device I used for testing.

Ulyssesumayyad answered 30/7, 2016 at 10:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.