Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Admob with "Ad Placements" plugin only shows test-ads

Discussion in 'Android' started by DUBBTI, Nov 25, 2020.

  1. DUBBTI

    DUBBTI

    Joined:
    May 24, 2018
    Posts:
    2
    Hi all,

    I've installed the Ad Placements plugin, however, users report that only test ads are shown. I have it configured as follows:

    GoogleMobileAdsSettings
    AdMob App ID from the AdMob page, my app, app settings.

    GoogleMobileAdsPlacements
    Interstitial ad, with the ad unit ID from the AdMob page, my app, Ad Units, Interstitial (ca-app-pub-11111/1111)

    AdsManager Script for the interstitial ad
    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using GoogleMobileAds.Api;
    4.  
    5. public class AdManagerScenarioSelect : MonoBehaviour
    6. {
    7.     void Start()
    8.     {
    9.         MobileAds.Initialize((initStatus) =>
    10.         {
    11.             // SDK initialization is complete
    12.         });
    13.     }
    14. }
    15.  
    How I linked the code
    Code (CSharp):
    1.  
    2. public class ScenarioSettings: MonoBehaviour
    3. {
    4.     public UnityEvent showInterAd;
    5.  
    6. public void Button()
    7.     {
    8. if (Scenariosplayed >= 5)
    9.             {
    10.                 showInterAd.Invoke();
    11.                 Scenariosplayed = 0;
    12.             }
    13. }
    14. }
    -I made a gameobject called interstital ad. I added the "Interstititial Ad Gameobject Script" which came with the package. For ad placement I selected the interstitial ad, callback on "On Ad Closed" which runs a script (works fine).
    -On the showInterAd UnityEvent in the inspector, I selected the before mentioned created gameobject Interstitial Ad. As Function I did "InterstitialAdGameObject.ShowIfLoaded".

    AndroidManifest
    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.unity.ads" android:versionName="1.0" android:versionCode="1">
    3.   <application>
    4.     <uses-library android:required="false" android:name="org.apache.http.legacy" />
    5.     <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="[B]ca-app-pub-the~code[/B]" />
    6.   </application>
    7. </manifest>

    I've waited a few days now in the hope it would auto-resolve... However, still test ads are being shown. Would anyone know what kind of mistake(s) I could have made that stops real ads from being shown?
     
  2. DadNapper

    DadNapper

    Joined:
    Jan 13, 2018
    Posts:
    9
    Did you change the ad unit IDs from the plugin's inspector panel? By default, it comes with demo ad units.
     
  3. Slashik

    Slashik

    Joined:
    Jan 26, 2016
    Posts:
    6

    Any update on this, I am getting test ad over a month now. Even if I published firstly without ad a month ago, gave admob the applink from the store and the app in admob is reviewed aand shows it's ready to serve ads.
     
  4. sinannsekerr

    sinannsekerr

    Joined:
    Jul 20, 2020
    Posts:
    1
    did you find the solution? my app are showing test ad like you
     
  5. firfur

    firfur

    Joined:
    Nov 9, 2020
    Posts:
    5