Package com.unitech.api.display
Class DisplayCtrl
java.lang.Object
com.unitech.api.display.DisplayCtrl
The type Display ctrl.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDisplayCtrl(android.content.Context context) Instantiates a new Display ctrl. -
Method Summary
Modifier and TypeMethodDescriptionandroid.os.BundleDisable screen lock bundle.android.os.BundleGet display timeout.android.os.BundleGet font size bundle.android.os.BundleGet the glove mode statusandroid.os.BundleGet screen backlight level bundle.android.os.BundleGet Screen Orientationandroid.os.BundleGet Screen Pixelsandroid.os.BundleGet stay awake.android.os.BundleSetAutoBrightness(int mode) Set auto brightness bundle.android.os.BundleSetAutoRotation(boolean enabled) Set auto rotation bundle.android.os.BundlesetDisplayBatteryPercentage(boolean enable) Set Display BatteryPercentage .android.os.BundleSetDisplayTimeout(String timeout) Set display timeout.android.os.BundleSetFontSize(String data) Set font size.android.os.BundlesetGloveMode(boolean enabled) Enable / Disable the glove modeandroid.os.BundleSetScreenBacklightLevel(int value) Set screen backlight level bundle.android.os.BundleSetScreenOrientation(int orientation) Set screen orientation.android.os.BundleSetStayAwake(int input) Set stay awake.android.os.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(android.content.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 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
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");
-