I am writing an application/service for a product that DOES NOT meet the requirements for PackageInstaller.SessionParams.setRequireUserAction, namely it's written specifically for a piece of hardware that only supports Android 7.1 (Nougat), which is API level 25. The intent is to allow the application to poll a web server, download and subsequently install an updated APK when necessary.
For installers that have been granted the REQUEST_INSTALL_PACKAGES permission, user action will not be required when all of the following conditions are met:
requireUserAction is set to USER_ACTION_NOT_REQUIRED. The app being installed targets:
API 29 or higher on Android S (API 31)
API 30 or higher on Android T (API 33)
API 31 or higher on Android U (API 34)
API 33 or higher on Android V (API 35)
The installer is:
The update owner of an existing version of the app (in other words, this install session is an app update) if the update ownership enforcement is enabled.
The installer of record of an existing version of the app (in other words, this install session is an app update) if the update ownership enforcement isn't enabled.
Updating itself.
The installer declares the UPDATE_PACKAGES_WITHOUT_USER_ACTION permission.
However, I'm wondering if I give this application elevated privileges, will it not require user action anymore?
I'm also tagging this with android-source since making this change requires us to allow-list the application, I believe. I could be mistaken, though.
Thanks for your help!