Package com.unitech.api.keypad
Class KeypadCtrl
java.lang.Object
com.unitech.api.keypad.KeypadCtrl
The type General ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleGet keypad alpha key enable setting.BundleGet keypad alpha mode enable setting.BundleGet keypad backlight enable setting.BundleGet keypad function key enable setting.BundleGet keypad function mode enable setting.BundlegetMode()Get keypad mode setting.BundlegetSound()Get keypad sound enable setting.BundleGet keypad vibration enable setting.BundlesetAlphaKey(boolean enable) Set keypad alpha key enableBundlesetAlphaMode(boolean enable) Set keypad alpha mode enableBundlesetBacklight(boolean enable) Set keypad backlight enable mode.BundlesetFunctionKey(boolean enable) Set keypad function key enable.BundlesetFunctionMode(boolean enable) Set keypad function mode enable.BundlesetMode(int mode) Set keypad mode.BundlesetSound(boolean enable) Set keypad sound enable mode.BundlesetVibration(boolean enable) Set keypad vibration enable mode.
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- 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
-
KeypadCtrl
public KeypadCtrl(Context context) Instantiates a new Keypad ctrl.- Parameters:
context- the context
-
-
Method Details
-
setSound
public Bundle setSound(boolean enable) Set keypad sound enable mode.- Parameters:
enable- the keypad sound, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getSound
public Bundle getSound()Get keypad sound enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setVibration
public Bundle setVibration(boolean enable) Set keypad vibration enable mode.- Parameters:
enable- the keypad vibration, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getVibration
public Bundle getVibration()Get keypad vibration enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setBacklight
public Bundle setBacklight(boolean enable) Set keypad backlight enable mode.- Parameters:
enable- the keypad backlight, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getBacklight
public Bundle getBacklight()Get keypad backlight enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setMode
public Bundle setMode(int mode) Set keypad mode.- Parameters:
mode- the keypad mode, "0:numeric mode, 2:function mode"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getMode
public Bundle getMode()Get keypad mode setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int mode = bundle.getInt("mode"); (0:numeric mode, 2:function mode)
-
setFunctionMode
public Bundle setFunctionMode(boolean enable) Set keypad function mode enable.- Parameters:
enable- the keypad function mode, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getFunctionMode
public Bundle getFunctionMode()Get keypad function mode enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setFunctionKey
public Bundle setFunctionKey(boolean enable) Set keypad function key enable.- Parameters:
enable- the keypad function key, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getFunctionKey
public Bundle getFunctionKey()Get keypad function key enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setAlphaMode
public Bundle setAlphaMode(boolean enable) Set keypad alpha mode enable- Parameters:
enable- the keypad alpha mode, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getAlphaMode
public Bundle getAlphaMode()Get keypad alpha mode enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-
setAlphaKey
public Bundle setAlphaKey(boolean enable) Set keypad alpha key enable- Parameters:
enable- the keypad alpha key, "false:disable, true:enable"- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getAlphaKey
public Bundle getAlphaKey()Get keypad alpha key enable setting.- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
int enable = bundle.getInt("enable"); (0:false, 1:true)
-