Package-level declarations

Types

Link copied to clipboard
class CreateVideoContract(videoType: String = "video/*") : ActivityResultContract<String?, Uri?>

private val registerDocumentContract = registerForActivityResult(CreateVideo()) { if (it == null) { //Operation cancelled or no application to handle the action! } else { val uri = it } }

Link copied to clipboard

private var enableLocationRetryCount = 1 private val enableLocation = registerForActivityResult(LocationSettingsContract()) { if (enableLocationRetryCount <= 2) { checkIfLocationAccessIsEnabled() enableLocationRetryCount++ } else { shortToast(R.string.enable_location_access) } }

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun Fragment.askForMultiplePermissions(crossinline onDenied: () -> Unit = {}, crossinline onPermissionsGranted: () -> Unit = {}): ActivityResultLauncher<Array<String>>
inline fun FragmentActivity.askForMultiplePermissions(crossinline onDenied: () -> Unit = {}, crossinline onPermissionsGranted: () -> Unit = {}): ActivityResultLauncher<Array<String>>
Link copied to clipboard
inline fun Fragment.askForSinglePermission(crossinline onDenied: () -> Unit = {}, crossinline onPermissionsGranted: () -> Unit = {}): ActivityResultLauncher<String>
inline fun FragmentActivity.askForSinglePermission(crossinline onDenied: () -> Unit = {}, crossinline onPermissionsGranted: () -> Unit = {}): ActivityResultLauncher<String>
Link copied to clipboard
inline fun Fragment.enableGPS(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {}): ActivityResultLauncher<Nothing>
inline fun FragmentActivity.enableGPS(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {}): ActivityResultLauncher<Nothing>
Link copied to clipboard
inline fun Fragment.getBackgroundLocationPermission(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {})
inline fun FragmentActivity.getBackgroundLocationPermission(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {})
Link copied to clipboard
inline fun Fragment.getCameraPermission(crossinline onDenied: () -> Unit = {}, crossinline onGranted: () -> Unit = {})
inline fun FragmentActivity.getCameraPermission(crossinline onDenied: () -> Unit = {}, crossinline onGranted: () -> Unit = {})
Link copied to clipboard
inline fun Fragment.getForegroundLocationPermission(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {})
inline fun FragmentActivity.getForegroundLocationPermission(crossinline onDenied: () -> Unit = {}, crossinline onLocationGranted: () -> Unit = {})