Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are Android geofences surviving a reboot?

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/training/location/geofencing.html

like image 869
ligi Avatar asked Jun 11 '13 09:06

ligi


1 Answers

Geofences will not persist on reboot.

You have to listen for BOOT_COMPLETED action and add geofences again.

Note: If your app installed on external storage(SD card), you will never receive Boot Complete action. So you have to specify android:installLocation="internalOnly" in the manifest tag. This is because, android device will broadcast BOOT_COMPLETED action before setting up the external storage.

like image 194
Sundeep1501 Avatar answered Sep 19 '22 13:09

Sundeep1501