Closed youlovejohnny closed 5 years ago
Hi, sometimes lastKnownLocation is not available and location provider just returns null. That's why getLastKnownLocation() method returns Maybe and not Single. Forcing maybe to become single throws NoSuchElementException in case it is empty. If lastKnownLocation is not available you have to fetch location differently.
Hello! I'm trying to get last location: Manifest:
Function:
But i got error:
All permissions are granted, other applications are working (e.g google maps) Whats wrong?
Asus ZC600KL (asus zenfon 5 lite) 7.1 android
All works on emulator, asus 520 (7.0), xiaomi mi 8 se (9.1), samsung s7 (8)