I am developing a attendence app. It logs in user when user reaches in office else it shows a message "not in office". So for this i need to get users location and need to check whether its between office longitude latitude values. the user can login only if the user is in between that longitude latitude values of office. How to develop this app.
After getting location of user, you just can check the distance from origin points that is your office (lat,Lon) if user fall within range you have mention just mark it.
float[] results = new float[1];
Location.distanceBetween(currentlatitude, currentlongitude, originLat, originLon, results);
float distanceInMeters = results[0];
boolean isWithinRange = distanceInMeters < 3000;
if (isWithinRange) {
//write your code what ever you wanna perform
}