-
public abstract class PermissionLauncherA permission launcher for a unique permission. For multiple permissions use MultiplePermissionsLauncher.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePermissionLauncher.Launcher
-
Field Summary
Fields Modifier and Type Field Description private final <ERROR CLASS>permission
-
Constructor Summary
Constructors Constructor Description PermissionLauncher(String rawPermission)
-
Method Summary
Modifier and Type Method Description final <ERROR CLASS>getPermission()Requested permission. final Unitlaunch(Function2<String, RationalePermissionLauncher, Unit> rationaleCallback, Function2<String, Boolean, Unit> deniedCallback, Function1<String, Unit> grantedCallback)Start permission request with optional specified callbacks. -
-
Constructor Detail
-
PermissionLauncher
PermissionLauncher(String rawPermission)
-
-
Method Detail
-
getPermission
final <ERROR CLASS> getPermission()
Requested permission.
-
launch
final Unit launch(Function2<String, RationalePermissionLauncher, Unit> rationaleCallback, Function2<String, Boolean, Unit> deniedCallback, Function1<String, Unit> grantedCallback)
Start permission request with optional specified callbacks.
- Parameters:
rationaleCallback- A optional rationale callback called for this specific launch when this launcher is launched and a rationale should be present to user.deniedCallback- A optional denied callback called for this specific launch when this launcher failed.grantedCallback- A success callback called for this specific launch when this launcher succeeded.
-
-
-
-