-
-
Save hichamboushaba/28c511857c41ccbddbc516303255d732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PermissionManager { | |
fun hasPermission(permission: String): Boolean | |
suspend fun requestPermission(permission: String): PermissionStatus | |
suspend fun requestPermissions(vararg permission: String): Map<String, PermissionStatus> | |
} | |
sealed class PermissionStatus | |
object PermissionGranted : PermissionStatus() | |
data class PermissionDenied(val shouldShowRationale: Boolean) : PermissionStatus() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment