AdMob ads not showing into unity3d game! Please help...

I am trying and trying to enable google ads in my unity3d game, but no success… I have google developer console, have AdMob and I have unity3d app ready to be published, only thing that is left to be done is to enable ads. So, I make an add unit at my AdMob account to get id of the add. I have followed this tutorial https://developers.google.com/mobile-ads-sdk/docs/games#unity and with compiling and so on, everything is good, but when I want to see the ads, they are not showing. Not in the editor, not in the device. Here is my script with code to show banner ad:

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

// Example script showing how to invoke the Google Mobile Ads Unity plugin.
public class ads : MonoBehaviour
{
	void Start ()
	{
		RequestBanner ();
	}

		private void RequestBanner()
	{
		#if UNITY_ANDROID
		string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
		#elif UNITY_IPHONE
		string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
		#else
		string adUnitId = "unexpected_platform";
		#endif
		
		// Create a 320x50 banner at the top of the screen.
		BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
		// Create an empty ad request.
		AdRequest request = new AdRequest.Builder().Build();
		// Load the banner with the request.
		bannerView.LoadAd(request);
	}
}

I have this script, named ads.cs attached to main camera in the game… I really don’t know why ads are not shown, please, if anyone know what the problem is, help me.

Just as a heads up. For anyone who was looking around for a solution to this. If you have it working in the editor, are receiving all the right debug messages and have set up your admob account to work properly, it does take some time for AdMob to register your account properly. I set this up yesterday and for the life of me could not get the ads to display in my app. I opened the app this morning and they started displaying. So rest easy if you have followed all of the instructions here: शुरू करें  |  Unity  |  Google for Developers and still don’t see your ads, you may just need to wait a bit for admob to register your ads properly.

*Edit: It might be worth noting that I did upgrade to 5.6.1p4 in the process as well as setup my payment information in admob (as I think this is the point when your information is submitted to admob for them to set up your ads).

Attach this script to main camera
Read through, fill in info as required

call this script ads

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

public class ads : MonoBehaviour
{

    private BannerView bannerView;
	public static adsDemo current;

    void Start()
    {
        current = this;
		RequestBanner();

        
    }

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

        // Create a 320x50 banner at the top of the screen.
        bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Bottom);
        // Register for ad events.
        bannerView.AdLoaded += HandleAdLoaded;
        bannerView.AdFailedToLoad += HandleAdFailedToLoad;
        bannerView.AdOpened += HandleAdOpened;
        bannerView.AdClosing += HandleAdClosing;
        bannerView.AdClosed += HandleAdClosed;
        bannerView.AdLeftApplication += HandleAdLeftApplication;
        // Load a banner ad.
        bannerView.LoadAd(createAdRequest());
    }

    
    // Returns an ad request with custom ad targeting.
    private AdRequest createAdRequest()
    {
        return new AdRequest.Builder()
                .AddTestDevice(AdRequest.TestDeviceSimulator)
                .AddTestDevice("0123456789ABCDEF0123456789ABCDEF")
                .AddKeyword("game")
                .SetGender(Gender.Female)
                .SetBirthday(new DateTime(1985, 1, 1))
                .TagForChildDirectedTreatment(false)
                .AddExtra("color_bg", "9B30FF")
                .Build();

    }

    #region Banner callback handlers

    public void HandleAdLoaded(object sender, EventArgs args)
    {
        print("HandleAdLoaded event received.");
    }

    public void HandleAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
    {
        print("HandleFailedToReceiveAd event received with message: " + args.Message);
    }

    public void HandleAdOpened(object sender, EventArgs args)
    {
        print("HandleAdOpened event received");
    }

    void HandleAdClosing(object sender, EventArgs args)
    {
        print("HandleAdClosing event received");
    }

    public void HandleAdClosed(object sender, EventArgs args)
    {
        print("HandleAdClosed event received");

    }

    public void HandleAdLeftApplication(object sender, EventArgs args)
    {
        print("HandleAdLeftApplication event received");
    }

    #endregion

  
}

in desired script call to show the ad unit

ads.current.bannerView.Show ();

I found a better result in this video

Make sure you have completely imported the AdMob plugin package. I had somehow managed to only import a part of it and re-importing fixed the issue. Also try debugging with logcat, I had no errors in the editor but logcat was complaining about some plugins missing .

For me I was simply missing the line this.bannerView.Show(); it is a shame that the documentation did not include this line

Use real Ad Unit Ids, even when testing.

follow this video for detailed information.

123556-sddefault.jpg