Android Geofence only works with opened app

前端 未结 2 918
闹比i
闹比i 2020-12-13 16:44

I\'m doing a serious research on this topic for many days... I saw many topics here too... But unfortunately I couldn\'t find a solution....

I\'m writing an app that

2条回答
  •  遥遥无期
    2020-12-13 17:03

    I had a similar issue and after trying various ways I could finally fix the issue. Unfortunately, the android documentation fails to mention these issues.
    The android geofences get removed every time you reboot your device or every time you toggle the location mode. So Add a broadcast receiver to listen to device reboots and location mode changes, and add the geofences again in the receiver.

    I have posted a detailed explanation here

提交回复
热议问题