Search code examples
androidlocationproximity

How to delay proximityAlert setting off?


Bit of a dumb question, I have successfully created a mapactivity that lets users place a proximityalert at their current coordinates by clicking the map. How do I prevent the proximitylert from setting off, given that they will be in the proximity alert area by default? I understand there is a key for entering and exiting, does the system recognize that I am by default, exiting?

Thank you


Solution

  • The easiest way is not to try. Instead, ignore an incoming proximity alert if it comes too soon after being set (you can save the time it was set in shared preference or similar storage).