PermissionHelper


public static class PermissionHelper


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

Summary

Constants

static final @NonNull String
static final int

Public fields

static @NonNull PermissionHelper

Public methods

final boolean
hasPermission(@NonNull Activity activity, @NonNull String permission)
final void
final void
requestPermission(
    @NonNull Activity activity,
    @NonNull String permission,
    int permissionCode
)
final boolean
shouldShowRequestPermissionRationale(
    @NonNull Activity activity,
    @NonNull String permission
)

Constants

SCENE_UNDERSTANDING_PERMISSION

Added in 1.0.0-alpha01
public static final @NonNull String SCENE_UNDERSTANDING_PERMISSION

SCENE_UNDERSTANDING_PERMISSION_CODE

Added in 1.0.0-alpha01
public static final int SCENE_UNDERSTANDING_PERMISSION_CODE = 0

Public fields

INSTANCE

Added in 1.0.0-alpha01
public static @NonNull PermissionHelper INSTANCE

Public methods

hasPermission

Added in 1.0.0-alpha01
public final boolean hasPermission(@NonNull Activity activity, @NonNull String permission)

launchPermissionSettings

Added in 1.0.0-alpha01
public final void launchPermissionSettings(@NonNull Activity activity)

requestPermission

Added in 1.0.0-alpha01
public final void requestPermission(
    @NonNull Activity activity,
    @NonNull String permission,
    int permissionCode
)

shouldShowRequestPermissionRationale

Added in 1.0.0-alpha01
public final boolean shouldShowRequestPermissionRationale(
    @NonNull Activity activity,
    @NonNull String permission
)