我在Unity 2017.2.0项目中集成了Admob 3.11.1。我想在调解中添加Vungle 5.3.2作为另一个网络。
<application
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<activity
android:label="@string/app_name"
android:screenOrientation="fullSensor"
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:name="com.vungle.publisher.VideoFullScreenAdActivity">
</activity>
<activity android:name="com.vungle.publisher.MraidFullScreenAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
<activity android:name="com.vungle.publisher.FlexViewAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout|smallestScreenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18"/>
<uses-permissio
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
RewardBasedVideoAd rewardBasedVideo = RewardBasedVideoAd.Instance;
// Create an empty ad request.
AdRequest.Builder builder = new AdRequest.Builder();
// Add simulator test as default
builder.AddTestDevice(AdRequest.TestDeviceSimulator);
rewardBasedVideo.LoadAd(builder.Build(), "admob-rewarded-placement");
# Vungle
-dontwarn com.vungle.**
-dontnote com.vungle.**
-keep class com.vungle.** { *; }
-keep class javax.inject.*
-dontwarn de.greenrobot.event.util.**
-dontwarn rx.internal.util.unsafe.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}
-keep class rx.schedulers.Schedulers { public static <methods>; }
-keep class rx.schedulers.ImmediateScheduler { public <methods>; }
-keep class rx.schedulers.TestScheduler { public <methods>; }
-keep class rx.schedulers.Schedulers { public static ** test(); }
-dontwarn com.moat.**
-keep class com.moat.** { public protected private *; }
-dontwarn okio.**
-dontwarn retrofit2.Platform$Java8
当我想要展示奖励广告时,我总是会收到Admob广告或Unity广告(其他网络正在调解)。但我从未收到过Vungle广告。 我能错过什么?
答案 0 :(得分:0)
我终于解决了它。在加载Admob广告时,我错过了通过Vungle展示位置引用。
RewardBasedVideoAd rewardBasedVideo = RewardBasedVideoAd.Instance;
GoogleMobileAds.Api.Mediation.Vungle.VungleRewardedVideoMediationExtras vungle = new GoogleMobileAds.Api.Mediation.Vungle.VungleRewardedVideoMediationExtras();
vungle.SetAllPlacements(new string[] { "REWARDED-78375", "INTERSTITIAL_INGAME-243547", "DEFAULT8623" });
// Create an empty ad request.
AdRequest.Builder builder = new AdRequest.Builder()
.AddMediationExtras(vungle);
// Add simulator test as default
builder.AddTestDevice(AdRequest.TestDeviceSimulator);
rewardBasedVideo.LoadAd(builder.Build(), m_rewardedVideoId);
我也错过了Vungle extras包。您可以在Vungle教程中获取有关与Admob Tutorial
集成的内容