Admob rewarded ads troubleshooting

Hi guys,

I’m trying to implement admob rewarded ads in my project, and everything appears to work fine, but no ads are shown (no errors or warnings reported in unity or logcat). No events are called either (eg. onAdCompleted). I have followed the instructions from their site exactly, and everyone else reports similar code so i’m not sure what i’m doing wrong. Any help would be appreciated.

My code:

#if UNITY_IOS
    public string deviceType = "ios";
    private string gameIDAdMobAds = "ca-app-pub-4969615277842331/3549709809";
#elif UNITY_ANDROID
    public string deviceType = "android";
    private string gameIDAdMobAds = "ca-app-pub-4969615277842331/3549709809"; //ca-app-pub-3940256099942544/1712485313 (working test)
#else
    public string deviceType = "pc";
    private string gameIDAdMobAds = "";
#endif




    void Start()
    {
...
        // Initialize the Google Mobile Ads SDK.
        MobileAds.Initialize(gameIDAdMobAds);

        // Get singleton reward based video ad reference.
        rewardBasedVideoAdMob = RewardBasedVideoAd.Instance;
        rewardBasedVideoAdMob.OnAdClosed += HandleAdMobRewardBasedVideoClosed;
        LoadAdMobRewardBasedVideo();
        Debug.Log("AdMob Ads Initialise " + (rewardBasedVideoAdMob.IsLoaded() ? "SUCCESS" : "FAILED") + ":" + gameIDAdMobAds);
    }




    private void LoadAdMobRewardBasedVideo()
    {
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().AddTestDevice("D84209D1C8396FD7B5FD81B1B2B138B7").Build();

        // Load the rewarded video ad with the request.
        rewardBasedVideoAdMob.LoadAd(request, gameIDAdMobAds);
    }




    public void ShowAdFromAdMob(Action onSuccess)
    {
        Debug.Log("ShowAds AdMob" + rewardBasedVideoAdMob.IsLoaded());
        if (rewardBasedVideoAdMob.IsLoaded())
        {
            System.EventHandler<GoogleMobileAds.Api.Reward> successFunction = (sender, args) =>
            {
                Debug.Log("Watched AD ADMob");
                content.content.stats.Add("AdsWatched", 1);
                onSuccess();
            };

            rewardBasedVideoAdMob.OnAdRewarded += successFunction;
            rewardBasedVideoAdMob.Show();
            rewardBasedVideoAdMob.OnAdRewarded -= successFunction;
        }
    }

If I use a sample appID for testing purposes it does show correctly, but if I use my own ID, it doesn’t load (isloaded is false). I have not set up anything wierd on my appID yet, all defaults.

I hope i have set up my manifest file correctly (the ID is correct):


4433326--405214--upload_2019-4-16_13-41-51.png

I can provide logcat files if you let me know what i’m looking for.

Thanks,
Primoz

for any that are facing the same issue - apparently you need to provide payment information on the admob website. until you do it will keep failing with unknown error. Add that, wait a few hours to update and everything works