Merge branch v3.7.1#815
Merged
Merged
Conversation
…activity The proxy LifecycleRegistry only reached ON_CREATE, so on hosts that extend plain android.app.Activity (typical Unity Android titles) Compose's WindowRecomposer stayed suspended (no recompositions / pointer-driven UI updates after the initial draw) and every BackHandler callback registered against the proxy was disabled (OnBackPressedCallback only becomes enabled when its LifecycleOwner is at least STARTED). The In-App Message rendered once, then the app could not be interacted with or dismissed. The proxy now advances through ON_START and ON_RESUME on attach (matching the host's state at attach time, since presentables only attach to a foregrounded activity), and registers an Application.ActivityLifecycleCallbacks listener scoped to the host activity so subsequent STARTED / RESUMED / PAUSED / STOPPED transitions are mirrored. The listener is unregistered and the host reference cleared in onDestroy. handleLifecycleEvent(ON_DESTROY) auto-traverses any intermediate states, so ON_PAUSE / ON_STOP are not emitted manually.
The proxy is keyed to the host activity's decor view via findViewTreeLifecycleOwner(), so when multiple AEPPresentables are visible on the same plain-android.app.Activity host they implicitly share a single proxy. The previous attach gate already short-circuited on the second attach, but detach unconditionally invoked onDestroy(), destroying the shared proxy while the surviving presentable's ComposeView was still observing it. This froze whichever presentable remained visible the moment the first one dismissed. The conflict rules in FloatingButtonPresentable.hasConflicts (= false) and InAppMessagePresentable.hasConflicts (only conflicts with other IAMs / Alerts) explicitly allow FloatingButton + IAM concurrency, so this is a supported scenario on Unity hosts. Add retain / release on ActivityCompatOwner backed by an Int counter (mutated only on the main thread via @mainthread attach / detach), have attachActivityCompatOwner retain on every attach (sharing an existing proxy when one is found) and detachActivityCompatOwner only tear the proxy down once the count reaches zero. On AndroidX hosts the existing LifecycleOwner is not an ActivityCompatOwner, so the new path is a no-op for them.
…ndroid.app.Activity hosts Fix In-App Message freeze and concurrent-presentable crash on plain android.app.Activity hosts
Updating Core version to 3.7.1
sagar-sharma-adobe
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge branch v3.7.1
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: