Theoretic question. In my app I need to create alarm at location functionality. So user can pick location, set alarm and any time while She/He will get closer to location alarm will trigger.
I know that I have to create Service to listen the current location. It is obvious that I can't use GPS.
Any ideas how to figure it out if device is close to location? I know that I still have Network location, which probably I will use, but I afraid of that this will consume to much energy.
If there is any internal android system service which provide such data? That I can just setup receiver.
Any ideas are welcome ;)
preguntado el 25 de septiembre de 13 a las 10:09
I suggest building on Google Play Services in order to get the product working quickly. Of course if you need to target non-Google phones, then program this manually, but only if you have to.
Play offers Geofencing apis - here are the docs:
- Google is constantly updating the Play sdk to optimise the features.
- quick to get it working
- eficiencia de la batería
- it will not work on non-Google API devices, i.e. Kindle Fire
Upshot of all this:
- if your app relies on Google Maps at all, then use the Play Geofencing.
I decided to use ProximityAlarm in Service. Great example from this post: