Are Android geofences surviving a reboot?

后端 未结 3 1333
悲&欢浪女
悲&欢浪女 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条回答
  •  隐瞒了意图╮
    2020-12-15 22:05

    Which data do you want to persist? Is it the geofence region in your device or the geofence region stored by Google Play Service Location API ?

    I believe the device need to register a region (defined by its latitude, longitude and radius) to Google Play Service (via LocationClient). You also need to provide expiration time, transition type you want to be notified, and the Intent from which you will be notified.

    This region will be stored (remotely) not in your App. When it pass its expiration time, Google Play Service will automatically remove it. You can also set it as NEVER_EXPIRE. If the region is not expired yet, Google Play Service will notify your App (via intent that you send when calling addGeofences).

    The source of the region (lat, long, radius) is up to your implementation.

提交回复
热议问题