Yes.This can be done in android.You can find the location through your gps or network(wi-fi or cellular network).But generally gps is pretty time consuming so you use a combination of both the gps and network to determine your location.This link will give you a better idea on how to get the user location http://developer.android.com/guide/topics/location/obtaining-user-location.html.
This is sample code on retrieveing the location.Remember to follow the above links and request for location updates.
LocationManager locationManager= (LocationManager) getSystemService(context);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_FINE);
criteria.setAltitudeRequired(false);
criteria.setBearingRequired(false);
criteria.setCostAllowed(true);
criteria.setPowerRequirement(Criteria.POWER_LOW);
provider = locationManager.getBestProvider(criteria, true);
Location location = locationManager.getLastKnownLocation(provider)
Here in the above code your latitude and longitude will be stored inside the variable location.Remember to add the location listener and request for location updates.