google-mobile-ads-rewarded

Implements Google Mobile Ads SDK rewarded ads in Android, iOS, and Unity applications.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill google-mobile-ads-rewarded-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-mobile-ads-rewarded
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/google-mobile-ads-rewarded
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill google-mobile-ads-rewarded-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Integrating rewarded ads with the Google Mobile Ads SDK involves platform-specific APIs, threading rules, and callback handling that are easy to get wrong, causing crashes or policy violations. This Skill provides step-by-step, platform-specific implementation guidance so rewarded ads are loaded, shown, and verified correctly. ## Core Features & Use Cases - Platform-Specific Guides: Dedicated reference instructions for Android (Kotlin), iOS (Swift), and Unity (C#) rewarded ad implementations. - Structured Workflow: Covers the full ad lifecycle: loading the ad, registering event callbacks, adding an opt-in UI element, showing the ad, and verifying the build. - Gotcha Prevention: Highlights critical pitfalls such as UI-threading requirements in Android callbacks and main-thread scheduling for Unity ad events. - Use Case: A mobile game developer wants to let players watch an ad to earn in-game currency. The Skill walks them through loading a RewardedAd, wiring a button to show it, handling the reward callback, and verifying the project compiles. ## Quick Start Use the google-mobile-ads-rewarded skill to add a rewarded ad with a reward button to my Android app.

Frequently Asked Questions about google-mobile-ads-rewarded

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement rewarded ads in Android with the Google Mobile Ads SDK?▼

Load a RewardedAd with an AdRequest containing your ad unit ID, set an adEventCallback, add a button that triggers the ad, and call show() with an OnUserEarnedRewardListener. Wrap all UI operations in callbacks with runOnUiThread, since GMA SDK callbacks run on a background thread.

How to show a rewarded ad in Unity using Google Mobile Ads?▼

Load the ad with the static RewardedAd.Load() method, then call Show() with an Action<Reward> callback after checking CanShowAd(). Hook the show method to a UI button, and use MobileAdsEventExecutor.ExecuteInUpdate() for any Unity object interactions inside ad callbacks.

Does the Google Mobile Ads SDK support rewarded ads on iOS with Swift?▼

Yes, the iOS SDK supports rewarded ads with idiomatic Swift naming via NS_SWIFT_NAME macros. Use async/await to load the ad, set the fullScreenContentDelegate, and call present(from:) with a UserDidEarnRewardHandler; the rootViewController parameter can be nil.

Why does my app crash when handling rewarded ad callbacks on Android?▼

GMA Next Gen SDK callbacks are invoked on a background thread, so any UI operation like Toasts or view updates crashes the app. Wrap all UI-related code in runOnUiThread {} or Dispatchers.Main.launch {} inside the callbacks.

When should I not use this rewarded ads skill?▼

Do not use it for rewarded interstitial ads, which are a different ad format with their own APIs. It also does not apply if the ad should show automatically, since rewarded ads must always require explicit user opt-in.