public class RequestPermissionsSoftAskActivity extends RequestPermissionsBaseActivity implements RequestDialogListener
RequestPermissionsBaseActivity.RESULT_PERMISSION_GRANTED_LIST
as an ArrayList.
The denied permissions will be provided with RequestPermissionsBaseActivity.RESULT_PERMISSION_DENIED_LIST
as an ArrayList.Modifier and Type | Class and Description |
---|---|
static class |
RequestPermissionsSoftAskActivity.IntentBuilder
Builder that can be used to generate an Intent which will start this Activity.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAM_API_KEY_STRING
Registered Xapp API key.
|
static java.lang.String |
PARAM_APP_KEY_STRING
Registered Xapp APP key registered to the app.
|
static java.lang.String |
PARAM_CREATIVE_ONLY_BOOL
Boolean indicating if only the cached strategy should be used.
|
static java.lang.String |
PARAM_TYPE_INT
Type of dialog that should be used.
|
static int |
TYPE_IMAGE
Type of dialog to display should be the paging image dialog.
|
static int |
TYPE_TEXT
Type of dialog to display should be a text dialog.
|
PARAM_PERMISSION_ARR_LIST, RESULT_PERMISSION_DENIED_LIST, RESULT_PERMISSION_GRANTED_LIST
Constructor and Description |
---|
RequestPermissionsSoftAskActivity() |
Modifier and Type | Method and Description |
---|---|
void |
closing(RequestPermissionsCreativeFragment fragment,
boolean showingFragment) |
static RequestPermissionsSoftAskActivity.IntentBuilder |
newIntent(java.util.Collection<Permission> permissions) |
boolean |
onAccept()
The user has accepted the requested permissions.
|
void |
onCancel()
Notification that the dialog has been canceled.
|
void |
onCreate(android.os.Bundle savedInstanceState) |
boolean |
onDecline()
The user has declined to give the permissions.
|
void |
onDismiss()
Notification that the dialog has been dismissed.
|
void |
onResume() |
protected void |
onShowRationale(java.util.Collection<Permission> permissions)
Inheriting activities can call this to show their rationale for the given permissions.
|
static void |
requestPermission(android.app.Activity activity,
java.util.Collection<Permission> permissions,
int requestCode)
Deprecated.
|
void |
showingStrategy(java.lang.String from,
Strategy strategy,
Creative creative) |
declineRequestPermissions, getDeniedPermissions, onRequestPermissionsResult, onSaveInstanceState, requestPermissions
public static int TYPE_TEXT
public static int TYPE_IMAGE
public static final java.lang.String PARAM_API_KEY_STRING
public static final java.lang.String PARAM_APP_KEY_STRING
public static final java.lang.String PARAM_TYPE_INT
TYPE_TEXT
or TYPE_IMAGE
The default is TYPE_TEXT.
Type: intpublic static final java.lang.String PARAM_CREATIVE_ONLY_BOOL
public static RequestPermissionsSoftAskActivity.IntentBuilder newIntent(java.util.Collection<Permission> permissions)
@Deprecated public static void requestPermission(android.app.Activity activity, java.util.Collection<Permission> permissions, int requestCode)
activity
- Calling activity.permissions
- Permissions to request.requestCode
- Request code that will be returned with Activity.onActivityResult(int, int, Intent)
.public void onCreate(android.os.Bundle savedInstanceState)
RequestPermissionsBaseActivity
onCreate
in class RequestPermissionsBaseActivity
public void onResume()
public boolean onAccept()
RequestDialogListener
onAccept
in interface RequestDialogListener
public boolean onDecline()
RequestDialogListener
onDecline
in interface RequestDialogListener
public void onCancel()
RequestDialogListener
DialogFragment#isCancelable()
is true and the user tapped outside the dialog or Dialog.cancel()
was explicitly called.
Generally this can be treated as a decline, but it generally means the user did not explicitly accept
or decline the requests.onCancel
in interface RequestDialogListener
public void onDismiss()
RequestDialogListener
onDismiss
in interface RequestDialogListener
protected void onShowRationale(java.util.Collection<Permission> permissions)
RequestPermissionsBaseActivity
onShowRationale
in class RequestPermissionsBaseActivity
permissions
- Permissions that have not been granted yet and the reason for them to exist should
be explained to the user.public void showingStrategy(java.lang.String from, Strategy strategy, Creative creative)
public void closing(RequestPermissionsCreativeFragment fragment, boolean showingFragment)