Interstitial ads .IsLoaded always return false

460 views
Skip to first unread message

Viktor Bylbas

unread,
Sep 27, 2018, 8:11:04 AM9/27/18
to google-adm...@googlegroups.com
I using Xamarin.

Android:
[assembly: Dependency(typeof(InterstitialAdRenderer))]
namespace InterstitialAd.Droid
{
   
public class InterstitialAdRenderer : AdListener, IInterstitialAds
   
{
       
Android.Gms.Ads.InterstitialAd _ad;

       
public void Show()
       
{
           
var context = Android.App.Application.Context;

           
Android.Gms.Ads.InterstitialAd ad = new Android.Gms.Ads.InterstitialAd(context);
            ad
.AdUnitId = "ca-app-pub-9689514414757193/7233869569";

            _ad
= ad;
           
OnAdLoaded();
            ad
.AdListener = this;

           
var requestbuilder = new AdRequest.Builder();
            ad
.LoadAd(requestbuilder.Build());
       
}

       
public override void OnAdLoaded()
       
{
           
base.OnAdLoaded();

           
if (_ad.IsLoaded) // false
                _ad
.Show();
       
}

      public override void OnAdFailedToLoad(int errorCode)
     
{
           
base.OnAdFailedToLoad(errorCode); // errorCode = 0
     
}
   }
}


This ad id exists for several days already. In iOS this problem too.

With the test ids that is provided on the site, ads work

https://developers.google.com/admob/android/test-ads#sample_ad_units


What is the problem?


mobileadssdk-a...@google.com

unread,
Sep 27, 2018, 3:18:19 PM9/27/18
to Viktor Bylbas, Google Mobile Ads SDK Developers
Hi Viktor,

We currently do not provide support for Xamarin integration. The Mobile Ads SDK does not support integration with non-native Android and iOS applications and we do not support any third-party integrations with any third-party plugins on this forum. 

We will answer your concern in the Mobile Ads SDK implementation perspective in native Android. Error code 0 is usually triggered if it is a newly created Id or if there is an issue with your account. Can you make sure to update the Billing and Payments details on your account? Once you update these details, please note that it might take few hours for the changes to reflect on your account. I'd suggest that you wait for few hours and try loading the ads again.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 09/27/18 08:11:04 viktor...@outlook.com wrote:
I using Xamarin.

Android:
[assembly: Dependency(typeof(InterstitialAdRenderer))]
namespace InterstitialAd.Droid
{
   
public class InterstitialAdRenderer : AdListener, IInterstitialAds
   
{
       
Android.Gms.Ads.InterstitialAd _ad;

       
public void Show()
       
{
           
var context = Android.App.Application.Context;

           
Android.Gms.Ads.InterstitialAd ad = new Android.Gms.Ads.InterstitialAd(context);
            ad
.AdUnitId = "ca-app-pub-9689514414757193/7233869569";

            _ad
= ad;
           
OnAdLoaded();
            ad
.AdListener = this;

           
var requestbuilder = new AdRequest.Builder();
            ad
.LoadAd(requestbuilder.Build());
       
}

       
public override void OnAdLoaded()
       
{
           
base.OnAdLoaded();

           
if (_ad.IsLoaded) // false
                _ad
.Show();
       
}

      public override void OnAdFailedToLoad(int errorCode)
     
{
           
base.OnAdFailedToLoad(errorCode); // errorCode = 0
     
}
   }
}


This ad id exists for several days already. In iOS this problem too.

What is the problem?

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/e64d0af1-db01-40e6-86b8-efd18fcfd63e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages