com.ardic.android.managers.peripheralconfig.IPeripheralConfigManager |
Provides a set of APIs for configurations of peripherals such as camera, usb, storage and sensors.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns whether ADB (Android Debug Bridge) is blocked or unblocked.
| |||||||||||
Returns whether ADB (Android Debug Bridge) is enabled or disabled.
| |||||||||||
Returns whether camera is blocked or unblocked.
| |||||||||||
Returns whether camera picture taking function is blocked or unblocked.
| |||||||||||
Returns whether camera video recording function is blocked or unblocked.
| |||||||||||
Returns whether Microphone is blocked or unblocked.
| |||||||||||
Returns whether NFC is blocked or unblocked.
| |||||||||||
Returns whether NFC (Near Field Communication) is enabled or disabled.
| |||||||||||
Returns whether Sdcard function is blocked or unblocked.
| |||||||||||
Returns whether USB Mass Storage (UMS) is blocked or unblocked.
| |||||||||||
Returns whether usb components is blocked or unblocked.
| |||||||||||
Returns whether USB Host Storage is blocked or unblocked.
| |||||||||||
Sets ADB (Android Debug Bridge) blocked/unblocked state.
| |||||||||||
Sets ADB (Android Debug Bridge) enabled/disabled state.
| |||||||||||
Sets camera blocked/unblocked state.
| |||||||||||
Set camera picture taking function to blocked/unblocked state.
| |||||||||||
Sets camera video recording function blocked/unblocked state.
| |||||||||||
Sets Microphone blocked/unblocked state.
| |||||||||||
Sets NFC (Near Field Communication) blocked/unblocked state.
| |||||||||||
Sets NFC (Near Field Communication) enabled/disabled state in Settings.
| |||||||||||
Sets SdCard to blocked/unblocked state.
| |||||||||||
Sets USB Mass Storage (UMS) blocked/unblocked state.
| |||||||||||
Sets Usb components to blocked/unblocked state.
| |||||||||||
Sets USB Host Storage blocked/unblocked state.
| |||||||||||
Wipes external storage which can SDCard or USBStorage.
|
Returns whether ADB (Android Debug Bridge) is blocked or unblocked.
Returns | |
---|---|
boolean |
true if ADB (Android Debug Bridge) is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether ADB (Android Debug Bridge) is enabled or disabled.
Returns | |
---|---|
boolean |
true if ADB (Android Debug Bridge) is enabled else false . |
Throws | |
---|---|
AfexException |
Returns whether camera is blocked or unblocked.
Returns | |
---|---|
boolean |
true if camera is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether camera picture taking function is blocked or unblocked.
Returns | |
---|---|
boolean |
true if camera picture taking function is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether camera video recording function is blocked or unblocked.
Returns | |
---|---|
boolean |
true if camera video recording function is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether Microphone is blocked or unblocked.
Returns | |
---|---|
boolean |
true if Microphone is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether NFC is blocked or unblocked.
Returns | |
---|---|
boolean |
true if NFC is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether NFC (Near Field Communication) is enabled or disabled.
Returns | |
---|---|
boolean |
true if NFC (Near Field Communication) is enabled else false . |
Throws | |
---|---|
AfexException |
Returns whether Sdcard function is blocked or unblocked.
Returns | |
---|---|
boolean |
true if Sdcard function is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether USB Mass Storage (UMS) is blocked or unblocked.
Returns | |
---|---|
boolean |
true if USB Mass Storage (UMS) is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether usb components is blocked or unblocked.
Returns | |
---|---|
boolean |
true if usb components is blocked else false . |
Throws | |
---|---|
AfexException |
Returns whether USB Host Storage is blocked or unblocked.
Returns | |
---|---|
boolean |
true if USB Host Storage is blocked else false . |
Throws | |
---|---|
AfexException |
Sets ADB (Android Debug Bridge) blocked/unblocked state.
Blocking case; ADB (Android Debug Bridge) is disabled ( setAdbEnabled(boolean)
) and
it is blocked.
The ADB (Android Debug Bridge) can not be enabled until it is unblocked.
Unblocking case; ADB (Android Debug Bridge) is unblocked and it is enabled (
setAdbEnabled(boolean)
).
Parameters | |
---|---|
state |
boolean :
true to block ADB (Android Debug Bridge) else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets ADB (Android Debug Bridge) enabled/disabled state.
Parameters | |
---|---|
state |
boolean :
true to enable else false . |
Returns | |
---|---|
boolean |
true if operation succeeds else false . |
Throws | |
---|---|
AfexException |
Sets camera blocked/unblocked state.
Blocking case; camera is blocked immediately.
The camera can not be used until it is unblocked.
Unblocking case; camera is unblocked and it can be used.
Parameters | |
---|---|
state |
boolean :
true to block camera else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Set camera picture taking function to blocked/unblocked state.
Blocking case; camera picture taking function is blocked immediately.
Camera picture taking function can not be used until it is unblocked.
Unblocking case; camera picture taking function is unblocked and it can be used. Warning:
This blockage could not block panorama and sphere mode capturing because of these features is
solely related with previewing image and mosaics then in application. So if you want to block
kind of these modes too, you should use setCameraBlocked(boolean)
api.
Parameters | |
---|---|
state |
boolean :
true to block camera picture taking else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets camera video recording function blocked/unblocked state.
Blocking case; camera recording function is blocked immediately.
Camera video recording function can not be used until it is unblocked.
Unblocking case; camera video recording function is unblocked and it can be used.
Parameters | |
---|---|
state |
boolean :
true to block camera video recording function else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets Microphone blocked/unblocked state.
Blocking case; Microphone is blocked immediately.
The Microphone can not be used for Voice Recording Purpose until it is unblocked.
Unblocking case; Microphone is unblocked and it can be used.
Parameters | |
---|---|
state |
boolean :
true to block Microphone else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets NFC (Near Field Communication) blocked/unblocked state.
Blocking case; NFC is blocked immediately.
The NFC can not be used until it is unblocked.
Unblocking case; NFC is unblocked and it can be used.
Parameters | |
---|---|
state |
boolean :
true to block NFC else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets NFC (Near Field Communication) enabled/disabled state in Settings.
Parameters | |
---|---|
state |
boolean :
true to enable else false . |
Returns | |
---|---|
boolean |
true if operation succeeds else false . |
Throws | |
---|---|
AfexException |
Sets SdCard to blocked/unblocked state.
Blocking case; if Sdcard is already mounted, it is unmounted and then blocked.
The Sdcard can not be mounted until it is unblocked.
Unblocking case; if Sdcard is unblocked and it can be mounted.
Parameters | |
---|---|
state |
boolean :
true to block Sdcard, false to unblock. |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets USB Mass Storage (UMS) blocked/unblocked state. (mounting the device to a host as a storage (sharing) can not occur)
Blocking case; if USB Mass Storage (UMS) is already mounted, sharing with host will be stopped and blocked.
The USB Mass Storage (UMS) can not be shared with host until it is unblocked.
Unblocking case; if USB Mass Storage (UMS) is unblocked and it can be shared.
Parameters | |
---|---|
state |
boolean :
true to block USB Mass Storage (UMS) else false . |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets Usb components to blocked/unblocked state. it blocks or unblocks some usb functions with a single API.
This Api bloks and unblocks adb, ums, usb host storage and uses the following APIs
setUsbHostStorageBlocked(boolean)
Also,it blocks another usb components such as usb accessory , usb audio etc.
Warning : This Api does not blocks usb Keyboard , mouse etc..
Attention: if they are blocked by using this Api setUsbBlocked(boolean)
, they can
not be unblocked individually by their Api until this api is unblocked.
Blocking case; the usb components is blocked immediately.
The usb components can not be used until it is unblocked.
Unblocking case; usb components is unblocked and it can be used.
Parameters | |
---|---|
state |
boolean :
true to block usb, false to unblock. |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Sets USB Host Storage blocked/unblocked state.
Blocking case; the USB Host Storage should not be accessible by applications. if USB Host Storage is already mounted to the device it will be unmounted immediately.
The USB Host Storage can not be accessible by applications until it is unblocked.
Unblocking case; if USB Host Storage is unblocked and it will be automatically mounted if it has inserted. it can be accessible by applications.
Parameters | |
---|---|
state |
boolean :
true to block USB Host Storage, false to unblock. |
Returns | |
---|---|
boolean |
true if the operation succeeds (or if the existing state is the same as the
requested state) else false . |
Throws | |
---|---|
AfexException |
Wipes external storage which can SDCard or USBStorage. This function tries to find one of removable device and starts to wipe the first matched volume it's requirements.
Returns | |
---|---|
boolean |
true if there is external storage else false . |
Throws | |
---|---|
AfexException |