Are Android geofences surviving a reboot?

后端 未结 3 1331
悲&欢浪女
悲&欢浪女 2020-12-15 22:01

is the system persisting them or do I have to add them again them after reboot? I have not found anything about that in the documentation at https://developer.android.com/tr

3条回答
  •  -上瘾入骨i
    2020-12-15 22:06

    I haven't found any documentation confirming this, but my own experiments have shown that they are not persisted across reboots.

    My setup was as follows:

    • Run application
    • Application sets up various geofences on first launch only as NEVER_EXPIRE
    • Exit application
    • Use phone in regions marked by fences
    • Confirm fences trigger pending intents which are sent to IntentService
    • Leave region
    • Reboot phone
    • Re-enter region
    • Pending intent does not get sent to IntentService

    If anyone has more information on this from someone at Google please comment!

提交回复
热议问题