Skip to content

Rewarded ad sets its FullScreenContentCallback after calling show() #17

Description

@CanReader

Small one, spotted next to the rewarded-ad issue. In AdManager.showRewardAd, the FullScreenContentCallback is attached AFTER show() has already been called:

rewardID = rewardedAd;
rewardedAd.show(context, rewardItem -> {});          // shown first

rewardedAd.setFullScreenContentCallback(new FullScreenContentCallback() {  // callback set after
    @Override public void onAdDismissedFullScreenContent() { ... }
    @Override public void onAdClicked() { isClickedAd = true; }
});

The full-screen content callback should be set before calling show(), otherwise there's a window where early lifecycle events (impression/clicked/dismissed if the ad resolves very fast) can fire before the callback is registered and get missed. AdMob's own guidance is to set the callback before show. Swap the order so the callback is attached first, then show().

File: android/src/com/focus/kingdom/platform/AdManager.java, showRewardAd, around line 127-142.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions