Interstitial Ad and recreating activity

84 views
Skip to first unread message

Sagi Cohen

unread,
Sep 30, 2021, 10:32:45 AM9/30/21
to Google Mobile Ads SDK Developers
I had someproblems with a previous conversation.. So I'm posting it again:
I have a an Admob Interstitial Ad: https://18220747100232649887.googlegroups.com/attach/a9658af9495c3/code.txt?part=0.2&view=1&vt=ANaJVrFs58nARnGXgcK8XCrF0YDSOEz-F-cTxRe7mPDRI51-vKN3URi0a9ktIcVBDtkBd4P7iWbRI_n_TCwI7kPV_GSzMsmDpWutldKZGa5TETJdZM8QweY

The ad is being triggered by a fragment calling MainActivity.getInstance().showInterstitialAd() and at some point I change the theme of the app, thus triggering recreate of the activity. after a few moments the app crashes with threadPool Exceptions:  https://18220747100232649887.googlegroups.com/attach/a9658af9495c3/errorlog.txt?part=0.1&view=1&vt=ANaJVrHs3QiKFfuaGAU4dLQH5VIhSbfhYYvxmtrV4K9MLccUXdrfsHHgngB2QhjI-I_cgCkjSK3vr2hJcJtOSCPOt-SV1ZreH8g_PvEJ6d1YpHTelig9_m8

I prepared asample app it happens in: https://easyupload.io/i0gjxp

Anyone knows why this happens? and how to fix this? I'm not sure if this could happen in another scenarios.

I tried changing the context `InterstitialAd.load` gets to application, applicationContext, etc.. and nothing changed
also this happens on my Nexus 5x Android 7 API-24 emulator and on 
Pixel 2 Android 6 API-23 emulator.
On my actual phone nothing crashes but I dont know if that's emulator related/version related/etc

Thanks!

Mobile Ads SDK Forum Advisor

unread,
Sep 30, 2021, 5:16:46 PM9/30/21
to sagic...@gmail.com, google-adm...@googlegroups.com
Hi Sagi,

Thank you for reaching out to us. I was having issues with the file that we got from the download, if you can share either an apk or a zip file would be better. Also you can share it directly with us at mobileads...@gmail.com. The other thing we would ask for is a stacktrace or the logcat response. The memory dump does not offer us the information that we need to see.

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2OVVgw:ref

Sagi Cohen

unread,
Oct 5, 2021, 1:42:28 AM10/5/21
to Google Mobile Ads SDK Developers
Did u get ny mail? 

The error in the log is: NfcAdapter is null while obtaining CardEmulation instance
my question is if this could happen in real devices with no NFC?

Thanks

Mobile Ads SDK Forum Advisor

unread,
Oct 5, 2021, 5:06:02 AM10/5/21
to sagic...@gmail.com, google-adm...@googlegroups.com

Hello Sagi,

Thank you for reaching out to us.

I work with William and will be assisting you on this. Upon checking the shared source code and apk, we are encountering the "Error 1020 Access denied". With that, can you please provide us a copy of it again, you can upload it in your google drive then share it to our testing account mobileads...@gmail.com.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2OVVgw:ref
Reply all
Reply to author
Forward
0 new messages