Skip to main content

androidRequestPermission

Type​

command

Summary​

Displays a dialog showing a permission request for permissionName. If a user has already granted permission for permissionName, this command does nothing.

Syntax​

androidRequestPermission <permissionName>

Description​

Use the androidRequestPermission command to request permission for permissionName from the user.

note

Permission names are case sensitive.

Parameters​

NameTypeDescription

permissionName

enum

The name of the permission to request.

Examples​

local tCameraPermissionGranted
put androidHasPermission("android.permission.CAMERA") into tCameraPermissionGranted
if not tCameraPermissionGranted then
androidRequestPermission "android.permission.CAMERA"
end if
put androidHasPermission("android.permission.CAMERA") into tCameraPermissionGranted
if not tCameraPermissionGranted then
answer "This app is not permitted to access the device camera. You can change this" && \
"in the Settings app."
end if

Compatibility and Support​

Introduced

LiveCode 9.0.1

OS

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?