-
- All Implemented Interfaces:
-
java.io.Serializable
public class Permissions.Options implements Serializable
Options to customize while requesting permissions.
-
-
Field Summary
Fields Modifier and Type Field Description StringsettingsTextStringrationaleDialogTitleStringsettingsDialogTitleStringsettingsDialogMessagebooleancreateNewTask
-
Method Summary
Modifier and Type Method Description Permissions.OptionssetSettingsText(String settingsText)Sets the button text for "settings" while asking user to go to settings. Permissions.OptionssetRationaleDialogTitle(String rationaleDialogTitle)Sets the title text for permission rationale dialog. Permissions.OptionssetSettingsDialogTitle(String settingsDialogTitle)Sets the title text of the dialog which asks user to go to settings, in the case whenpermission(s) have been set not to ask again. Permissions.OptionssetSettingsDialogMessage(String settingsDialogMessage)Sets the message of the dialog which asks user to go to settings, in the case whenpermission(s) have been set not to ask again. Permissions.OptionssetCreateNewTask(boolean createNewTask)Sets the "Create new Task" flag in Intent, for when we'recalling this library from within a Service or othernon-activity context. Permissions.OptionssendDontAskAgainToSettings(boolean send)In the case the user has previously set some permissions not to ask again, if this flagis true the user will be prompted to go to settings and provide the permissions otherwisethe method onDenied will be invokeddirectly. -
-
Method Detail
-
setSettingsText
Permissions.Options setSettingsText(String settingsText)
Sets the button text for "settings" while asking user to go to settings.
- Parameters:
settingsText- The text for "settings".
-
setRationaleDialogTitle
Permissions.Options setRationaleDialogTitle(String rationaleDialogTitle)
Sets the title text for permission rationale dialog.
- Parameters:
rationaleDialogTitle- the title text.
-
setSettingsDialogTitle
Permissions.Options setSettingsDialogTitle(String settingsDialogTitle)
Sets the title text of the dialog which asks user to go to settings, in the case whenpermission(s) have been set not to ask again.
- Parameters:
settingsDialogTitle- the title text.
-
setSettingsDialogMessage
Permissions.Options setSettingsDialogMessage(String settingsDialogMessage)
Sets the message of the dialog which asks user to go to settings, in the case whenpermission(s) have been set not to ask again.
- Parameters:
settingsDialogMessage- the dialog message.
-
setCreateNewTask
Permissions.Options setCreateNewTask(boolean createNewTask)
Sets the "Create new Task" flag in Intent, for when we'recalling this library from within a Service or othernon-activity context.
- Parameters:
createNewTask- true if we need the Intent.
-
sendDontAskAgainToSettings
Permissions.Options sendDontAskAgainToSettings(boolean send)
In the case the user has previously set some permissions not to ask again, if this flagis true the user will be prompted to go to settings and provide the permissions otherwisethe method onDenied will be invokeddirectly. The default state is true.
- Parameters:
send- whether to ask user to go to settings or not.
-
-
-
-