Page Summary
-
App open ads are a special ad format designed for publishers to monetize app load screens and are shown when users bring the app to the foreground.
-
Always test your app open ad implementation using dedicated test ad unit IDs to prevent account suspension.
-
Implement app open ads by extending the
Applicationclass, creating a utility component to manage loading and showing ads, and listening for app foregrounding events. -
Handle cold starts by showing app open ads from a loading screen while loading assets in the background to avoid surprising users with out-of-context ads.
-
Adhere to best practices, such as showing the first app open ad after initial use and displaying ads when users are already waiting, to ensure a positive user experience.
This guide is intended for publishers integrating app open ads using Google Mobile Ads SDK (Legacy).
App open ads are a special ad format intended for publishers wishing to monetize their app load screens. App open ads can be closed at any time, and are designed to be shown when your users bring your app to the foreground.
App open ads automatically show a small branding area so users know they're in your app. Here is an example of what an app open ad looks like:

Prerequisites
Always test with test ads
When building and testing your apps, make sure you use test ads rather than live, production ads. Failure to do so can lead to suspension of your account.
The easiest way to load test ads is to use our dedicated test ad unit ID for app open ads:
ca-app-pub-3940256099942544/9257395921
It's been specially configured to return test ads for every request, and you're free to use it in your own apps while coding, testing, and debugging. Just make sure you replace it with your own ad unit ID before publishing your app.
For more information about how Google Mobile Ads SDK (Legacy) test ads work, see Enable test ads.
Extend the Application class
Create a new class that extends the Application class. This provides a
lifecycle-aware way to manage ads that are tied to the application's state
rather than a single Activity:
Java
public class MyApplication extends Application
implements ActivityLifecycleCallbacks, DefaultLifecycleObserver {
private AppOpenAdManager appOpenAdManager;
private Activity currentActivity;
@Override
public void onCreate() {
super.onCreate();
this.registerActivityLifecycleCallbacks(this);
ProcessLifecycleOwner.get().getLifecycle().addObserver