Package com.unitech.api.display
Class DisplayCtrl
- java.lang.Object
-
- com.unitech.api.display.DisplayCtrl
-
public class DisplayCtrl extends java.lang.ObjectThe type Display ctrl.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic java.lang.StringBUNDLE_GLOVE_MODEstatic java.lang.StringERROR_UNSUPPORTEDstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESSstatic intSCREEN_ROTATION_AUTOstatic intSCREEN_ROTATION_DISABLEstatic intSCREEN_ROTATION_LANDSCAPEstatic intSCREEN_ROTATION_PORTRAITstatic intSCREEN_ROTATION_REVERSE_LANDSCAPEstatic intSCREEN_ROTATION_REVERSE_PORTRAIT
-
Constructor Summary
Constructors Constructor Description DisplayCtrl(android.content.Context context)Instantiates a new Display ctrl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.os.BundleDisableScreenLock()Disable screen lock bundle.android.os.BundleGetDisplayTimeout()Get display timeout.android.os.BundleGetFontSize()Get font size bundle.android.os.BundlegetGloveMode()Get the glove mode statusandroid.os.BundleGetScreenBacklightLevel()Get screen backlight level bundle.android.os.BundleGetStayAwake()Get 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(java.lang.String timeout)Set display timeout.android.os.BundleSetFontSize(java.lang.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 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
-
ERROR_UNSUPPORTED
public static final java.lang.String ERROR_UNSUPPORTED
- See Also:
- Constant Field Values
-
BUNDLE_GLOVE_MODE
public static final java.lang.String BUNDLE_GLOVE_MODE
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_DISABLE
public static final int SCREEN_ROTATION_DISABLE
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_PORTRAIT
public static final int SCREEN_ROTATION_PORTRAIT
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_LANDSCAPE
public static final int SCREEN_ROTATION_LANDSCAPE
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_REVERSE_PORTRAIT
public static final int SCREEN_ROTATION_REVERSE_PORTRAIT
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_REVERSE_LANDSCAPE
public static final int SCREEN_ROTATION_REVERSE_LANDSCAPE
- See Also:
- Constant Field Values
-
SCREEN_ROTATION_AUTO
public static final int SCREEN_ROTATION_AUTO
- 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
-
-
Method Detail
-
SetDisplayTimeout
public android.os.Bundle SetDisplayTimeout(java.lang.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(java.lang.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)- 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");
-
-