PackageInstaller offers the ability to install, upgrade, and remove applications on Android devices.
PackageInstaller Class offers the ability to install, upgrade, and remove applications on the Android device. This includes support for apps packaged either as a single "monolithic" APK, or apps packaged as multiple "split" APKs.
An app is delivered for installation through a PackageInstaller.Session, which any app can create. Once the session is created, the installer can stream one or more APKs into place until it decides to either commit or destroy the session. Committing may require user intervention to complete the installation.
Sessions can install brand new apps, upgrade existing apps, or add new splits into an existing app.
Apps packaged as multiple split APKs always consist of a single "base" APK (with a null split name) and zero or more "split" APKs (with unique split names). Any subset of these APKs can be installed together, as long as the following constraints are met:
- All
APKsmust have the exact same package name, version code, and signing certificates. - All APKs must have unique split names.
- All installations must contain a single base APK.
Read more
