Gps - Notify when user is in my location in Android

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I am looking for an easy way to check if a user is at my location (50m) radius if notify me.

Right now I have a service running every two minutes getting position of each user comparing it and then notifying if user in same location.

http://goo.gl/9I857T http://goo.gl/9I857T

Thanks!

Answers

Instead ProximityAlert I would use Geofences.

http://developer.android.com/training/location/geofencing.html http://developer.android.com/training/location/geofencing.html

Is newer and does a more effective use of the battery

In your case, you can have a service that sends to the other device the current location every X minutes, so it can update the Geofence. The problem that I see is that there would be a lot of calls, spending battery and the data plan.

A good approach is to use the Location Services API, you can detect if a user is standing or moving.

http://developer.android.com/training/location/activity-recognition.html http://developer.android.com/training/location/activity-recognition.html

Using this and sending new locations only when the user is moving you will be able to reduce the amount of calls.

Parse is another option as @thepace mention. It is easy to use and whit it would be easy to implement what you are trying to do, but is not free :(

Hope it helps.

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/26234572/notify-when-user-is-in-my-location-in-android

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils