Class DmiCtrl

java.lang.Object
com.unitech.api.dmi.DmiCtrl

public class DmiCtrl extends Object
The type Dmi ctrl.
  • Field Details

  • Constructor Details

    • DmiCtrl

      public DmiCtrl(Context context)
      Instantiates a new Dmi ctrl.
      Parameters:
      context - the context
  • Method Details

    • DCMO_Get

      public Bundle DCMO_Get(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 errorCode = 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 Bundle DCMO_Set(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. 1: Enable, 0: Disable
      Returns:
      A bundle contains the error code and message
      int errorCode = 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");