How to silence install、update、delete: Difference between revisions
Line 36: | Line 36: | ||
| boolean || true is success, false is failure. | | boolean || true is success, false is failure. | ||
|} | |} | ||
=== <big>installApkFile</big> === | === <big>installApkFile</big> === | ||
Line 57: | Line 58: | ||
| int || Installation return code, see PackageManager's code. for example: INSTALL_SUCCEEDED = 1. | | int || Installation return code, see PackageManager's code. for example: INSTALL_SUCCEEDED = 1. | ||
|} | |} | ||
=== <big>Uninstall</big> === | === <big>Uninstall</big> === | ||
<syntaxhighlight lang="java">boolean uninstall(String packageName,String adminPassword);</syntaxhighlight > | <syntaxhighlight lang="java">boolean uninstall(String packageName,String adminPassword);</syntaxhighlight > |
Revision as of 08:03, 12 November 2021
Provide the AIDL interface to help the third-party app to implment silence install/uninstall/update app or reboot device.
Permission
The app declares the following permission in the manifest.
Permission | Function |
---|---|
android.permission.CLOUDPOS_INSTALL_SILENCE | silence install |
android.permission.CLOUDPOS_UNINSTALL_SILENCE | silence uninstall |
android.permission.CLOUDPOS_REBOOT | silence reboot |
API Overview
Install
boolean install(String apkPath,String adminPassword);
Install silently.
Parameters | |
---|---|
apkPath | String: the path of the apk. |
adminPassword | String: the POS adminstrator login password, default is 99999999. |
Returns | |
---|---|
boolean | true is success, false is failure. |
installApkFile
int installApkFile(String apkFilePath);
Install silently.
Parameters | |
---|---|
apkFilePath | String: the path of the apk. |
Returns | |
---|---|
int | Installation return code, see PackageManager's code. for example: INSTALL_SUCCEEDED = 1. |
Uninstall
boolean uninstall(String packageName,String adminPassword);
Uninstalls silently.
Parameters | |
---|---|
apkPath | String: the path of the apk. |
adminPassword | String: the POS adminstrator login password, default is 99999999. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Update
boolean update(String apkPath,String adminPassword);
Updates silently.
Parameters | |
---|---|
apkPath | String: the path of the apk. |
adminPassword | String: the POS adminstrator login password, default is 99999999. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Reboot
boolean reboot(String adminPassword);
Reboots silently.
Parameters | |
---|---|
adminPassword | String: the POS adminstrator login password, default is 99999999. |
Returns | |
---|---|
boolean | true is success, false is failure. |
Download
Please download the whold project demo