This commit is contained in:
misaochan 2018-04-14 22:17:21 +10:00
parent a6e8b1d68a
commit 1b8e841a62

View file

@ -81,6 +81,7 @@ public class LocationServiceManager implements LocationListener {
public LatLng getLKN() {
if (ContextCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
//TODO: Check for network provider as well?
Location lastKN = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
LatLng lastLatLng = LatLng.from(lastKN);
return lastLatLng;