GrantPermission

sealed interface GrantPermission

Represents a system permission that can be requested on Android and iOS.

This sealed interface provides a unified, type-safe abstraction over common OS permissions (AppGrant) and custom platform-specific permissions (RawPermission).

Extensibility

While AppGrant covers 90% of common use cases, new OS versions (Android 15+, iOS 18+) and enterprise-specific requirements often demand permissions not yet included in the library. RawPermission allows you to support these instantly without waiting for a library update.

Example Usage

// Standard permission (recommended)
val status = grantManager.request(AppGrant.CAMERA)

// Custom Android 15 permission
val customPermission = RawPermission(
identifier = "ACCESS_AI_PROCESSOR",
androidPermissions = listOf("android.permission.ACCESS_AI_PROCESSOR")
)
val status = grantManager.request(customPermission)

Inheritors

Properties

Link copied to clipboard
abstract val identifier: String

Unique identifier for this permission.

Link copied to clipboard

Whether this permission needs a specific transition from PARTIAL to background access.