搜尋套件、儲存庫與 APP 分類

套件詳情v0.1.1

unity_mediation

適用於 Flutter 應用程式的 Unity Mediation 插件。此插件可從不同廣告來源顯示獎勵式廣告與插播廣告。

AndroidiOS
近 30 天下載
44
喜歡數
31
Pub 分數
150

安裝套件

flutter pub add unity_mediation

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

unity_mediation 套件讓 Flutter 應用程式能夠透過 Unity Mediation 顯示來自多個廣告來源的獎勵式與全螢幕廣告。它提供統一介面以整合多樣化的廣告網路,簡化廣告管理與優化。相容於 Android 與 iOS,此外掛可讓開發者有效 monetize 其應用程式,同時維持跨平台的一致廣告表現。該套件設計為與現有 Flutter 專案無縫整合。

適用情境

  • 透過獎勵廣告 monetizing 移動應用
  • 在應用畫面之間顯示插頁廣告
  • 透過一個介面整合多個廣告網路
  • 透過 Unity Mediation 優化廣告收益
  • 在 Android 和 iOS 上啟用跨平台廣告投放

主要特色

  • 支援獎勵式與全螢幕廣告類型
  • 從多個廣告來源聚合廣告
  • 跨平台相容性(Android、iOS)
  • 與 Flutter 的簡單整合
  • 即時廣告表現監控

適合對象

  • 尋求廣告變現的Flutter開發者
  • 需要多來源廣告中繼的應用程式
  • 同時面向 Android 和 iOS 使用者的專案
  • 使用 Unity Mediation 進行廣告管理的開發者
  • 旨在最大化廣告收入的移動應用

使用建議

  • 需要在 Unity Mediation 電腦板中進行設定
  • 依賴 Unity SDK 以獲得完整功能
  • 可能需要額外的權限以進行廣告追蹤
  • 最佳搭配適當的使用者同意處理使用
  • 性能可能因廣告網路的可用性而異

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Unity Mediation

Pub License Pub likes Pub popularity Pub points Flutter platform

Buy Me A Coffee PayPal

Unity Mediation has been deprecated and is no longer supported. Use Unity LevelPlay for mediation of ad networks instead. If your application uses only ads from Unity Ads source, use Unity Ads Plugin.

Unity Mediation plugin for Flutter Applications. This plugin is able to display Rewarded and Interstitial Ads from different ad sources.

Getting Started

1. Configure
iOS
  • set iOS version to 9.0 or higher in ios/Podfile file
  • in ios/Podfile file add next lines after platform :ios line:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
Android
  • set minSdkVersion to 21 in android/app/build.gradle file
2. Configure ad sources

For using additional advertising sources, it's needed to configure them.

iOS

Add dependencies of configured ad sources to ios/Podfile file from the table below

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  # list of adapters
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

AdMob ad source requires additional configuration. If you use AdMob add your AdMob app ID to ios/Runner/Info.plist file

<key>GADApplicationIdentifier</key>
<string>YOUR_ADMOB_APP_ID</string>
Android

Add dependencies of configured ad sources to android/app/build.gradle file

dependencies {
    // list of adapters
}

AdMob ad source requires additional configuration. If you use AdMob add your AdMob app ID to android/app/src/main/AndroidManifest.xml file

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="YOUR_ADMOB_APP_ID"/>
    </application>
</manifest>
Ad Sources
Source iOS Android
AdColony pod 'UnityMediationAdColonyAdapter' implementation "com.unity3d.mediation:adcolony-adapter:1.0.0"
AppLovin pod 'UnityMediationAppLovinAdapter' implementation "com.unity3d.mediation:applovin-adapter:1.0.0"
IronSource pod 'UnityMediationIronSourceAdapter' implementation "com.unity3d.mediation:ironsource-adapter:1.0.0"
Vungle pod 'UnityMediationVungleAdapter' implementation "com.unity3d.mediation:vungle-adapter:1.0.1"
Meta Audience Network pod 'UnityMediationFacebookAdapter' implementation "com.unity3d.mediation:facebook-adapter:1.0.0"
AdMob pod 'UnityMediationAdmobAdapter' implementation "com.unity3d.mediation:admob-adapter:1.0.0"
3. Initialization

Initialize Unity Mediation with your game ID

UnityMediation.initialize(
  gameId: 'GAME_ID',
  onComplete: () => print('Initialization Complete'),
  onFailed: (error, message) => print('Initialization Failed: $error $message'),
);
4. Rewarded Ad

Rewarded Video Ad

Load an ad before show it.

UnityMediation.loadRewardedAd(
  adUnitId: 'REWARDED_AD_UNIT_ID',
  onComplete: (adUnitId) => print('Rewarded Ad Load Complete $adUnitId'),
  onFailed: (adUnitId, error, message) => print('Rewarded Ad Load Failed $adUnitId: $error $message'),
);

Show a loaded rewarded ad.

UnityMediation.showRewardedAd(
  adUnitId: 'REWARDED_AD_UNIT_ID',
  onStart: (adUnitId) => print('Rewarded Ad $adUnitId started'),
  onClick: (adUnitId) => print('Rewarded Ad $adUnitId click'),
  onRewarded: (adUnitId, reward) => print('Rewarded Ad $adUnitId rewarded $reward'),
  onClosed: (adUnitId) => print('Rewarded Ad $adUnitId closed'),
  onFailed: (adUnitId, error, message) => print('Rewarded Ad $adUnitId failed: $error $message'),
);
Server-to-server redeem callbacks

To use server-to-server callbacks, you need to set userId parameter when call showRewardedAd.

Read more on docs.unity.com.

5. Interstitial Ad

Interstitial Video Ad

Load an ad before show it.

UnityMediation.loadInterstitialAd(
    adUnitId: 'INTERSTITIAL_AD_UNIT_ID',
    onComplete: (adUnitId) => print('Interstitial Ad Load Complete $adUnitId'),
    onFailed: (adUnitId, error, message) => print('Interstitial Ad Load Failed $adUnitId: $error $message'),
);

Show a loaded interstitial ad.

UnityMediation.showInterstitialAd(
    adUnitId: 'INTERSTITIAL_AD_UNIT_ID',
    onStart: (adUnitId) => print('Interstitial Ad $adUnitId started'),
    onClick: (adUnitId) => print('Interstitial Ad $adUnitId click'),
    onClosed: (adUnitId) => print('Interstitial Ad $adUnitId closed'),
    onFailed: (adUnitId, error, message) => print('Interstitial Ad $adUnitId failed: $error $message'),
);
6. Banner Ad

Banner Ad

Place BannerAd widget in your app.

BannerAd(
  adUnitId: 'BANNER_AD_UNIT_ID',
  onLoad: (adUnitId) => print('Banner loaded: $adUnitId'),
  onClick: (adUnitId) => print('Banner clicked: $adUnitId'),
  onFailed: (adUnitId, error, message) => print('Banner Ad $adUnitId failed: $error $message'),
),

Donate

Your donation motivates me to work more on plugins and packages. If you found this plugin helpful and would like to thank me:

Donate Buy Me A Coffee PayPal

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。