Google Mobile Ads Interstitial
GoogleOfficialPublished by Google
- Skill
- Tool integration
- Software development
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to implementing full-page interstitial ads using the Google Mobile Ads (GMA) SDK. It guides developers through the lifecycle of an interstitial ad, including loading, registering event callbacks, displaying the ad, and verifying the implementation across Android, iOS, and Unity platforms.
What it does
- Provides platform-specific implementation steps for Android, iOS, and Unity.
- Outlines the standard lifecycle for interstitial ads: load, register callbacks, and show.
- Highlights critical technical requirements such as UI threading for Android.
- Includes guidance on verifying build integrity after integration.
- Offers specific method signatures and import requirements for Android development.
When to use it
- When you need to integrate full-page interstitial ads into a mobile app.
- When you are setting up ad placements at natural transition points in your application.
- When you need to troubleshoot implementation issues related to the GMA SDK.
- When you require platform-specific guidance for Android, iOS, or Unity ad integration.
Advantages
- Ensures consistent implementation patterns across different mobile platforms.
- Reduces common errors by highlighting platform-specific gotchas like UI thread management.
- Provides a clear, step-by-step workflow for ad lifecycle management.
- Helps maintain application stability by emphasizing proper reference handling.
Usage examples
- “How do I implement an interstitial ad in my Android app?”
- The agent will guide you through importing the necessary GMA SDK classes, using the AdRequest builder, loading the ad, and ensuring all UI-related callbacks are wrapped in runOnUiThread.
- “What are the steps to show an interstitial ad in an iOS project?”
- The agent will instruct you to load the ad using async/await, set the fullScreenContentDelegate, and present the ad using the rootViewController parameter.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/google-mobile-ads-interstitial/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip google-mobile-ads-interstitial.zip -d .agents/skills
Documentation by Google
Google Mobile Ads SDK - Interstitial Ads
Interstitial ads show full-page ads for users on mobile apps. Interstitial ads are designed to be placed between content and are best placed at natural app transition points.
Workflow
Determine the user's platform: Identify if the project is Android, iOS, or Unity. If unclear, ask before proceeding.
Read the platform guide for implementation details:
Android:
references/android-interstitial.mdiOS:
references/ios-interstitial.mdUnity:
references/unity-interstitial.md
Follow these steps in order:
[ ] Load the ad
[ ] Register for ad event callbacks
[ ] Show the ad
[ ] Verify the implementation
Files
- ATTRIBUTION.mdAdded by AutoGineer876 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md1.1 KiB
- references/android-interstitial.md2.1 KiB
- references/ios-interstitial.md1.2 KiB
- references/unity-interstitial.md3.3 KiB
references/unity-interstitial.md
AI Integration Agent Instructions for Unity Interstitial Ads
Required Imports
Use the following imports to implement an interstitial ad:
using System;
using UnityEngine;
using GoogleMobileAds.Api;
using GoogleMobileAds.Common;Interstitial Ad Workflow
Load the ad:
Use the static
InterstitialAd.Load()method passing the ad unit ID, anAdRequestobject, and a completion callback (Action<InterstitialAd, LoadAdError>):// Test ad unit IDs. Replace with your own ad unit IDs. #if UNITY_ANDROID string adUnitId = "ca-app-pub-3940256099942544/1033173712"; #elif UNITY_IPHONE string adUnitId = "ca-app-pub-3940256099942544/4411468910"; #else string adUnitId = "unused"; #endifInterstitialAd.Load(adUnitId, new AdRequest(), (InterstitialAd ad, LoadAdError error) => { if (error != null || ad == null) { // Handle the error. return; } interstitialAd = ad; });Always destroy any existing
InterstitialAdobject before loading a new ad.Register for ad event callbacks:
Subscribing to ad events on the
InterstitialAdobject is optional and depends on your application requirements:OnAdPaid: Subscribe to log estimated ad revenue (AdValue) for impression-level ad monetization tracking.OnAdImpressionRecorded: Subscribe to track ad impressions in internal telemetry or third-party analytics platforms.OnAdClicked: Subscribe to record user clicks on the ad.OnAdFullScreenContentOpened: Subscribe to pause game audio, timers, or gameplay loops when the interstitial ad covers the screen.OnAdFullScreenContentClosed: Subscribe to resume game audio or gameplay loops when the ad is dismissed. Destroy theInterstitialAdobject (interstitialAd.Destroy()) and reload another ad (InterstitialAd.Load()) so a fresh ad is ready for the next transition point.OnAdFullScreenContentFailed: Subscribe to log display errors if the interstitial ad fails to show.
Ensure background ad callbacks interacting with Unity objects (
UnityEngine) are explicitly scheduled on the main thread usingMobileAdsEventExecutor.ExecuteInUpdate(), because Unity APIs are not thread-safe and must be called from the main thread.interstitialAd.OnAdFullScreenContentOpened += () => { MobileAdsEventExecutor.ExecuteInUpdate(() => { // Interact with UnityEngine objects on the main thread here. }); };Show the ad:
Check
CanShowAd()on theInterstitialAdobject before calling theShow()method. Include a null check to avoid exceptions.if (interstitialAd != null && interstitialAd.CanShowAd()) { interstitialAd.Show(); }Verify the implementation: Ensure there are no compilation errors:
[ ] Verify the Unity Console has no C# script compile errors or missing GoogleMobileAds namespace references.
Links
Additional documentation:
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/ads/google-mobile-ads-interstitial · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-mobile-ads-interstitial.zip