google-mobile-ads-banner
它能做什么
它会说明如何在移动应用中放置横幅广告、选择尺寸并加载,默认使用自适应横幅。适合为应用添加广告的移动开发者。
适用场景
- ✓当你希望在 Android、iOS 或 Unity 应用的顶部或底部显示横幅广告时。
- ✓当你需要把横幅广告嵌入应用内容中间时。
- ✓当设置完成,你需要把测试广告单元 ID 换成正式 ID 时。
技能链接
https://github.com/google/skills/blob/main/skills/ads/google-mobile-ads-banner/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请在我的 Android 应用屏幕底部添加一个自适应横幅广告。”
每周 5 个新技能,1 分钟读完。
工作原理
它会确定你的平台,阅读对应指南,然后定义广告视图、设置尺寸、注册加载事件、加载广告并检查结果。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Google Mobile Ads SDK - Banner Ads
Banner ads are rectangular image or text ads that occupy a spot within an app's layout. They remain on screen during user interaction and can refresh automatically.
Banner Ad Types
Default to Large Anchored Adaptive Banner if the user says "banner" without defining a type. If the user suggests or asks about other banner ad types, recommend large anchored adaptive banners.
| Banner Type | Description |
|---|---|
| Large Anchored Adaptive | Default. Can be anchored to the top or bottom of the screen. |
| Anchored Adaptive | Can be anchored to the top or bottom of the screen. |
| Inline Adaptive | ONLY available to use for Android and iOS. Placed within content. |
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-banner.md - iOS:
references/ios-banner.md - Unity:
references/unity-banner.md
- Android:
Follow these steps in order:
- Define the ad view
- Set the ad size
- Register for ad load events
- Load the banner ad
- Verify the implementation
After the banner ad is successfully implemented, remind the user to replace the test ad unit ID with their own.
常见问题
默认是哪种横幅?
除非你另有要求,默认是大型固定自适应横幅。
它能处理其他广告形式吗?
不能。插页式和激励式广告由其他技能负责。
我需要更换测试广告单元吗?
需要。本技能会提醒你在发布前替换测试广告单元 ID。
详情
作者的原始描述
Provides instructions to implement, integrate, or configure Google Mobile Ads (GMA) banner ads in Android, iOS, or Unity mobile applications. Use when the task involves setting up banner ads in a mobile application. Don't use for other ad formats like interstitial or rewarded ads.
repo: google/skills
热度
- GitHub 星标
- 22k
- 排名
- #10189
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
finding-google-skills
22k帮你的智能体为某项设置任务找到合适的 Google 指南,例如托管、数据库、存储、登录或 AI 模型服务。
gcloud
22k帮你的智能体编写并检查 Google Cloud gcloud 命令,在运行任何内容之前查阅准确的语法,避免猜测参数。
google-cloud-recipe-auth
22k引导你的智能体了解 Google Cloud 的身份与访问管理,包括人员和服务如何登录,以及它们各自获得哪些权限。
google-cloud-recipe-onboarding
22k带领新开发者完成在 Google Cloud 上的第一步,包括选择项目、关联计费,以及部署第一个资源。