= context.getSystemService( Context.LOCATION_SERVICE) as LocationManager private val listener = object : LocationListener { override fun onLocationChanged(location: Location) { value = location } … } override fun onActive() { locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0f, listener) } override fun onInactive() { locationManager.removeUpdates(listener) } } -JWF%BUBך⡲倯 PO"DUJWF ד -PDBUJPO.BOBHFSךٔأش٦إحز