Package com.unitech.api.general
Class GeneralCtrl
- java.lang.Object
-
- com.unitech.api.general.GeneralCtrl
-
public class GeneralCtrl extends java.lang.ObjectThe type General ctrl.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBUNDLE_ERROR_CODEstatic java.lang.StringBUNDLE_ERROR_MSGstatic intRESULT_CODE_ERRORstatic intRESULT_CODE_SUCCESS
-
Constructor Summary
Constructors Constructor Description GeneralCtrl(android.content.Context context)Instantiates a new General ctrl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.os.BundlegetDeviceBuildNumber()Gets a string that uniquely identifies this buildandroid.os.BundlegetDeviceSerialNumber()Gets the hardware serial numberandroid.os.BundlesetImeCurrentKeyboard(java.lang.String data)Sets ime current keyboard.android.os.BundlesetLanguage(java.lang.String language)Sets language.
-
-
-
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
-
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
-
setLanguage
public android.os.Bundle setLanguage(java.lang.String language)
Sets language.- Parameters:
language- ex: zh-TW, en-us (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setImeCurrentKeyboard
public android.os.Bundle setImeCurrentKeyboard(java.lang.String data)
Sets ime current keyboard. query ime data command ex: adb shell ime list -a ,- Parameters:
data- keyboard data. (String) Input PackageName or PackageName/ClassName ex: com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME or com.google.android.inputmethod.pinyin/.PinyinIME- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getDeviceSerialNumber
public android.os.Bundle getDeviceSerialNumber()
Gets the hardware serial number- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
getDeviceBuildNumber
public android.os.Bundle getDeviceBuildNumber()
Gets a string that uniquely identifies this build- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
-