简体   繁体   中英

GeoFence Device when app is in background

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.

大约1.)根据此Google I / O对话,当您使用PendingIntents时,即使在后台运行,Location API仍应唤醒您的应用程序,尽管根据我的经验,地理围栏事件非常不可靠,但这可能与损坏了我用于测试的设备中的GPS接收器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM