Two methods of Android silent installation
preface
Generally, an installation interface will appear when installing APK on Android system. Users can click OK or cancel to install APK. However, in the actual project requirements, there is a requirement that APK should be installed in the background (there is no prompt in the installation interface). This installation method is called silent installation. The following article introduces two methods to realize it. Let's have a look together.
1. Implementation of root privilege silent installation
The actual implementation uses the Su PM install - R filepath command.
The core code is as follows:
2. The non root authority prompts the user to install. The code is as follows:
summary
The above is all about the silent installation of Android. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message. Thank you for your support for programming tips.