Package com.unitech.api.dmi
Class DmiCtrl
- java.lang.Object
-
- com.unitech.api.dmi.DmiCtrl
-
public class DmiCtrl extends java.lang.ObjectThe type Dmi ctrl.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic intDISABLEstatic java.lang.StringDMI_BLUETOOTHstatic java.lang.StringDMI_CAMERAstatic java.lang.StringDMI_DOZE_MODEstatic java.lang.StringDMI_FLASHLIGHTstatic java.lang.StringDMI_GPSstatic java.lang.StringDMI_PHYSICAL_KEYBOARDstatic java.lang.StringDMI_TOUCHstatic java.lang.StringDMI_USBstatic java.lang.StringDMI_USB_MTP_MODEstatic java.lang.StringDMI_VIRTUAL_KEYBOARDstatic java.lang.StringDMI_WLANstatic java.lang.StringDMI_WWANstatic intENABLEstatic java.lang.StringKEY_MESSAGEstatic java.lang.StringKEY_MODULEstatic java.lang.StringKEY_RESULTstatic java.lang.StringKEY_STATUSstatic intNOT_SUPPORTstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESS
-
Constructor Summary
Constructors Constructor Description DmiCtrl(android.content.Context context)Instantiates a new Dmi ctrl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.os.BundleDCMO_Get(java.lang.String cmdData)DMI get bundle.android.os.BundleDCMO_Set(java.lang.String cmdData, int enable)DMI set bundle.
-
-
-
Field Detail
-
BUNDLE_ERROR_CODE
public static final java.lang.String BUNDLE_ERROR_CODE
- See Also:
- Constant Field Values
-
BUNDLE_ERROR_MSG
public static final java.lang.String BUNDLE_ERROR_MSG
- See Also:
- Constant Field Values
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR
- See Also:
- Constant Field Values
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS
- See Also:
- Constant Field Values
-
KEY_MODULE
public static final java.lang.String KEY_MODULE
- See Also:
- Constant Field Values
-
KEY_STATUS
public static final java.lang.String KEY_STATUS
- See Also:
- Constant Field Values
-
KEY_RESULT
public static final java.lang.String KEY_RESULT
- See Also:
- Constant Field Values
-
KEY_MESSAGE
public static final java.lang.String KEY_MESSAGE
- See Also:
- Constant Field Values
-
DMI_CAMERA
public static final java.lang.String DMI_CAMERA
- See Also:
- Constant Field Values
-
DMI_TOUCH
public static final java.lang.String DMI_TOUCH
- See Also:
- Constant Field Values
-
DMI_FLASHLIGHT
public static final java.lang.String DMI_FLASHLIGHT
- See Also:
- Constant Field Values
-
DMI_PHYSICAL_KEYBOARD
public static final java.lang.String DMI_PHYSICAL_KEYBOARD
- See Also:
- Constant Field Values
-
DMI_VIRTUAL_KEYBOARD
public static final java.lang.String DMI_VIRTUAL_KEYBOARD
- See Also:
- Constant Field Values
-
DMI_USB
public static final java.lang.String DMI_USB
- See Also:
- Constant Field Values
-
DMI_USB_MTP_MODE
public static final java.lang.String DMI_USB_MTP_MODE
- See Also:
- Constant Field Values
-
DMI_GPS
public static final java.lang.String DMI_GPS
- See Also:
- Constant Field Values
-
DMI_BLUETOOTH
public static final java.lang.String DMI_BLUETOOTH
- See Also:
- Constant Field Values
-
DMI_WLAN
public static final java.lang.String DMI_WLAN
- See Also:
- Constant Field Values
-
DMI_WWAN
public static final java.lang.String DMI_WWAN
- See Also:
- Constant Field Values
-
DMI_DOZE_MODE
public static final java.lang.String DMI_DOZE_MODE
- See Also:
- Constant Field Values
-
ENABLE
public static final int ENABLE
- See Also:
- Constant Field Values
-
DISABLE
public static final int DISABLE
- See Also:
- Constant Field Values
-
NOT_SUPPORT
public static final int NOT_SUPPORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
DCMO_Get
public android.os.Bundle DCMO_Get(java.lang.String cmdData)
DMI get bundle.- Parameters:
cmdData- the target DMI items. Supported the following items:
"Touch"
"Keyboard" (PhysicalKeyboard)
"Usb"
"UsbMtpMode"
"Gps"
"WWAN"
"Scanner"
"Camera"
"Ime" (VirtualKeyboard)
"WLAN"
"Bluetooth"
"Flash" (Flashlight)
"DozeMode"- Returns:
- A bundle contains the error code and message
int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
Boolean result = bundle.getBoolean("Result");
Result = 1 -> True
Result = 0 -> False
Result = 2 -> Not Support
int status = bundle.getInt("Status");
-
DCMO_Set
public android.os.Bundle DCMO_Set(java.lang.String cmdData, int enable)DMI set bundle.- Parameters:
cmdData- the target DMI item. Supported the following items:
"Touch"
"Keyboard" (PhysicalKeyboard)
"Usb"
"UsbMtpMode"
"Gps"
"WWAN"
"Scanner"
"Camera"
"Ime" (VirtualKeyboard)
"WLAN"
"Bluetooth"
"Flash" (Flashlight)
"DozeMode"enable- Turn on / off the target item. true: Enable, false: Disable- Returns:
- A bundle contains the error code and message
int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
Boolean result = bundle.getBoolean("Result");
Result = 1 -> True
Result = 0 -> False
Result = 2 -> Not Support
int status = bundle.getInt("Status");
-
-