Package com.unitech.api.display
Class DisplayCtrl
java.lang.Object
com.unitech.api.display.DisplayCtrl
The type Display ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleDisable screen lock bundle.BundleGet display timeout.BundleGet font size bundle.BundleGet the glove mode statusBundleGet screen backlight level bundle.BundleGet Screen OrientationBundleGet Screen PixelsBundleGet stay awake.BundleSetAutoBrightness(int mode) Set auto brightness bundle.BundleSetAutoRotation(boolean enabled) Set auto rotation bundle.BundlesetDisplayBatteryPercentage(boolean enable) Set Display BatteryPercentage .BundleSetDisplayTimeout(String timeout) Set display timeout.BundleSetFontSize(String data) Set font size.BundlesetGloveMode(boolean enabled) Enable / Disable the glove modeBundleSetScreenBacklightLevel(int value) Set screen backlight level bundle.BundleSetScreenOrientation(int orientation) Set screen orientation.BundleSetStayAwake(int input) Set stay awake.BundleShowLockScreenNotification(boolean show) Set screen lock notification.
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- See Also:
-
ERROR_UNSUPPORTED
- See Also:
-
BUNDLE_GLOVE_MODE
- See Also:
-
SCREEN_ROTATION_DISABLE
public static final int SCREEN_ROTATION_DISABLE- See Also:
-
SCREEN_ROTATION_PORTRAIT
public static final int SCREEN_ROTATION_PORTRAIT- See Also:
-
SCREEN_ROTATION_LANDSCAPE
public static final int SCREEN_ROTATION_LANDSCAPE- See Also:
-
SCREEN_ROTATION_REVERSE_PORTRAIT
public static final int SCREEN_ROTATION_REVERSE_PORTRAIT- See Also:
-
SCREEN_ROTATION_REVERSE_LANDSCAPE
public static final int SCREEN_ROTATION_REVERSE_LANDSCAPE- See Also:
-
SCREEN_ROTATION_AUTO
public static final int SCREEN_ROTATION_AUTO- See Also:
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Constructor Details
-
DisplayCtrl
public DisplayCtrl(Context context) Instantiates a new Display ctrl.- Parameters:
context- the context
-
-
Method Details
-
SetDisplayTimeout
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 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 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 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 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 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
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 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 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 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 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 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 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 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 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 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 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 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");
-