Reputation: 1
I am making an app which takes location from user to set a proximityalert, but the problem is the app only triggers the alert when it is running in foreground....The app doesn't show any alert when user exits by pressing back button, i want to keep checking proximityalert even after the app is not on the foreground, I tried putting proximityalert in a service but didn't work at all...Any suggestions please!
Upvotes: 0
Views: 36
Reputation: 8063
I think what you want to implement is covered by Geofencing in Android. You can take a look here https://developers.google.com/android/reference/com/google/android/gms/location/GeofencingApi or here http://www.technology-ebay.de/the-teams/mobile-de/blog/geofencing-in-the-mobile-de-android-app.html.
In short, you define a location and a radius, and if an event is triggered (entering or exiting the area) you get notified.
Upvotes: 1