Package app.akiles.sdk
Class ActionOptions
java.lang.Object
app.akiles.sdk.ActionOptions
Options used by
Akiles.action(String, String, String, ActionOptions, ActionCallback)
.-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
Whether to request Bluetooth permission if needed.boolean
Whether to request location permission if needed.boolean
Whether to try using the Bluetooth communication method.boolean
Whether to try using the internet communication method. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
requestBluetoothPermission
public boolean requestBluetoothPermissionWhether to request Bluetooth permission if needed.This controls the behavior when the app hasn't been granted Bluetooth permissions yet:
- If false, the Bluetooth communication method immediately errors with `BLUETOOTH_PERMISSION_NOT_GRANTED`.
- If true, the SDK will try to request the permission to the user and wait for a response. If granted, it carries on with the action. If not granted or it couldn't be requested, it errors with `BLUETOOTH_PERMISSION_NOT_GRANTED`. The permission can't be requested if the user has denied it twice, or if the `PermissionRequester` returns `false`.
-
requestLocationPermission
public boolean requestLocationPermissionWhether to request location permission if needed.This controls the behavior when the app hasn't been granted location permissions yet:
- If false, the internet communication method immediately errors with `LOCATION_PERMISSION_NOT_GRANTED`.
- If true, the SDK will try to request the permission to the user and wait for a response. If granted, it carries on with the action. If not granted or it couldn't be requested, it errors with `LOCATION_PERMISSION_NOT_GRANTED`. The permission can't be requested if the user has denied it twice, or if the `PermissionRequester` returns `false`.
-
useInternet
public boolean useInternetWhether to try using the internet communication method.If false, it immediately errors with `CANCELED`.
Default: `true`.
-
useBluetooth
public boolean useBluetoothWhether to try using the Bluetooth communication method.If false, it immediately errors with `CANCELED`.
Default: `true`.
-
-
Constructor Details
-
ActionOptions
public ActionOptions()Create a new `ActionOptions` with defaults.
-