Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Borr1310 · Oct 30, 2016 at 01:32 PM · androidadsadmobrequestnot showing

Admob interstitial ad not showing up

I am having problems with Admob interstitial ads on android. I amm using the GoogleMobileAdsDemoScript from here. I changed it up a bit and deleted things I don´t need. I don´t want to paste the whole thing here so here is my RequestInterstitial().

 public void RequestInterstitial()
     {
         // These ad units are configured to always serve test ads.
 #if UNITY_EDITOR
         string adUnitId = "unused";
 #elif UNITY_ANDROID
         string adUnitId = "Don´t want to share this";
 #elif UNITY_IPHONE
         string adUnitId = "INSERT_HERE";
 #else
         string adUnitId = "unexpected_platform";
 #endif
 
         // Create an interstitial.
         this.interstitial = new InterstitialAd(adUnitId);
 
         // Register for ad events.
         this.interstitial.OnAdLoaded += this.HandleInterstitialLoaded;
         this.interstitial.OnAdFailedToLoad += this.HandleInterstitialFailedToLoad;
         this.interstitial.OnAdOpening += this.HandleInterstitialOpened;
         this.interstitial.OnAdClosed += this.HandleInterstitialClosed;
         this.interstitial.OnAdLeavingApplication += this.HandleInterstitialLeftApplication;
 
         // Load an interstitial ad.
         this.interstitial.LoadAd(this.CreateAdRequest());
     }

and here is the showinterstitial method.

 public void ShowInterstitial()
     {
         if (this.interstitial.IsLoaded())
         {
             this.interstitial.Show();
         }
         else
         {
             MonoBehaviour.print("Interstitial is not ready yet");
         }
     }

Here I am calling the interstitial ad.

  void OnTriggerEnter(Collider other)
     {
         if (other.gameObject.tag == "ObstaclesLeft" || other.gameObject.tag == "ObstaclesRight")
         {
             Die();
 
         }
     }
 
      void Die() 
             {
                 GoogleMobileAdsDemoScript.Instance.RequestInterstitial();
                 GoogleMobileAdsDemoScript.Instance.ShowInterstitial();
                 menuPanel.gameObject.SetActive(true);
                 startPanel.gameObject.SetActive(false);
                 fadeInPanel.gameObject.SetActive(false);
                 Time.timeScale = 0;       
             }

I am in fact getting thee console message ("Dummy ShowInterstitial") but when I run the game on my phone the ad doesn´t show up even if I call the method when the game starts or something. I have that feeling like I am missing something since I only followed that tutorial and that too is a bit outdated

If there is a possibility that there is just no ads available at the time for like couple hours now how do I use the test ads instead?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Steags · Feb 18, 2018 at 02:43 PM 0
Share

Hi, i have the same problem so did you find a way to solve it by yourself ?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by JedBeryll · Feb 19, 2018 at 11:17 AM

Probably because interstitials need time to load in an actual environment. The message will be shown in the editor immediately if you configured everything right but the actual stuff will need to be loaded before calling Show(). Try calling RequestInterstitial some time before calling ShowIntestitial. Maybe in Start and after closing the shown ad. Also don't forget to test with test ads!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

101 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unrecognized Attribute name MODULE when building .AAB with AdMob 2 Answers

admob repeating infinit times can't stop 1 Answer

Admob Interstitial loading causes game to crash?? 0 Answers

How do I enable AdMob to respond to inputs? 0 Answers

Unity + Admob dependencies 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges