Skip to content

Merge branch v3.7.1#815

Merged
navratan-soni merged 6 commits into
mainfrom
dev-v3.7.1
Jun 19, 2026
Merged

Merge branch v3.7.1#815
navratan-soni merged 6 commits into
mainfrom
dev-v3.7.1

Conversation

@navratan-soni

Copy link
Copy Markdown
Contributor

Merge branch v3.7.1

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

navratan-soni and others added 6 commits May 29, 2026 15:29
…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
@navratan-soni navratan-soni merged commit a758f61 into main Jun 19, 2026
21 checks passed
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.

2 participants