I am a newbie in android and want to develop an android app. I want to enable some functions only when the device is in Geo fencing area. What are some possible solutions?
Asked
Active
Viewed 53 times
1 Answers
1
Get user 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 the user distance is more than your desired area that means user is out of your geofencing area.
For latitude & longitude points - Helpful Link

Abhishek
- 329
- 3
- 12
-
I have created geofence but I want to enable the button only when user is in the geofence area. – Mrinal Sharma Aug 30 '19 at 10:18
-
On user's onLocationChanged method compare the geofencing area and enable or disable your button. – Abhishek Aug 30 '19 at 10:27