In my application I have to alert user when other person enters in the Geofence circular area.
For a better understanding: I want to alert the parent who uses the application that its child has reached at home.
Here I saved the child location data(updated in every 1 min) in server.
I understand a little that how to check if the user is inside the circular area from Geofence documentation. But unable to understand that how I will do it for a server data. I also read something about Mock Location but not sure how to start. I think my problem is understandable a little by others.
Is anyone did something like my app. please help with some suggestions and examples. Thanks
Not sure, but it seems like geofence with family(updates coming from server) location. If your application is used by the total family, then you can do something like below.
Use the same Geofence request/response with your family member's location data.
//Save all geofence data same as before
//here id=server_id, latitude=server_latitude, longitude=server_longitude
//and radious=server_radious
SimpleGeofence fences = new SimpleGeofence(id, latitude, longitude, radious,
50000000, Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT);
When your family member reaches/leaves the circle, the geofence working in his/her device(in your app) will detect the area and send message(use message in place of notification) where you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With