Added in API level 1
public interface

IPeripheralConfigManager

com.ardic.android.managers.peripheralconfig.IPeripheralConfigManager

Class Overview

Provides a set of APIs for configurations of peripherals such as camera, usb, storage and sensors.

Summary

Public Methods
abstract boolean isAdbBlocked()
Returns whether ADB (Android Debug Bridge) is blocked or unblocked.
abstract boolean isAdbEnabled()
Returns whether ADB (Android Debug Bridge) is enabled or disabled.
abstract boolean isCameraBlocked()
Returns whether camera is blocked or unblocked.
abstract boolean isCameraPictureBlocked()
Returns whether camera picture taking function is blocked or unblocked.
abstract boolean isCameraVideoBlocked()
Returns whether camera video recording function is blocked or unblocked.
abstract boolean isMicrophoneBlocked()
Returns whether Microphone is blocked or unblocked.
abstract boolean isNfcBlocked()
Returns whether NFC is blocked or unblocked.
abstract boolean isNfcEnabled()
Returns whether NFC (Near Field Communication) is enabled or disabled.
abstract boolean isSdCardBlocked()
Returns whether Sdcard function is blocked or unblocked.
abstract boolean isUmsBlocked()
Returns whether USB Mass Storage (UMS) is blocked or unblocked.
abstract boolean isUsbBlocked()
Returns whether usb components is blocked or unblocked.
abstract boolean isUsbHostStorageBlocked()
Returns whether USB Host Storage is blocked or unblocked.
abstract boolean setAdbBlocked(boolean state)
Sets ADB (Android Debug Bridge) blocked/unblocked state.
abstract boolean setAdbEnabled(boolean state)
Sets ADB (Android Debug Bridge) enabled/disabled state.
abstract boolean setCameraBlocked(boolean state)
Sets camera blocked/unblocked state.
abstract boolean setCameraPictureBlocked(boolean state)
Set camera picture taking function to blocked/unblocked state.
abstract boolean setCameraVideoBlocked(boolean state)
Sets camera video recording function blocked/unblocked state.
abstract boolean setMicrophoneBlocked(boolean state)
Sets Microphone blocked/unblocked state.
abstract boolean setNfcBlocked(boolean state)
Sets NFC (Near Field Communication) blocked/unblocked state.
abstract boolean setNfcEnabled(boolean state)
Sets NFC (Near Field Communication) enabled/disabled state in Settings.
abstract boolean setSdCardBlocked(boolean state)
Sets SdCard to blocked/unblocked state.
abstract boolean setUmsBlocked(boolean state)
Sets USB Mass Storage (UMS) blocked/unblocked state.
abstract boolean setUsbBlocked(boolean state)
Sets Usb components to blocked/unblocked state.
abstract boolean setUsbHostStorageBlocked(boolean state)
Sets USB Host Storage blocked/unblocked state.
abstract boolean wipeExternalStorage()
Wipes external storage which can SDCard or USBStorage.

Public Methods

public abstract boolean isAdbBlocked ()

Added in API level 1

Returns whether ADB (Android Debug Bridge) is blocked or unblocked.

Returns
boolean true if ADB (Android Debug Bridge) is blocked else false.
Throws
AfexException

public abstract boolean isAdbEnabled ()

Added in API level 1

Returns whether ADB (Android Debug Bridge) is enabled or disabled.

Returns
boolean true if ADB (Android Debug Bridge) is enabled else false.
Throws
AfexException

public abstract boolean isCameraBlocked ()

Added in API level 1

Returns whether camera is blocked or unblocked.

Returns
boolean true if camera is blocked else false.
Throws
AfexException

public abstract boolean isCameraPictureBlocked ()

Added in API level 1

Returns whether camera picture taking function is blocked or unblocked.

Returns
boolean true if camera picture taking function is blocked else false.
Throws
AfexException

public abstract boolean isCameraVideoBlocked ()

Added in API level 1

Returns whether camera video recording function is blocked or unblocked.

Returns
boolean true if camera video recording function is blocked else false.
Throws
AfexException

public abstract boolean isMicrophoneBlocked ()

Added in API level 2

Returns whether Microphone is blocked or unblocked.

Returns
boolean true if Microphone is blocked else false.
Throws
AfexException

public abstract boolean isNfcBlocked ()

Added in API level 2

Returns whether NFC is blocked or unblocked.

Returns
boolean true if NFC is blocked else false.
Throws
AfexException

public abstract boolean isNfcEnabled ()

Added in API level 2

Returns whether NFC (Near Field Communication) is enabled or disabled.

Returns
boolean true if NFC (Near Field Communication) is enabled else false.
Throws
AfexException

public abstract boolean isSdCardBlocked ()

Added in API level 1

Returns whether Sdcard function is blocked or unblocked.

Returns
boolean true if Sdcard function is blocked else false.
Throws
AfexException

public abstract boolean isUmsBlocked ()

Added in API level 1

Returns whether USB Mass Storage (UMS) is blocked or unblocked.

Returns
boolean true if USB Mass Storage (UMS) is blocked else false.
Throws
AfexException

public abstract boolean isUsbBlocked ()

Added in API level 1

Returns whether usb components is blocked or unblocked.

Returns
boolean true if usb components is blocked else false.
Throws
AfexException

public abstract boolean isUsbHostStorageBlocked ()

Added in API level 1

Returns whether USB Host Storage is blocked or unblocked.

Returns
boolean true if USB Host Storage is blocked else false.
Throws
AfexException

public abstract boolean setAdbBlocked (boolean state)

Added in API level 1

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

public abstract boolean setAdbEnabled (boolean state)

Added in API level 1

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

public abstract boolean setCameraBlocked (boolean state)

Added in API level 1

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

public abstract boolean setCameraPictureBlocked (boolean state)

Added in API level 1

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

public abstract boolean setCameraVideoBlocked (boolean state)

Added in API level 1

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

public abstract boolean setMicrophoneBlocked (boolean state)

Added in API level 2

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

public abstract boolean setNfcBlocked (boolean state)

Added in API level 2

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

public abstract boolean setNfcEnabled (boolean state)

Added in API level 2

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

public abstract boolean setSdCardBlocked (boolean state)

Added in API level 1

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

public abstract boolean setUmsBlocked (boolean state)

Added in API level 1

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

public abstract boolean setUsbBlocked (boolean state)

Added in API level 1

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

setAdbBlocked(boolean)

setUmsBlocked(boolean)

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

public abstract boolean setUsbHostStorageBlocked (boolean state)

Added in API level 1

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

public abstract boolean wipeExternalStorage ()

Added in API level 2

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