mercredi 19 mai 2021

Android 12 will finally let alternative app stores update apps without bothering the user

Back in late September of last year, Google announced that will be “making changes in Android 12…to make it even easier for people to use other app stores on their devices while being careful not to compromise the safety measures Android has in place” in response to mounting pressure from Epic Games and government regulators. However, Google didn’t specify exactly what changes they were going to make to Android, and they also didn’t share any specific information about this change at Google I/O 2021. In Google’s official blog post announcing Android 12, however, the company confirmed that it’s “delivering on [its] promise to make third-party app stores easier to use on Android 12.” Thanks to developer documentation, we finally have an idea about what changes are being made.

Google has updated Android’s PackageInstaller.SessionParams class with a new method called setRequireUserAction. This method indicates whether or not user action should be required before an app install is allowed. It defaults to true for any app that holds the REQUEST_INSTALL_PACKAGES permission, which is required for any app before they can initiate an install session to sideload an app outside of Google Play or whatever preinstalled app store is on the device.

However, user action won’t be required for an app install/update if all of 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.

Thus, when an app store tries to initiate an installation session and uses this new API, it should be possible for the update to happen without the user having to manually accept the update. This will make updating apps in batches much faster and brings the experience more in line with the Google Play Store.

The post Android 12 will finally let alternative app stores update apps without bothering the user appeared first on xda-developers.



from xda-developers https://ift.tt/3v5pmzJ
via IFTTT

Aucun commentaire:

Enregistrer un commentaire