Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt target SDK 34 #1713

Merged
merged 16 commits into from
Nov 30, 2023
Merged

Adopt target SDK 34 #1713

merged 16 commits into from
Nov 30, 2023

Conversation

MikhailSuendukov
Copy link
Contributor

@MikhailSuendukov MikhailSuendukov commented Sep 28, 2023

  • Has CHANGELOG.md been updated?
  • Are tests passing locally?
  • Are the files formatted correctly?
  • Did you add unit tests?
  • Did you test your change with either the sample apps that are included in the repository or with a blank app that uses your change?
  • Did you check UI tests on the sample app? They are not executed on CI.

Description

This pull request addresses key behavior changes in Android SDK 34 to ensure compatibility with the App Center SDK. Updates include the implementation of the RECEIVER_EXPORTED flag for runtime-registered broadcasts and the adaptation to new requirements for implicit and pending intents. This is achieved by using PendingIntent.FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT in the Distribute module. We've postponed increasing the SDK target version due to dependencies that must be updated to comply with new read-only requirements for dynamically-loaded files. In order to fix errors that occur when launching an application with SDK target 34, we used the flag values from the documentation.

Related PRs or issues

AB#102952
#1709

@MikhailSuendukov MikhailSuendukov requested a review from a team as a code owner September 28, 2023 11:34
@MikhailSuendukov MikhailSuendukov marked this pull request as draft September 28, 2023 13:04
@MikhailSuendukov MikhailSuendukov changed the title Adopt traget SDK 34 Adopt target SDK 34 Oct 4, 2023
@D3zibel
Copy link

D3zibel commented Nov 10, 2023

Hi @MikhailSuendukov 🙂 Do you have any plans, when to release this branch? 🙂
I am currently facing issues, that the app crashes after updates from AppCenter due to a SecurityException which is caused by missing flags for braodcast receivers for Android 14 devices.

FATAL EXCEPTION: main Process: myapp.package, PID: 16533 java.lang.SecurityException: myapp.package: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755) at com.microsoft.appcenter.distribute.install.session.SessionReleaseInstaller.v(Unknown Source:25) at com.microsoft.appcenter.distribute.install.session.SessionReleaseInstaller.a(Unknown Source:0) at com.microsoft.appcenter.distribute.UpdateInstaller.a(Unknown Source:10) at com.microsoft.appcenter.distribute.Distribute.q0(Unknown Source:59) at com.microsoft.appcenter.distribute.ReleaseDownloadListener$3.run(Unknown Source:12) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8194) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13995) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2763) at android.os.Binder.execTransactInternal(Binder.java:1332) at android.os.Binder.execTransact(Binder.java:1278)

@coveralls
Copy link

coveralls commented Nov 24, 2023

Coverage Status

coverage: 100.0%. remained the same
when pulling e49f00e on adopt-sdk-target-34
into 9083e00 on develop.

@MikhailSuendukov MikhailSuendukov marked this pull request as ready for review November 27, 2023 13:53
@keithburgoyne
Copy link

keithburgoyne commented Nov 29, 2023

Very interested in having this PR released. We are also having issues with Android 14. Just wondering if there is an ETA.

@troymccabe
Copy link

@keithburgoyne Can you provide any additional detail on what manufacturers you're seeing this on? Curious if our experiences line up

MikhailSuendukov and others added 3 commits November 30, 2023 12:10
…/distribute/install/session/InstallStatusReceiver.java

Co-authored-by: Dima <v-dmkira@microsoft.com>
@DmitriyKirakosyan DmitriyKirakosyan merged commit e662738 into develop Nov 30, 2023
8 checks passed
@DmitriyKirakosyan DmitriyKirakosyan deleted the adopt-sdk-target-34 branch November 30, 2023 11:47
@keithburgoyne
Copy link

@keithburgoyne Can you provide any additional detail on what manufacturers you're seeing this on? Curious if our experiences line up

It breaks on Pixel devices running SDK 34. I've heard reports it worked on Samsung devices running 14, but that's unverified.

This was referenced Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants