requestPermission

fun requestPermission(permission: String, onDeniedResult: (List<PermissionDeniedItem>) -> Unit, onRationaleNeeded: (PermissionRationaleRequest) -> Unit? = null, onNavigateToSettings: (PermissionSettingsRequest) -> Unit? = null)

Requests a single permission and returns denied results via callback.
Must be called on the main thread.

단일 권한을 요청하고 거부 결과를 콜백으로 반환합니다.
메인 스레드에서만 호출해야 합니다.

Parameters

permission

Permission string to request.

요청할 권한 문자열입니다.

onDeniedResult

Callback invoked with denied items.

거부 항목을 전달받는 콜백입니다.

onRationaleNeeded

Callback for rationale UI when needed.

Call proceed(), cancel(), or defer(policy) inside the callback. Returning without an action auto-cancels the flow.
콜백 안에서 proceed(), cancel(), defer(policy) 중 하나를 호출해야 하며, 아무 액션 없이 반환되면 흐름은 자동 취소됩니다.
필요 시 설명 UI를 제공하는 콜백입니다.

onNavigateToSettings

Callback for settings navigation when needed.

Call proceed(), cancel(), or defer(policy) inside the callback. Returning without an action auto-cancels the flow.
콜백 안에서 proceed(), cancel(), defer(policy) 중 하나를 호출해야 하며, 아무 액션 없이 반환되면 흐름은 자동 취소됩니다.
필요 시 설정 이동을 안내하는 콜백입니다.