appcenter-sdk-android
                                
                                
                                
                                    appcenter-sdk-android copied to clipboard
                            
                            
                            
                        Allow use of Android 12 "Automatic app updates" feature
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:
- Allow to set the 
requireUserActiontoUSER_ACTION_NOT_REQUIRED. This would need to be exposed by the AppCenter Distribute public API. - Inform the developer that they should declare the 
UPDATE_PACKAGES_WITHOUT_USER_ACTIONpermission in theirAndroidManifest.xml - App should target 
API 29, but that's not really AppCenter's problem 
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!
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.
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
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.
@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
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.
@AnatolyPristensky 😄 OK great, thanks for the clarification
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.