LocationSettingsContract
private var enableLocationRetryCount = 1 private val enableLocation = registerForActivityResult(LocationSettingsContract()) { if (enableLocationRetryCount <= 2) { checkIfLocationAccessIsEnabled() enableLocationRetryCount++ } else { shortToast(R.string.enable_location_access) } }
function call enableLocation(null)
Functions
Link copied to clipboard
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: Nothing): ActivityResultContract.SynchronousResult<Unit>?
Link copied to clipboard