1

I've tested my App on Android OREO 8.1 (Nexus 5X upgraded), and the location by GPS returns null:

LocationManager locationManager = (LocationManager) MyApplication.getInstance().
                getSystemService(Context.LOCATION_SERVICE);

if (locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
     // With GPS
     location = locationManager.getLastKnownLocation(locationManager, LocationManager.GPS_PROVIDER);
}

And location object is always null.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
anthony
  • 7,653
  • 8
  • 49
  • 101

0 Answers0