New Admob Interstitial ads has Critical error in Landscape Game???

297 views
Skip to first unread message

Duc Bui

unread,
Jun 26, 2014, 3:49:18 AM6/26/14
to google-adm...@googlegroups.com
I post this problem here to see if anyone here have this problem as me too. After that: I want to see any solution to completely solve it. If we can not solve it, we could let admob's team know and they will fix it for us. Ok, now we begin:

I have followed the instruction from google: in portrait game every thing look pretty good, but not in landscape one.
When you set you main's activity (which will call Interstitial Ad) to landscape mode then call method LoadAd():
+ The Landscape Ad show ok.
+ When the ad is dismissed the problem begins: Your activity will be recalled again (from the oncreate() method): it means activity has been killed before and just be initiated when ad is dismissed. This problem destroys all game logic and make game crash!

You can reproduce this case by following this official example: https://developers.google.com/mobile-ads-sdk/docs/admob/advanced
+ Put android:screenOrientation="landscape" in main activity manifest file.
+ Add test device to each request.
+ Debug it: you will see when the ad is dismissed: method oncreate() recall agains!

Thanks!

Amy Quispe (AdMob SDK Team)

unread,
Jul 2, 2014, 4:52:48 PM7/2/14
to google-adm...@googlegroups.com
Hi Duc,

I'm sorry, but I don't understand the problem. Are you saying the interstitial Activity is being recreated, or the main activity?

Amy Quispe

Duc Bui

unread,
Jul 2, 2014, 9:32:08 PM7/2/14
to google-adm...@googlegroups.com
Hi Amy,

The activity which call to show the Interstitial. in my case it's my main activity (my game has only 1 activity).


--

---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Duc Bui

unread,
Jul 2, 2014, 9:35:17 PM7/2/14
to google-adm...@googlegroups.com
I have mailed to a Admob supporter before which explain more details, you an see it here:

-------------------------------------------
Hello Eric,

No, the crash is not come from our games. We have no problems with the old Admob SDK and now Start app ADK. When we integrate the New Admob: there is no problem with Banner and Portrait Interstitial Ad but not ok to Landscape Interstitial Ad!

Whenever the server response us a Landscape Interstitial Ad, after user dismiss it our game is crashed.

Taking a deep debug we discover that: whenever dismiss a Landscape Interstitial Ad our activity (which previously call to show the Landscape Interstitial Ad) oncreate() method is recalled again! It means the activity has been killed before and when the ad is dismissed the system recall our activity from the starting point. This error kills all game logic and make it crashed. (after the Landscape Ad is dismissed all activity variables which are not static will be refresh to null).

The error not only happen to our games: many of our friends have this error too. When we try to use the Official Interstitial Ad example from Google ( https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/interstitial ) : the error still happens: Whenever the server response us a Landscape Interstitial Ad the app 's activity oncreate() method is recalled again.

You can re-produce this case by using this official example (https://github.com/googleads/googleads-mobile-android-examples/tree/master/admob/interstitial) and add the following to project:
1. AndroidManifest.xml set android:screenOrientation="landscape" to make activity always show in Landscape Mode.
2. InterstitialSample.java set  .addTestDevice("MUST HAVE YOUR TEST DEVICE HERE!!! IT NEED TO RECEIVE LANDSCAPE INTERSTITIAL AD")  to each request to server.
3. Set a Debug Break Point inside the oncreate() method.
4. Debug it: you will see after user click "Load Interstitial" Button, server will return a Landscape Ad, and whenever he click "Show Interstital" and then dismiss it --> oncreate() method is recalled again. It means activity process has been killed before and just re-initiated.


We have make a video records our experience, you can see it at: https://www.youtube.com/watch?v=FWjv7yQIRLA
We have also attach our project, you can use it to debug error.

We really love Admob and hope you all could fix this error soon.
Thanks you,

--------------------------
interstitial.rar

Sam Riggs

unread,
Jul 6, 2014, 12:23:42 PM7/6/14
to google-adm...@googlegroups.com
Any solutions for this yet?
I was thinking of using an interstitial landscape ad for my next game and even designed it for that.
I been watching this thread to see if there's a solution fix for this yet.
I'm not to the point yet where I will put the ad in yet so I haven't been testing it yet myself.
Sam

Duc Bui

unread,
Jul 6, 2014, 12:30:40 PM7/6/14
to google-adm...@googlegroups.com
No, not yet. We are waiting for a response for google for next updates


--

Kunal Verma

unread,
Jul 7, 2014, 12:46:25 AM7/7/14
to Google AdMob Ads Developers
I have been using Landscape AdMob Ads from the past 1 year. Previously on the 6.4.1 SDK and now on the GPS AdMob SDK. I haven't faced such an issue. Have you tried including 

android:configChanges="orientation"

in the <activity> of your Manifest file. 

This won't allow your activity to be recreated on orientation change.

Message has been deleted

Sam Riggs

unread,
Jul 7, 2014, 9:58:22 PM7/7/14
to google-adm...@googlegroups.com
Hmm maybe adding both to the manifest will do the trick.
Duc Bui tried
android:screenOrientation="landscape"
do you add this also to your manifest Kunal?
I'll get around to this and test it soon as I get this game done.
Duc Bui maybe you can test this to see if it works by adding the configChanges.
I saved both to use when I get to it.
Much appreciated by both Kunal and Duc.
Sam

Reply all
Reply to author
Forward
0 new messages