-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
public interface PermissionManager implements Advertiser<PermissionManager.Listener>
Manager that is responsible for all Android Permission related actions of the Pointr SDK
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
PermissionManager.Listener
-
Method Summary
Modifier and Type Method Description abstract Unit
requestBluetoothService()
Asks for Bluetooth Services to be enabled, if it is not already enabled. abstract Unit
requestBluetoothPermission(Activity activity, Integer requestCode)
Asks for Bluetooth Permissions android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN to be granted, if it is not already granted. abstract Unit
requestLocationService(Activity activity)
Asks for Location Services to be enabled, if it is not already enabled. abstract Unit
requestLocationPermissionForAlways(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION, if it is not already granted. abstract Unit
requestLocationPermissionForWhileInUse(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.ACCESS_FINE_LOCATION to be granted, if it is not already granted. abstract Unit
requestCameraPermission(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.CAMERA to be granted, if it is not already granted. abstract Boolean
getShouldRequestBluetoothService()
Determines whether Pointr SDK should ask for Bluetooth Service when needed. abstract Unit
setShouldRequestBluetoothService(Boolean shouldRequestBluetoothService)
Determines whether Pointr SDK should ask for Bluetooth Service when needed. abstract Boolean
getShouldRequestBluetoothPermission()
Determines whether Pointr SDK should ask for Bluetooth Permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) when needed. abstract Unit
setShouldRequestBluetoothPermission(Boolean shouldRequestBluetoothPermission)
Determines whether Pointr SDK should ask for Bluetooth Permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) when needed. abstract Boolean
getShouldRequestLocationService()
Determines whether Pointr SDK should ask for Location Service when needed. abstract Unit
setShouldRequestLocationService(Boolean shouldRequestLocationService)
Determines whether Pointr SDK should ask for Location Service when needed. abstract Boolean
getShouldRequestLocationPermissionForAlways()
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION when needed. abstract Unit
setShouldRequestLocationPermissionForAlways(Boolean shouldRequestLocationPermissionForAlways)
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION when needed. abstract Boolean
getShouldRequestLocationPermissionForWhileInUse()
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_FINE_LOCATION when needed. abstract Unit
setShouldRequestLocationPermissionForWhileInUse(Boolean shouldRequestLocationPermissionForWhileInUse)
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_FINE_LOCATION when needed. abstract Boolean
getShouldRequestCameraPermission()
Determines whether Pointr SDK should ask for android.Manifest.permission.CAMERA when needed. abstract Unit
setShouldRequestCameraPermission(Boolean shouldRequestCameraPermission)
Determines whether Pointr SDK should ask for android.Manifest.permission.CAMERA when needed. abstract Boolean
getIsBluetoothServicesEnabled()
True if Bluetooth Service is enabled, false otherwise. abstract Boolean
getIsLocationServicesEnabled()
True if Location Service is enabled, false otherwise. abstract BluetoothPermissionState
getBluetoothPermissionState()
Current Bluetooth Permission State. abstract LocationPermissionState
getLocationPermissionState()
Current Location Permission State. abstract Boolean
getHasBluetoothPermission()
True if required Bluetooth permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) are granted, false otherwise. abstract Boolean
getHasLocationPermissionAlways()
True if android.Manifest.permission.ACCESS_BACKGROUND_LOCATION is granted, false otherwise. abstract Boolean
getHasLocationPermissionWhileInUse()
True if android.Manifest.permission.ACCESS_FINE_LOCATION is granted, false otherwise. abstract Boolean
getHasLocationPermissionAlwaysOrWhileInUse()
True if android.Manifest.permission.ACCESS_BACKGROUND_LOCATION or android.Manifest.permission.ACCESS_FINE_LOCATION is granted, false otherwise. abstract Boolean
getHasCameraPermission()
True if android.Manifest.permission.CAMERA is granted, false otherwise. -
-
Method Detail
-
requestBluetoothService
abstract Unit requestBluetoothService()
Asks for Bluetooth Services to be enabled, if it is not already enabled.
-
requestBluetoothPermission
abstract Unit requestBluetoothPermission(Activity activity, Integer requestCode)
Asks for Bluetooth Permissions android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN to be granted, if it is not already granted. Applicable for Android S and later.
-
requestLocationService
abstract Unit requestLocationService(Activity activity)
Asks for Location Services to be enabled, if it is not already enabled.
- Parameters:
activity
- An activity that will be used as context to ask for permission
-
requestLocationPermissionForAlways
abstract Unit requestLocationPermissionForAlways(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION, if it is not already granted. Applicable for Android Q and later.
- Parameters:
activity
- An activity that will be used as context to ask for permissionrequestCode
- To track for request's result.
-
requestLocationPermissionForWhileInUse
abstract Unit requestLocationPermissionForWhileInUse(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.ACCESS_FINE_LOCATION to be granted, if it is not already granted. Applicable for Android M and later.
- Parameters:
activity
- An activity that will be used as context to ask for permissionrequestCode
- To track for request's result.
-
requestCameraPermission
abstract Unit requestCameraPermission(Activity activity, Integer requestCode)
Asks for android.Manifest.permission.CAMERA to be granted, if it is not already granted.
- Parameters:
activity
- An activity that will be used as context to ask for permissionrequestCode
- To track for request's result.
-
getShouldRequestBluetoothService
abstract Boolean getShouldRequestBluetoothService()
Determines whether Pointr SDK should ask for Bluetooth Service when needed. True by default. Set it to false, to disable this behavior.
-
setShouldRequestBluetoothService
abstract Unit setShouldRequestBluetoothService(Boolean shouldRequestBluetoothService)
Determines whether Pointr SDK should ask for Bluetooth Service when needed. True by default. Set it to false, to disable this behavior.
-
getShouldRequestBluetoothPermission
abstract Boolean getShouldRequestBluetoothPermission()
Determines whether Pointr SDK should ask for Bluetooth Permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) when needed. True by default. Set it to false, to disable this behavior. Applicable for Android S and later.
-
setShouldRequestBluetoothPermission
abstract Unit setShouldRequestBluetoothPermission(Boolean shouldRequestBluetoothPermission)
Determines whether Pointr SDK should ask for Bluetooth Permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) when needed. True by default. Set it to false, to disable this behavior. Applicable for Android S and later.
-
getShouldRequestLocationService
abstract Boolean getShouldRequestLocationService()
Determines whether Pointr SDK should ask for Location Service when needed. True by default. Set it to false, to disable this behavior.
-
setShouldRequestLocationService
abstract Unit setShouldRequestLocationService(Boolean shouldRequestLocationService)
Determines whether Pointr SDK should ask for Location Service when needed. True by default. Set it to false, to disable this behavior.
-
getShouldRequestLocationPermissionForAlways
abstract Boolean getShouldRequestLocationPermissionForAlways()
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION when needed. True by default. Set it to false, to disable this behavior.
-
setShouldRequestLocationPermissionForAlways
abstract Unit setShouldRequestLocationPermissionForAlways(Boolean shouldRequestLocationPermissionForAlways)
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_BACKGROUND_LOCATION when needed. True by default. Set it to false, to disable this behavior.
-
getShouldRequestLocationPermissionForWhileInUse
abstract Boolean getShouldRequestLocationPermissionForWhileInUse()
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_FINE_LOCATION when needed. True by default. Set it to false, to disable this behavior.
-
setShouldRequestLocationPermissionForWhileInUse
abstract Unit setShouldRequestLocationPermissionForWhileInUse(Boolean shouldRequestLocationPermissionForWhileInUse)
Determines whether Pointr SDK should ask for android.Manifest.permission.ACCESS_FINE_LOCATION when needed. True by default. Set it to false, to disable this behavior.
-
getShouldRequestCameraPermission
abstract Boolean getShouldRequestCameraPermission()
Determines whether Pointr SDK should ask for android.Manifest.permission.CAMERA when needed. True by default. Set it to false, to disable this behavior.
-
setShouldRequestCameraPermission
abstract Unit setShouldRequestCameraPermission(Boolean shouldRequestCameraPermission)
Determines whether Pointr SDK should ask for android.Manifest.permission.CAMERA when needed. True by default. Set it to false, to disable this behavior.
-
getIsBluetoothServicesEnabled
abstract Boolean getIsBluetoothServicesEnabled()
True if Bluetooth Service is enabled, false otherwise.
-
getIsLocationServicesEnabled
abstract Boolean getIsLocationServicesEnabled()
True if Location Service is enabled, false otherwise.
-
getBluetoothPermissionState
abstract BluetoothPermissionState getBluetoothPermissionState()
Current Bluetooth Permission State. See BluetoothPermissionState
-
getLocationPermissionState
abstract LocationPermissionState getLocationPermissionState()
Current Location Permission State. See LocationPermissionState
-
getHasBluetoothPermission
abstract Boolean getHasBluetoothPermission()
True if required Bluetooth permissions (android.Manifest.permission.BLUETOOTH_CONNECT&android.Manifest.permission.BLUETOOTH_SCAN) are granted, false otherwise.
-
getHasLocationPermissionAlways
abstract Boolean getHasLocationPermissionAlways()
True if android.Manifest.permission.ACCESS_BACKGROUND_LOCATION is granted, false otherwise.
-
getHasLocationPermissionWhileInUse
abstract Boolean getHasLocationPermissionWhileInUse()
True if android.Manifest.permission.ACCESS_FINE_LOCATION is granted, false otherwise.
-
getHasLocationPermissionAlwaysOrWhileInUse
abstract Boolean getHasLocationPermissionAlwaysOrWhileInUse()
True if android.Manifest.permission.ACCESS_BACKGROUND_LOCATION or android.Manifest.permission.ACCESS_FINE_LOCATION is granted, false otherwise.
-
getHasCameraPermission
abstract Boolean getHasCameraPermission()
True if android.Manifest.permission.CAMERA is granted, false otherwise.
-
-
-
-