PermissionHelper


object PermissionHelper


Utility class for handling Android permissions. SceneCore applications should use this before creating Anchors.

Summary

Public functions

Boolean
hasPermission(activity: Activity, permission: String)
Unit
Unit
requestPermission(
    activity: Activity,
    permission: String,
    permissionCode: Int
)
Boolean
shouldShowRequestPermissionRationale(
    activity: Activity,
    permission: String
)

Constants

SCENE_UNDERSTANDING_PERMISSION

Added in 1.0.0-alpha01
const val SCENE_UNDERSTANDING_PERMISSIONString

SCENE_UNDERSTANDING_PERMISSION_CODE

Added in 1.0.0-alpha01
const val SCENE_UNDERSTANDING_PERMISSION_CODE = 0: Int

Public functions

hasPermission

Added in 1.0.0-alpha01
fun hasPermission(activity: Activity, permission: String): Boolean

launchPermissionSettings

Added in 1.0.0-alpha01
fun launchPermissionSettings(activity: Activity): Unit

requestPermission

Added in 1.0.0-alpha01
fun requestPermission(
    activity: Activity,
    permission: String,
    permissionCode: Int
): Unit

shouldShowRequestPermissionRationale

Added in 1.0.0-alpha01
fun shouldShowRequestPermissionRationale(
    activity: Activity,
    permission: String
): Boolean