public class AppPermissionHandler extends java.lang.Object implements PermissionHandler
PermissionHandler.PermissionCallback| Modifier and Type | Field and Description |
|---|---|
static int |
DELAY_TO_COLLECT_PERMISSIONS_TO_ASK_MILLIS
Delay to collect permissions to ask before requesting them.
|
static int |
PERMISSION_REQUEST_ID
The id of the permission request.
|
| Constructor and Description |
|---|
AppPermissionHandler(android.content.Context context)
Instantiates a new App permission handler.
|
| Modifier and Type | Method and Description |
|---|---|
AndroidPermissionChecker |
addLocationChecker()
Method creates new instance of
AndroidPermissionChecker.LocationChecker
and adds it to the builder of permission checkers list. |
AndroidPermissionChecker |
addWriteSDCardCheck()
Method returns new instance of
AndroidPermissionChecker.WriteSDCardChecker
and adds it to the builder of permission checkers list. |
void |
askForNotGrantedPermissions()
Perform action to ask a user for not granted permissions.
|
void |
askForNotGrantedPermissions(PermissionHandler.PermissionCallback callback)
Perform action to ask a user for not granted permissions.
|
ImmutableList.Builder<AndroidPermissionChecker> |
getAndroidPermissionCheckersBuilder()
Getter for a builder of permission checkers list.
|
public static final int DELAY_TO_COLLECT_PERMISSIONS_TO_ASK_MILLIS
public static int PERMISSION_REQUEST_ID
public AppPermissionHandler(android.content.Context context)
context - activity contextpublic void askForNotGrantedPermissions()
PermissionHandleraskForNotGrantedPermissions in interface PermissionHandlerpublic ImmutableList.Builder<AndroidPermissionChecker> getAndroidPermissionCheckersBuilder()
public void askForNotGrantedPermissions(PermissionHandler.PermissionCallback callback)
PermissionHandleraskForNotGrantedPermissions in interface PermissionHandlercallback - the callback with the information whether user has granted the permission.public AndroidPermissionChecker addLocationChecker()
AndroidPermissionChecker.LocationChecker
and adds it to the builder of permission checkers list.public AndroidPermissionChecker addWriteSDCardCheck()
AndroidPermissionChecker.WriteSDCardChecker
and adds it to the builder of permission checkers list.