Package com.unitech.api.uapps
Class SoftwareUpdateCtrl
java.lang.Object
com.unitech.api.uapps.SoftwareUpdateCtrl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleexportSettings(String filepath) Export Software Update Config to fileBundleimportSettings(String filepath) Import Software Update Config fileBundleReset Software Update SettingBundleupdateConfig(String serverUrl, int opmode, int policyInstalled, String selectedApps, int policyNew, String passcode) update "Software Update" config data.BundleupdateConfig(ArrayList repository, int opmode, int updatePolicy, String selectedApps, String passcode) update "Software Update" config data.
-
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:
-
KEY_STEP
- See Also:
-
KEY_ACTION
- See Also:
-
KEY_CONF_FILE_PATH
- See Also:
-
KEY_OP_MODE
- See Also:
-
KEY_POLICY_INSTALLED
- See Also:
-
KEY_POLICY_INSTALLED_LIST
- See Also:
-
KEY_POLICY_NEW
- See Also:
-
KEY_PASSCODE
- See Also:
-
KEY_SERVER_URL
- See Also:
-
-
Constructor Details
-
SoftwareUpdateCtrl
public SoftwareUpdateCtrl(Context context) Instantiates a new SoftwareUpdateCtrl.- Parameters:
context-
-
-
Method Details
-
updateConfig
public Bundle updateConfig(ArrayList repository, int opmode, int updatePolicy, String selectedApps, String passcode) update "Software Update" config data.(For Software Update version 1.1.12 and after)- Parameters:
repository- ArrayLIst (String, String) the server name, server url. Split name and url with "," and split pairs with ";". Add ";" at the end even if there is only one data pair.opmode- the op mode (Normal Mode:0, Auto Mode:1, Auto Silent Mode:2, Disable:3) (int)updatePolicy- update policy (All Apps:0, App Updates:1, New Apps:2, Selected Apps:3) (int)selectedApps- Selected Apps (Split with ","). e.g. KeyRemap,Software Update,USS,UNote,StageGO,OEMConfig (String)passcode- Passcode (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
updateConfig
public Bundle updateConfig(String serverUrl, int opmode, int policyInstalled, String selectedApps, int policyNew, String passcode) update "Software Update" config data.(For Software Update version 1.1.11 and before)- Parameters:
serverUrl- the server url (String)opmode- the op mode (Normal Mode:0, Auto Mode:1, Auto Silent Mode:2, Disable:3) (int)policyInstalled- the policy installed (All:0, None:1, Selected:2) (int)selectedApps- Selected Apps (Split with ","). e.g. KeyRemap,Software Update,USS,UNote,StageGO,OEMConfig (String)policyNew- Policy New (None:0, Install:1) (int)passcode- Passcode (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
exportSettings
Export Software Update Config to file- Parameters:
filepath- file path (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
importSettings
Import Software Update Config file- Parameters:
filepath- file path (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
resetSettings
public Bundle resetSettings()Reset Software Update Setting- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-