Best practices for interstitial ads on long lived activity

233 views
Skip to first unread message

Arnaud

unread,
Dec 4, 2014, 1:08:53 PM12/4/14
to google-adm...@googlegroups.com
Hello, I am looking for a advice and best practices for the following use case:

I have a java app, with one Activity that is displayed on screen for a long time (ex: several minutes). It already has regular Ads that work good, on auto refresh every 60/90s.
I plan to display the interstitial after a few minutes of use. I start to load the interstitial ad only when needed (so, not during onCreate()).

I keep getting the following exception about 90% of the time (10% it will succeed):

  E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!!
 W/Ads﹕ Could not fetch ad response from ad request service.
    android.os.TransactionTooLargeException
            at android.os.BinderProxy.transact(Native Method)
            at com.google.android.gms.ads.internal.request.ab.a(SourceFile:101)
            at com.google.android.gms.ads.internal.request.s.a(SourceFile:187)
            at com.google.android.gms.ads.internal.request.s.a(SourceFile:164)
            at com.google.android.gms.ads.internal.util.b.run(SourceFile:17)
            at com.google.android.gms.ads.internal.util.d.call(SourceFile:29)
            at com.google.android.gms.ads.internal.util.e.call(SourceFile:49)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841)
W/Ads﹕ There was a problem getting an ad response. ErrorCode: 0
W/Ads﹕ Failed to load ad: 0
onAdFailedToLoad(): errorCode=ERROR_CODE_INTERNAL_ERROR / 0

I tried several implementations with no more success (Admob samples approach, and also tried to call loadAd only when needed (i.e, when not already loading, thanks to the AdListener)).

Conditions: over mobile data 4G, Android 4.4.x (OnePlus One), GPS 6.1.71, interstitial in test mode (test device).

Would really appreciate advice or an implementation example. Started to think this might be device related, or due to side effects with non-interstitial Admob Ads.

Any idea?

Thank you

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Dec 4, 2014, 7:40:49 PM12/4/14
to google-adm...@googlegroups.com
You're actually the second person to report this type of exception.  Previously I thought it was likely to be a misconfigured ad, but if you're just trying to load a test interstitial (by adding your phone as a test device), that can't be the case.

Are you familiar with using proxies to record HTTP requests (Fiddler or Charles Proxy, for example)?  If so, that would definitely help us narrow down the cause.

-Andrew

Arnaud

unread,
Dec 10, 2014, 12:42:25 PM12/10/14
to google-adm...@googlegroups.com
Interestingly, I do not reproduce the error on wifi, only with mobile data.

Might be related to link quality (bandwidth, availability, MTU).

Any advice on how to analyze further? (non rooted device; packet capture?)

Thanks for the reply.

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Dec 10, 2014, 1:38:59 PM12/10/14
to google-adm...@googlegroups.com
We actually have a bug open for this issue now, so the engineers are actively checking it out.  Without a Wifi connection, trying to place a proxy in between the device and the service becomes tricky, so I'd hold off on doing so for the moment.

In the meanwhile, thanks for the detail in your original post.  With problems that only manifest under certain conditions, it's really helpful to get as much info as possible.

-Andrew

Jérémy R

unread,
Jan 13, 2015, 2:39:43 PM1/13/15
to google-adm...@googlegroups.com
Hi,

Do not know if it helps but I have exactly the same issue with classic banner only on my Samsung S4 device.
The first banner always displays nice but if I change the orientation twice, no banner is displayed anymore and I have the same error:
01-13 20:33:29.230  15039-15337/ E/JavaBinder !!! FAILED BINDER TRANSACTION !!!
01-13 20:33:29.250  15039-15337/ W/Ads Could not fetch ad response from ad request service.

    android
.os.TransactionTooLargeException
            at android
.os.BinderProxy.transact(Native Method)
            at com
.google.android.gms.ads.internal.request.ab.a(SourceFile:101)
            at com
.google.android.gms.ads.internal.request.s.a(SourceFile:187)
            at com
.google.android.gms.ads.internal.request.s.a(SourceFile:164)
            at com
.google.android.gms.ads.internal.util.b.run(SourceFile:17)
            at com
.google.android.gms.ads.internal.util.d.call(SourceFile:29)
            at com
.google.android.gms.ads.internal.util.e.call(SourceFile:49)
            at java
.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java
.lang.Thread.run(Thread.java:841)
01-13 20:33:29.250  15039-15612/ W/Ads There was a problem getting an ad response. ErrorCode: 0
01-13 20:33:29.270  15039-15039/ W/Ads Failed to load ad: 0

As Arnaud, no more error with a WIFI connection.

Jérémy

Andrew Brogdon (Mobile Ads SDK Team)

unread,
Jan 13, 2015, 5:21:04 PM1/13/15
to google-adm...@googlegroups.com
Thanks for the stacktrace.  Would you mind telling me the version of Google Play Services you're using in your app?

-Andrew

Jérémy R

unread,
Jan 14, 2015, 3:17:49 AM1/14/15
to google-adm...@googlegroups.com
Last one: 6587000.

Arnaud

unread,
May 19, 2015, 11:26:01 AM5/19/15
to google-adm...@googlegroups.com
Seems to work fine now. I was not able to reproduce.

Same steps and settings, with GPS 7.3.29 this time (compile time GPS 6.5.87).

Thanks for the help.
Reply all
Reply to author
Forward
0 new messages