Display saved Proximity Alerts on Android?
-
27-10-2019 - |
Question
Does anyone know of a way to get/show all stored proximy alerts on Android?
What I have done:
- Get list of locations via http
- Add them to the proximity alerts via the LocationManager
- Fire a PendingIntent to a BroadCastReceiver
- Notifiy User
All works fine and alerts/notifcations display as they should
What I want to do next for debugging/testing purposes was to show all the locations/alerts that are currently stored and display them in a list.
Anyone know how to do this or point me in the right direction?
Thanks
Solution
What I want to do next for debugging/testing purposes was to show all the locations/alerts that are currently stored and display them in a list.
Well, you can't really do that from the SDK, other than to record them all yourself. See if adb shell dumpsys
reports on registered proximity alerts somewhere in the pile of information it returns. I don't have any code handy that registers a proximity alert, so I don't know for certain if the information you would need is there or not.
OTHER TIPS
You need to "dumpsys location" from the ADB prompt.