Android 12 will allow for non-Google Play app stores to update apps
Google has announced that its upcoming Android 12 operating system release will introduce a new parameter to allow apps installed outside of the Google Play Store to automatically update if they meet certain parameters.
As described by XDA-Developers, Android’s PackageInstaller.SessionParams class has been modified with a setRequireUserAction method. This acts as a security measure for apps downloaded from outside of the Google Play Store so that they require user action before being installed. This class has defined how Android has handled all app sideloading, but the newly defined method can ensure it is bypassed as of Android 12 as long as the following conditions are met:
• The installer opts into the new behavior.
• The app that’s being installed targets API level 29 (Android 10) or higher. (Google notes that the target API level requirement will advance in future Android versions, a policy that’s in line with Google Play policy on API target requirement.)
• The installer is either updating itself or installing an update to an app it first installed.
• The installer declares the UPDATE_PACKAGES_WITHOUT_USER_ACTION permission.
If non-Play Store apps meet all of these requirements, it will be possible for them to update without needing permission from the device user. This will make it possible for app stores such as F-Droid to update apps in a method previously only possible via the Play Store.
This functionality can be tested via the Android 12 Beta, which is available now. No release date for the stable version of the OS has been announced.