Admob ads not shown

I found a way to get it working.

Why this is happening:

  1. Your AdMob account review is still pending.
  2. UnityEditor provides has access to internet so able to show banner but on android directly internet is not accessible.

Solution:

  1. Wait for AdMob review to get completed.
  2. On android, you need to enable internet permission using Manifest file or Player Setting > Other Settings > Internet Access = Required.
    But story doesn’t end here, since the app only ask to grant permission when app tries to connect to make a web request. Add below code on main scene.
using System.Collections;
using UnityEngine;
using UnityEngine.Android;
using UnityEngine.Networking;

public class InternetChecker : MonoBehaviour
{
    void Start()
    {
        StartCoroutine(CheckInternetAccess());
    }

    IEnumerator CheckInternetAccess()
    {
        using (UnityWebRequest request = UnityWebRequest.Get("https://www.google.com"))
        {
            request.timeout = 5;
            yield return request.SendWebRequest();

            if (request.result != UnityWebRequest.Result.Success)
            {
                Debug.LogError("No active internet access!");
            }
            else
            {
                Debug.Log("Internet access confirmed!");
            }
        }
    }
}