Interstitial ads not showing on my android device.

201 views
Skip to first unread message

Dennis O

unread,
Dec 10, 2015, 3:42:17 PM12/10/15
to Google Mobile Ads SDK Developers
In my unity editor when I'm playing it shows me that the ad's have successfully loaded, etc.
However when I build the game and play it on my device no ads seem to show and on Bluestacks the game crashes whenever I load the scene which has the interstitial ads in it.
This is my InterstitalAd script
[Code=CSharp]
using UnityEngine;
using GoogleMobileAds.Api;

public class InterstitialAdvert : MonoBehaviour
{
    public static InterstitialAdvert manager;
    private InterstitialAd interstitial;

    void Awake()
    {
        manager = this;
        RequestInterstitial();
    }

    private void RequestInterstitial()
    {
#if UNITY_ANDROID
        string adUnitId = "ca-app-pub-6101605888755494/3301497967";
#elif UNITY_IPHONE
        string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
#else
        string adUnitId = "unexpected_platform";
#endif

        // Initialize an InterstitialAd.
        InterstitialAd interstitial = new InterstitialAd(adUnitId);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the interstitial with the request.
        interstitial.LoadAd(request);
    }

    public void GameOver()
    {
        if (interstitial.IsLoaded())
        {
            interstitial.Show();
        }
    }
}

[/Code] 

Device properties:
Android version 5.0
Make = HUAWEI
Model number ALE-L21
If you need any more information please just ask.



Veer Arjun Busani

unread,
Dec 10, 2015, 5:18:45 PM12/10/15
to Google Mobile Ads SDK Developers
Hi Dennis,

I have tested using your Ad Unit ID and was able load Interstitial Ads. May I suggest you to test if that problem only exists on Huawei on version 5.0 or on all devices. You could also try to listen to BannerView callbacks to debug the issue. 

Also have you tried using our sample app to test out the issue? If you were unable able to reproduce it, do give us a minimal sample project for us to look into.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team
Reply all
Reply to author
Forward
0 new messages