public class PermissionRequest
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
PermissionRequest.Response
Callback Interface
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
NEEDED_EDITOR_PERMISSIONS
Permissions needed for the Editor Activity
|
static java.lang.String[] |
NEEDED_PREVIEW_PERMISSIONS
Permissions needed for the Preview Activity
|
| Constructor and Description |
|---|
PermissionRequest() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getPermission(android.content.Context context,
java.lang.String[] permissions,
PermissionRequest.Response response)
Request Android Permissions.
|
static void |
getPermission(android.content.Context context,
java.lang.String permissions,
PermissionRequest.Response response)
Request Android Permissions.
|
static boolean |
hasAllPermission(android.content.Context context,
java.lang.String[] permissions)
Check if the user has granted the permissions.
|
static void |
onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults)
Must bee called by Activity.onRequestPermissionsResult
|
public static final java.lang.String[] NEEDED_PREVIEW_PERMISSIONS
public static final java.lang.String[] NEEDED_EDITOR_PERMISSIONS
public static void getPermission(android.content.Context context,
java.lang.String permissions,
PermissionRequest.Response response)
context - The Context of the Activity or the Fragment.permissions - The Permission you are need.response - Result callback.public static boolean hasAllPermission(android.content.Context context,
java.lang.String[] permissions)
context - a Android contextpermissions - The Permission you are need to check.public static void getPermission(android.content.Context context,
java.lang.String[] permissions,
PermissionRequest.Response response)
context - The Context of the Activity or the Fragment.permissions - The Permissions you are need.response - Result callback.public static void onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults)
requestCode - The automatically generated request codepermissions - The requested permissionsgrantResults - The result codes of the requestActivity