Let's say I have defined ten geofences in my app, and all is working fine.
Now the user wants to pause the detection for a period, lets say 24 hours. What is the best practice to "pause" the fences, and make sure they "activate" again in 24 hours?
I've managed to find two strategies, but I'm not really sure which is best. Plus I might have missed some other solution.
Alternative 1: Delete and schedule
- Delete the geofences
- Schedule a local notification for 24 hours ("The 24 hours has passed, press here to start the geofences again")
- When user taps notification, restore the geofences
Arguments FOR: Less battery use, simple for user to prolong the 24 hours (by not tapping notification)
Arguments AGAINST: User might not tap notification - so geofences might not get activated again
Alternative 2: Stay active but silent
- Keep the geofences and get events
- Don't act on them for 24 hours
Arguments FOR: Guaranteed to work again after 24 hours
Arguments AGAINST: More battery use (probably not a big issue)
Thoughts?
Now the user wants to pause the detection for a period, lets say 24 hours. What is the best practice to "pause" the fences, and make sure they "activate" again in 24 hours?
I've managed to find two strategies, but I'm not really sure which is best. Plus I might have missed some other solution.
Alternative 1: Delete and schedule
- Delete the geofences
- Schedule a local notification for 24 hours ("The 24 hours has passed, press here to start the geofences again")
- When user taps notification, restore the geofences
Arguments FOR: Less battery use, simple for user to prolong the 24 hours (by not tapping notification)
Arguments AGAINST: User might not tap notification - so geofences might not get activated again
Alternative 2: Stay active but silent
- Keep the geofences and get events
- Don't act on them for 24 hours
Arguments FOR: Guaranteed to work again after 24 hours
Arguments AGAINST: More battery use (probably not a big issue)
Thoughts?