Skip to content

V1.2.1 - #157

Merged
robertjamison merged 7 commits into
mainfrom
v1.2.1
Aug 23, 2026
Merged

V1.2.1#157
robertjamison merged 7 commits into
mainfrom
v1.2.1

Conversation

@robertjamison

Copy link
Copy Markdown
Contributor

No description provided.

robertjamison and others added 7 commits July 11, 2026 19:19
Updated Lint version (CVE-2025-14813)
Updated toolchain version to 26
… `AdState` classes, enable `commonTest` dependencies in project configuration, and update Gradle to 9.7.1.
FullScreenContentDelegate called onDismissed() from both
adWillDismissFullScreenContent and adDidDismissFullScreenContent. iOS
splits dismissal into a will/did pair, whereas Android reports it once
via onAdDismissedFullScreenContent, so the shared callback fired twice
on iOS only.

Android's single callback corresponds to adDidDismissFullScreenContent,
so the call is dropped from the will variant and the log line kept.

The duplicate was not only a double callback: the handlers set
AdState.DISMISSED from onDismissed, and rememberRewardedAd and
rememberInterstitialAd reload whenever the state is DISMISSED or NONE,
so every dismissal on iOS also triggered a second load().

One fix covers InterstitialAdHandler, RewardedAdHandler and
RewardedInterstitialAdHandler, which all share this delegate.

Fixes #144

Co-authored-by: anggrayudi.hardiannico <anggrayudi.hardiannico@gopay.co.id>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
AdSize round-tripped through width and height only. toCommon read those
two values off the size returned by an adaptive factory, and toAndroid
rebuilt a plain com.google.android.gms.ads.AdSize from them, so an
adaptive request was silently downgraded to a fixed size one.

Inspecting play-services-ads-api 25.4.0 shows why the dimensions are not
enough: AdSize stores seven fields beyond width and height, including
the size descriptor string sent with the request, and its only public
constructor takes the two dimensions. The adaptive factories are static
methods that populate the rest, so no reconstruction from width and
height can reproduce their result.

The instance produced by the SDK is now retained and handed back
unchanged. Sizes built from explicit dimensions are unaffected, which is
why AdSize(FULL_WIDTH, AUTO_HEIGHT) worked already: those sentinels are
handled by the public constructor.

Co-authored-by: anggrayudi.hardiannico <anggrayudi.hardiannico@gopay.co.id>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ty (#154)

getActivity stopped after five unwraps, so an Activity further down a
wrapper chain was reported as absent. Its own KDoc already promised to
traverse "until it finds the actual Activity or reaches the end of the
chain", so the limit contradicted the documented behaviour.

With i = 5 the loop body runs at most five times and therefore inspects
at most five contexts: the receiver plus four unwraps. An Activity at
the sixth position returns null, and every rememberX composable that
resolves its Activity through LocalContext.current.getActivity() then
fails in load() with "Activity Context must be set to non-null value in
Android", even though an Activity was reachable.

The traversal now continues to the end of the chain. The limit appears
to have guarded against a non-terminating chain, so that protection is
kept explicitly by stopping when a wrapper's base is itself.

Co-authored-by: anggrayudi.hardiannico <anggrayudi.hardiannico@gopay.co.id>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robertjamison
robertjamison merged commit 523e2de into main Aug 23, 2026
5 checks passed
@robertjamison
robertjamison deleted the v1.2.1 branch August 23, 2026 01:55
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