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)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: Nothing): Intent
Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?)