Class DisplayCtrl

java.lang.Object
com.unitech.api.display.DisplayCtrl

public class DisplayCtrl extends Object
The type Display ctrl.
  • Field Details

  • Constructor Details

    • DisplayCtrl

      public DisplayCtrl(android.content.Context context)
      Instantiates a new Display ctrl.
      Parameters:
      context - the context
  • Method Details

    • SetDisplayTimeout

      public android.os.Bundle SetDisplayTimeout(String timeout)
      Set display timeout.
      Parameters:
      timeout - the timeout (String) Timeout: {"Never", "15 seconds", "30 seconds", "1 minute", "2 minutes", "5 minutes", "10 minutes", "30 minutes"} OR {NEVER, 15, 30, 60, 120, 300, 600, 1800}
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • GetDisplayTimeout

      public android.os.Bundle GetDisplayTimeout()
      Get display timeout.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      String displayTimeout = getString("DisplayTimeout");
      Timeout: (ex: NEVER, 15, 30, 60, 120, 300, 600, 1800 (second))
    • SetStayAwake

      public android.os.Bundle SetStayAwake(int input)
      Set stay awake.
      Parameters:
      input - the input, "0:false, 1:true"
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • SetScreenOrientation

      public android.os.Bundle SetScreenOrientation(int orientation)
      Set screen orientation.
      Parameters:
      orientation - the screen orientation, 0:disable, 1:portrait, 2:landscape, 3:reverse portrait, 4:reverse landscape, 5:auto
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • ShowLockScreenNotification

      public android.os.Bundle ShowLockScreenNotification(boolean show)
      Set screen lock notification.
      Parameters:
      show - the notification, "false:hide, true:show"
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • GetStayAwake

      public android.os.Bundle GetStayAwake()
      Get stay awake.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      int stayAwake = bundle.getInt("StayAwake"); (0:false, 1:true)
    • SetFontSize

      public android.os.Bundle SetFontSize(String data)
      Set font size.
      Parameters:
      data - fontSize, String, size: (small, default, large, largest)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • GetFontSize

      public android.os.Bundle GetFontSize()
      Get font size bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      String fontSize = bundle.getString("FontSize"); size:(small, default, large, largest)
    • SetScreenBacklightLevel

      public android.os.Bundle SetScreenBacklightLevel(int value)
      Set screen backlight level bundle.
      Parameters:
      value - the value, (0-255), PA768 min value is 1.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • GetScreenBacklightLevel

      public android.os.Bundle GetScreenBacklightLevel()
      Get screen backlight level bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      int screenBacklightLevel = bundle.getInt("ScreenBacklightLevel");
    • SetAutoBrightness

      public android.os.Bundle SetAutoBrightness(int mode)
      Set auto brightness bundle.
      Parameters:
      mode - the mode, 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");
    • DisableScreenLock

      public android.os.Bundle DisableScreenLock()
      Disable screen lock bundle.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • SetAutoRotation

      public android.os.Bundle SetAutoRotation(boolean enabled)
      Set auto rotation bundle.
      Parameters:
      enabled - true or false (boolean)
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • setDisplayBatteryPercentage

      public android.os.Bundle setDisplayBatteryPercentage(boolean enable)
      Set Display BatteryPercentage .
      Parameters:
      enable - the enabled
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getGloveMode

      public android.os.Bundle getGloveMode()
      Get the glove mode status
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
      boolean gloveMode = bundle.getBoolean(DisplayCtrl.BUNDLE_GLOVE_MODE);
    • setGloveMode

      public android.os.Bundle setGloveMode(boolean enabled)
      Enable / Disable the glove mode
      Parameters:
      enabled - true: The glove mode is enabled. false: The glove mode is disabled
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg = bundle.getString("errorMsg");
    • getScreenPixels

      public android.os.Bundle getScreenPixels()
      Get Screen Pixels
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getScreenPixels=bundle.getString("getScreenPixels");
    • getScreenOrientation

      public android.os.Bundle getScreenOrientation()
      Get Screen Orientation
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      String getScreenOrientation=bundle.getString("getScreenOrientation");