Added in API level 1
public interface

ICommandManager

com.ardic.android.managers.command.ICommandManager

Class Overview

Provides a set of APIs for executes commands such as reboot, wipe, etc. on the device and returns results or data to the caller.

Summary

Public Methods
abstract void reboot(boolean confirm, boolean wait)
Reboots the device.
abstract void rebootWipeCache()
Reboots into the recovery mode to wipe the /cache partition.
abstract void rebootWipeUserData()
Reboots the device and wipes the user data partition.
abstract void shutdown(boolean confirm, boolean wait)
Shutdowns the device.
abstract boolean startRinging(float volume, String localUri)
Starts ringing.
abstract boolean stopRinging()
Stops ringing.
abstract Bitmap takeScreenshot()
Returns screenshot of screen and returns as Bitmap
abstract void wakeUp()
Wakes the device up immediately.

Public Methods

public abstract void reboot (boolean confirm, boolean wait)

Added in API level 1

Reboots the device.

Parameters
confirm boolean: If true, shows a reboot confirmation dialog.
wait boolean: If true, this call waits for the reboot to complete and does not return.
Throws
AfexException

public abstract void rebootWipeCache ()

Added in API level 1

Reboots into the recovery mode to wipe the /cache partition.

Throws
IOException if something goes wrong.
AfexException

public abstract void rebootWipeUserData ()

Added in API level 1

Reboots the device and wipes the user data partition. This is sometimes called a "factory reset", which is something of a misnomer because the system partition is not restored to its factory state.

Throws
IOException if writing the recovery command file fails, or if the reboot itself fails.
AfexException

public abstract void shutdown (boolean confirm, boolean wait)

Added in API level 1

Shutdowns the device.

Parameters
confirm boolean: If true, shows a reboot confirmation dialog.
wait boolean: If true, this call waits for the reboot to complete and does not return.
Throws
AfexException

public abstract boolean startRinging (float volume, String localUri)

Added in API level 1

Starts ringing.

Parameters
volume float: Volume level in [0-7] range
localUri String: Indicates audio file URI. If it is null, default audio ring plays.
Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract boolean stopRinging ()

Added in API level 1

Stops ringing.

Returns
boolean true if the operation succeeds else false
Throws
AfexException

public abstract Bitmap takeScreenshot ()

Added in API level 1

Returns screenshot of screen and returns as Bitmap

Returns
Bitmap Bitmap
Throws
AfexException

public abstract void wakeUp ()

Added in API level 1

Wakes the device up immediately.

Throws
AfexException