1

I need to sync with my server when the user exits a geofence, but I'm concerned what happens if the user has his phone turned off and the geofence would never fire the exit notification.

I was thinking about adding a passive location listener that fires if the distance is more than specified.

Is there a better way?

  • I am not a 100% sure of this but I think,if the user turnes off their phone while they are in the Goefence and turned it on after they have left the geofence, the exit notification may get fired. Give it a try and let me know if it does. – DrkStr Apr 04 '14 at 17:01

1 Answers1

0

center of a circle is your main_point from which you consider geofence and radius of the circle is your distance in which you do not want show event.but when user move out of circle you want to fire event.

solution when user on his phone find his current 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 and you fire event.

Finding distances based on Latitude and Longitude

mark the answer solve if it helps you so that other can find relevent answer.

Community
  • 1
  • 1
User10001
  • 1,295
  • 2
  • 18
  • 30
  • 1
    Hi,you can fetch the location from GPS or from network provider or from the google service after passing it lac,cellid etc. if battery is your concern then you fetch the location from network provider that consume less battery has compare to GPS. – User10001 Apr 04 '14 at 18:02