Get current location Android Kotlin
问题 I try to get the current Location with GM API in my application (using Android Studio). But if i click the button which triggers the getLocation() funktion, i always end up in the catch{} block and i dont know why. My mobile device is connected for testing. Here is the getLocation() Funktion: fun getLocation() { var locationManager = getSystemService(LOCATION_SERVICE) as LocationManager? var locationListener = object : LocationListener{ override fun onLocationChanged(location: Location?) {