public Location getLocation() { LocationManager locationManager = (LocationManager) mContext .getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = locationManager.getBestProvider(criteria, false); locationManager.requestLocationUpdates( provider, 0, 0, this); Location location = locationManager .getLastKnownLocation(provider); return location; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)