Unity ads banner not working on Android

This seems to be very common problem. The test banner is visible in editor.

using System.Collections;
using UnityEngine;
using UnityEngine.Advertisements;

public class AdManager : MonoBehaviour
{
    private string gameId = "4063985";
    private bool testMode = true;
    private string surfacingId = "bannerPlacement";

    void Start()
    {
        //if (Application.platform == RuntimePlatform.Android)
        //{
            Advertisement.Initialize(gameId, testMode);
            StartCoroutine(ShowBannerWhenInitialized());
        //}
       
    }

    IEnumerator ShowBannerWhenInitialized()
    {
        while (!Advertisement.isInitialized)
        {
            yield return new WaitForSeconds(0.5f);
        }
        Advertisement.Banner.SetPosition(BannerPosition.BOTTOM_CENTER);
        Advertisement.Banner.Show(surfacingId);
    }
}

I’m building in Unity 2020.2.5f1.4029.
Ads version is 3.7.5.

Logcat:

@fluks

I would recommend using the example scripts in our documentation as a starting point, since they will allow you to log any errors that happen when you load or show a banner:
https://unityads.unity3d.com/help/unity/integration-guide-unity#banner-ads

In general, if you see the test banners in Test Mode, then your integration is likely correct. The most common cause of not getting banner ads is lack of available banner demand. This would be expressed as “No fill for placement” errors.

Many of our banner advertisers will only bid into games that have implemented the app-ads.txt file correctly. This file is a standard that has been developed over the last few years to combat fraud and create transparency in the advertising market. More info can be found in our documentation:
https://unityads.unity3d.com/help/resources/app-ads-txt-support

However, even with app-ads.txt implemented, the availability of banners will vary greatly by region. We continue to ramp up banner demand, but a lot of that improvement has been focused in specific regions, so not all countries are seeing banners available.

If banners represent a major issue for you, I would recommend investigating other options. Unity Ads is supported in all of the top mediation platforms, and many do have support for our banner ads:
https://unityads.unity3d.com/help/resources/mediation

also see 1158929

first line on know open issues

I don’t get this kind of an error.

I implemented the app-ads.txt now, but I still don’t get a banned ad. It’s here: https://reaktori.xyz/app-ads.txt

I’m in Finland.

If you have time, you can test my game if you can see ads. It should be available from this link from Play store. I also disabled test mode.

https://play.google.com/apps/internaltest/4698768785263056346

Did you solve it? It still does not showing in my game.

I think problem is related to Unity Ads itself. There is nothing to show banner ad in unity ads.