How to implement Geofence to track other users?
I am developing an application that will track family members, and I want to implement a Geofence function that will allow the user to do this: user A will track user B
user A will determine the geofuntation zone and when user B logs into this geopotency user, A will receive a notification
I deleted the location of user B every 10 minutes, and I want to create a Geofence for user B, which will notify user A when user B enters the geography area
I am trying to use Google Geofence like this code:
mGeofenceList.add(new Geofence.Builder() // Set the request ID of the geofence. This is a string to identify this // geofence. .setRequestId(entry.getKey()) .setCircularRegion( entry.getValue().latitude, entry.getValue().longitude, Constants.GEOFENCE_RADIUS_IN_METERS ) .setExpirationDuration(Constants.GEOFENCE_EXPIRATION_IN_MILLISECONDS) .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT) .build());
but it just works for the user device "user location" is not for another user location.
source share