Skip to content

feat(admob): add sample preloader controls - #4094

Merged
polmiro merged 3 commits into
next-gen-admob-sample-foundationfrom
next-gen-admob-sample-preloader-ui
Sep 1, 2026
Merged

feat(admob): add sample preloader controls#4094
polmiro merged 3 commits into
next-gen-admob-sample-foundationfrom
next-gen-admob-sample-preloader-ui

Conversation

@polmiro

@polmiro polmiro commented Aug 26, 2026

Copy link
Copy Markdown
Member

Summary

Expands the Google Mobile Ads Next-Gen example app with reusable preloader controls:

  • add reusable controls for starting and stopping format preloaders
  • expose buffer capacity and available-ad state
  • keep buffer configuration editable only before a preloader starts

Screenshots

Running preloader with configurable capacity and two ads ready


Note

Low Risk
Sample-app-only UI helpers with no changes to SDK, billing, or production ad integration paths.

Overview
Adds reusable Compose UI for the AdMob Next-Gen sample so format screens can demo ad preloading without duplicating layout code.

PreloaderUi.kt introduces PreloaderUiState (backed by PreloadConfiguration and an ads-available provider), rememberPreloaderUiState, and PreloaderPanel: start/stop toggle, running/stopped badge, buffer capacity steppers (1–5, locked while running), live “ads ready” count with ~500ms polling, status messages after start/stop/preload events, plus optional extra metrics and action buttons.

AdSupport.kt adds preloadStatusCallback, a small PreloadCallback that hops preload success, failure, and buffer-exhausted events onto a CoroutineScope so the panel can update safely from SDK callbacks.

Reviewed by Cursor Bugbot for commit 5868b70. Bugbot is set up for automated code reviews on this repo. Configure here.

@emerge-tools

emerge-tools Bot commented Aug 27, 2026

Copy link
Copy Markdown

📸 Snapshot Test

1 modified, 620 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 0 0 282 0 N/A
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 1 0 338 0 ✅ Approved

🛸 Powered by Emerge Tools

@polmiro
polmiro force-pushed the next-gen-admob-sample-preloader-ui branch from d98b905 to 40d8fd6 Compare August 28, 2026 07:59

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 40d8fd6. Configure here.

@polmiro
polmiro merged commit d8f8392 into next-gen-admob-sdk Sep 1, 2026
34 checks passed
@polmiro
polmiro deleted the next-gen-admob-sample-preloader-ui branch September 1, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants