Unity RewardedVideoAds无效

时间:2017-10-19 08:42:59

标签: android unity3d admob google-admob rewardedvideoad

您好我正在努力实现统一的Admob,我已经使用Admob在此https://developers.google.com/admob/android/test-ads提供的测试ID成功整合了横幅广告和插页式广告。我怎么也无法展示任何奖励的视频广告。当我调用RewardedVidosAds时,没有显示任何内容,并且调试日志错误显示广告未准备就绪。这是我正在使用的以下代码:



using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using GoogleMobileAds;
using GoogleMobileAds.Api;

public class AdManager: MonoBehaviour {

  public RewardBasedVideoAd rewardBasedVideoAd;
  private InterstitialAd fullAdmob;

  private bool rewardBasedEventHandlersSet = false;
  // reward initialized
  public int scoreAmount = 100;

  // Use this for initialization

  void Start() {
    //loading both rewarded and interstitial ads in start.
    LoadRewardBasedAd();
    //RequestFull ();
  }

  // Update is called once per frame
  void Update() {

  }

  public void LoadRewardBasedAd() {

    rewardBasedVideoAd = RewardBasedVideoAd.Instance;

    //Test
    AdRequest adRequest = new AdRequest.Builder()
      .Build();

    rewardBasedVideoAd.LoadAd(adRequest, "ca-app-pub-3940256099942544/5224354917");


  }





  public void ShowRewardBasedAd() {

    if (rewardBasedVideoAd.IsLoaded()) {
      Debug.Log("Showiung video");
      rewardBasedVideoAd.Show();
    } else Debug.Log("not ready");

  }

}




我目前尚未对我的视频进行调解广告可能导致此问题?我知道如果您使用测试AdId,则无需调解广告。在调用rewardedVideoAd

时,我的logcat中也会出现以下错误

无法实例化适配器com.google.DummyAdapter 无法加载广告:3

0 个答案:

没有答案