microsoft / appcenter-sdk-android

Development repository for the App Center SDK for Android
Other
277 stars 134 forks source link

Allow use of Android 12 "Automatic app updates" feature #1615

Closed fabiendem closed 5 months ago

fabiendem commented 2 years ago

Is your feature request related to a problem? Please describe.

This is a feature request.

In Android 12, a new API has been announced, called Automatic App Updates See https://developer.android.com/about/versions/12/features#automatic-app-updates

Android 12 introduces the setRequireUserAction() method for apps that use the PackageInstaller API. This method allows installer apps to perform app updates without requiring the user to confirm the action.

The method is described at https://developer.android.com/reference/android/content/pm/PackageInstaller.SessionParams#setRequireUserAction(int)

There are a few requirements for it to work, detailed in the setRequireUserAction documentation.

This feature would enable a smoother install process for the users downloading app updates via AppCenter. Based on my interpretation of the doc, they would not need to confirm the installation of the update each time there is one.

Describe the solution you'd like

I suppose this feature should be an opt-in rather than a default.

A few API changes in AppCenter Distribute would be needed:

Describe alternatives you've considered

No alternative to be considered here, this is new.

Additional context

I suppose this alert would no longer appear at installation time:

Thank you!

aleksandr-dorofeev commented 2 years ago

Hi! Thanks for bringing this to our attention! I am created an item on our dashboard for this feature request. We will update this conversation once finished.

snijsure commented 2 years ago

FWIW we upgraded to AppCenter SDK 4.4.3 and on Android 12 devices I still don't get any update prompt may be it is because of the reasons mentioned above.

I thought AppCenter SDK 4.4.3 fixed the issue with checking new release with this PR? - https://github.com/microsoft/appcenter-sdk-android/pull/1595

@aleksandr-dorofeev

AnatolyPristensky commented 2 years ago

Hello @snijsure, Looks like that these issues are not related. We are already have an item on our internal dashboard for fixing above mentioned issue. Will update this thread once get results.

fabiendem commented 2 years ago

@AnatolyPristensky Sorry I know it's not the right thread but..

We are already have an item on our internal dashboard for fixing above mentioned issue.

Which issue are you referring to? I have tested updates using 4.4.5 a dozen times in different scenarios on Android 12 and didn't see any issue. So now I am wondering if I have missed something. The only thing is that I am not targeting Android 12 yet. I use targetSdkVersion 30 instead of targetSdkVersion 31

AnatolyPristensky commented 2 years ago

Which issue are you referring to?

@fabiendem, sorry for misunderstanding. I meant that we already have an item for this feature request and the PR mentioned by @snijsure isn't related to your feature request.

fabiendem commented 2 years ago

@AnatolyPristensky 😄 OK great, thanks for the clarification

DmitriyKirakosyan commented 5 months ago

As we do not have plans to add support for this feature in the next year, I'm closing the issue. However, contributions are still welcome.