karatuno
karatuno

Reputation: 395

Can we use geofencing on user's current location?

I've seen geofencing examples where the geofence is around a fixed location and wherever someone enters or exit we get a notification.

Can we use geofencing on the user's current location who is constantly moving and whenever any saved location comes within 50 meters, the user gets a notification?

Upvotes: 0

Views: 707

Answers (1)

Stephen Kennedy
Stephen Kennedy

Reputation: 21548

You can meet your requirements using geofences but you have the logic the wrong way round.

Let's call your 'saved location' a 'Point of Interest' (POI). A geofence is a "virtual perimeter for a real-world geographic area" (the POI). Geofencing is a "means of notification when a location-aware mobile device crosses this virtual perimeter" (the user).

  • Create a geofence for each POI. The geofence should be a circle with the POI coordinates at the centre, and with a radius of 50 metres+.

  • The user is the mobile device. You track their progress.

  • Configure an entry alert notification for each of the POI geofences subscribed to by the user.

If the user enters the geofence they are within 50 metres of the point of interest.

Upvotes: 1

Related Questions