此登錄庫釘選版本所收錄的最新上游作者日期。

google-mobile-ads-banner

已同步 v1.0.0 授權: Apache-2.0 來源: google/skills/skills/ads/google-mobile-ads-banner 提交: 99c871e 收錄的最新變更:

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.

摘要

用途
說明如何透過 Google Mobile Ads SDK 在應用程式版面中放置持續顯示且可自動重新整理的矩形廣告。
使用時機
在為 Android、iOS 或 Unity 專案選擇或實作橫幅廣告格式時使用;先確認平台,若未指定格式則預設採用大型錨定自適應橫幅。
輸出結果
提供依平台而異的實作指引,包括定義廣告檢視區並設定大小、註冊載入事件、載入並驗證橫幅廣告,以及提醒使用者以自己的廣告單元 ID 取代測試 ID。
上游變更(5 筆,最新收錄 2026-09-22)
329fa26 Standardize version formatting in Ads skills metadata 將技能 YAML 中繼資料中的版本值改為加上引號的字串。
92aa428 No public description 將技能範圍擴充至 Unity,並以預設大型錨定自適應橫幅的類型指引取代放置規則,同時在工作流程中加入 Unity 指南。
703f8d2 Move ads skills from per-product subdirectories to top-level skills/ads/ directory. 將內容未變更的技能檔案從 `skills/ads/google-mobile-ads/google-mobile-ads-banner/SKILL.md` 移至 `skills/ads/google-mobile-ads-banner/SKILL.md`。
c75b500 Restructure the YAML frontmatter in all SKILL.md files to nest the 'category' field under the 'metadata:' block. The 'category' field is used to organize the skills in the README.md 在技能的 YAML `metadata` 區塊中新增 `category: GoogleAds`。
b13a5a1 Add new skills for Google Advertising and Measurement. 新增橫幅廣告技能,提供廣告放置指引、Android/iOS 實作工作流程,並提醒替換測試廣告單元 ID。
npx skills add "lettucebo/Skills#v2.2.0@google-mobile-ads-banner" --full-depth

⚠ v2.2.0 發布後即可使用

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

  1. Determine the user's platform: Identify if the project is Android, iOS, or Unity. If unclear, ask before proceeding.

  2. Read the platform guide for implementation details:

    • Android: references/android-banner.md
    • iOS: references/ios-banner.md
    • Unity: references/unity-banner.md
  3. 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
  4. After the banner ad is successfully implemented, remind the user to replace the test ad unit ID with their own.

歷程

v1.0.0 mapping-added 99c871e