I currently have an android app that finds a users current location. I now would like to place a Geofence of a specific radius around them say maybe 5 miles so i could pinpoint places of interest around them. I need the Geofence to update and move as the current location of the user changes. I have no previous experience of using Geofencing and any help would be great
Asked
Active
Viewed 2,375 times
2 Answers
1
center of a circle is your main_point from which you consider geofence and radius of the circle is your distance or geofence region.
when user move find his latitude and longitude and the distance of this latitude and longitude from the main_point(center of the circle (static latitude and longitude )) and if this distance is more than radius it means user cross the geofence region
Finding distances based on Latitude and Longitude
mark the answer solve if it helps you so that other can find relevent answer.
-
My idea is to have one geofence that will constantly move around the users position when they move for e.g i would like to add to my current app so when the user finds their current location they will have a geofence around them that will be able to pick up places of interest within there current location? However i am not sure if this is possible – user3508146 Apr 07 '14 at 19:58
-
I plan on storing points of interest coordinates on a database that will then be used to notify the user of them if they are within a certain distance of it – user3508146 Apr 07 '14 at 20:01
-
fetch the user location and consider it center of the circle and radius of circle is your choice want you want .it is feasible as i think – User10001 Apr 07 '14 at 20:02
-
yes that is a good idea as it should then update every time the users current location updates. thank you for your help you have me in the right track now :) – user3508146 Apr 07 '14 at 20:23
0
Take a look at https://developer.android.com/training/location/geofencing.html for example code on setting it up.

Terhands
- 179
- 1
- 4