checkStatus

abstract suspend fun checkStatus(grant: GrantPermission): GrantStatus

Checks the current status of a permission WITHOUT showing any UI.

Use this to check before triggering features or to update UI state.

Supports both built-in and custom permissions:

  • AppGrant enum values (recommended for common permissions)

  • RawPermission for custom/platform-specific permissions

Return

Current status (GRANTED, DENIED, DENIED_ALWAYS, NOT_DETERMINED)

Example (built-in permission):

val status = grantManager.checkStatus(AppGrant.CAMERA)
if (status == GrantStatus.GRANTED) {
openCamera()
}

Example (custom permission):

val customPermission = RawPermission(
identifier = "CUSTOM_FEATURE",
androidPermissions = listOf("com.company.permission.CUSTOM"),
iosUsageKey = "NSCustomUsageDescription"
)
val status = grantManager.checkStatus(customPermission)

Parameters

grant

The permission to check (AppGrant or RawPermission)