Official AdMob plugin not showing any ads - followed all kinds of tutorials.

Hey guys.

I recently installed Google Play Services and downloaded the official Google AdMob plugin from here:

Installed it as new custom asset, and copied the services folder in my App/Plugins/Android folder.

[This is the current configuration, before that I tried following a YouTube video where i compiled some jar with Eclipse - didn’t work]

Here is the code I use:

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

public class mainMenuCamera : MonoBehaviour {

    // Use this for initialization
    void Awake()
    {
        RequestBanner ();
    }
    void Start () {
 
    }
 
    // Update is called once per frame
    void Update () {
 
    }

    private void RequestBanner()
    {
        #if UNITY_EDITOR
        string adUnitId = "unused";
        #elif UNITY_ANDROID
        string adUnitId = " ";
        #else
        string adUnitId = "unexpected_platform";
        #endif

        BannerView bannerView = new BannerView (adUnitId, AdSize.Banner, AdPosition.Top);
        AdRequest request = new AdRequest.Builder ()
            .AddTestDevice (AdRequest.TestDeviceSimulator)
                .AddTestDevice ("2077ef9a63d2b398840261c8221a0c9b")
                .Build ();
        bannerView.LoadAd (request);
    }
}

Nothing shows up again…

Thanks in advance.

1 Like

I’am having the same problem, were you able to fix it?

1 Like