Admob Video Interstitial Ads causing Activity ondestroy

439 views
Skip to first unread message

ajay chauhan

unread,
Feb 11, 2016, 9:31:24 AM2/11/16
to Google Mobile Ads SDK Developers
Hello ,

I am facing a strange issue when a Interstitial Ad comes (Video Ad) then My activity on destroy gets called twice.

here is flow - 

onPause()
onSaveInstanceState()
onStop()
onDestroy()
onCreate()
onCreate()
onRestoreInstanceState()
onResume()
onPause()
onSaveInstanceState()

on closing ads.

onAdClosed()
onStop()
onDestroy()
onCreate()
onCreate()
onRestoreInstanceState()
onResume()
 
This is leading to out of memory error.

and I am using Google Play Service version 8.1.
                         Target OS Version - 22

and facing this issue on all devices with all version.

Please help.

Thanks

Veer Arjun Busani

unread,
Feb 11, 2016, 10:46:24 AM2/11/16
to Google Mobile Ads SDK Developers
Hi Ajay,

The first suggestion would be to upgrade to the latest Google Play Services v8.4.0. I have tried to look at the Activity Lifecycle and have not found any issue while loading and closing Interstitials. You could try to test using our sample app to see if the issue persists. If it doesn't you could send us your sample app that would reproduce the issue. Also send us your Ad Unit ID for us to have look further.

Thanks,
Veer Arjun Busani
Mobile Ads SDK Team

ajay chauhan

unread,
Mar 8, 2016, 8:17:16 AM3/8/16
to google-adm...@googlegroups.com
Hello Sir,

This issue still occurs,
As you asked , I did test my app with Google Play Services v8.4.0 and also tested sample app  with our Ad Unit Id .

Here is our Ad Unit ID - ca-app-pub-1986740755330416/3320390082.


You can reproduce this with above mention AD Unit Id with your sample app


Thanks & Regards

Ajay Kumar

Mobile: +91 - 8802563812 ,  +91 - 9582394930

Skype: ajay.kumar4839


--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/OK28TOutigo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Veer Arjun Busani

unread,
Mar 8, 2016, 12:24:11 PM3/8/16
to Google Mobile Ads SDK Developers
Hey Ajay,

Using your Ad Unit ID, I have tested both on a device and emulator. onDestroy() was never called for me. I have even tested your apk and have not found any log on destroy getting called. The only log is on the WebView, which says -  The webview is destroyed. This is not on your Activity so you can ignore this.

Can you try again with a different device. This time could you create a new project and use the Google AdMob Ads Activity. See if onDestroy() is still getting called for you.

Thanks,
Veer Busani
Mobile Ads SDK Team

kart...@pickzy.in

unread,
Jun 19, 2018, 4:04:26 AM6/19/18
to Google Mobile Ads SDK Developers
Have you solved the issue, even iam facing the same problem..

ajay chauhan

unread,
Jun 19, 2018, 4:26:58 AM6/19/18
to Google Mobile Ads SDK Developers
Yes solved it by adding 
android:configChanges="keyboardHidden|orientation|screenSize" in Activity tag in manifest

<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Reply all
Reply to author
Forward
0 new messages