Package com.unitech.api.general
Class GeneralCtrl
java.lang.Object
com.unitech.api.general.GeneralCtrl
The type General ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleGet Device Build NumberBundleGet Device Serial NumberBundlesetImeCurrentKeyboard(String data) Sets ime current keyboard.BundlesetLanguage(String language) Sets language.
-
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
-
GeneralCtrl
public GeneralCtrl(Context context) Instantiates a new General ctrl.- Parameters:
context- the context
-
-
Method Details
-
setLanguage
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
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 Bundle getDeviceSerialNumber()Get Device 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");
String getDeviceSerialNumber=bundle.getString("getDeviceSerialNumber");
-
getDeviceBuildNumber
public Bundle getDeviceBuildNumber()Get Device Build Number- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg=bundle.getString("errorMsg");
String getDeviceBuildNumber=bundle.getString("getDeviceBuildNumber");
-