'com.google.android.gms:play-services-ads:21.3.0'

305 views
Skip to first unread message

Татьяна Титкова

unread,
Dec 10, 2022, 6:24:37 AM12/10/22
to Google Mobile Ads SDK Developers
Hello.
I ask for help in setting up Interstitial Ad.

Previously in the SDK 'com.google.android.gms:play-services-ads:19.7.0' public void onAdClosed() worked and I used to defer loading the next ad like this:
new Handler(Looper.getMainLooper()).postDelayed(() -> loadAd_1(), 30000);

But in SDK 20.0 and later versions, onAdClosed does not work and now you have to use onAdDismissedFullScreenContent(), that is, when the user closes the ad, there should be a transition to the second activity. If you use only one button in MainActivity, you need only one ad loading block. But what if MainActivity has 24 Cardviews or Buttons? This means you need to make 24 ad loading blocks, I still can’t find another way out for about a year.

All sites have code on how to show ads, but there are no tips on how to do this in a multi-button application.

Attached are some screenshots and a tutorial project. https://drive.google.com/file/d/1cqyk2vcFyd5MUm8XcsqtzR73iYVe_LqI/view?usp=sharing
1.jpg2.jpg3.jpg

Mobile Ads SDK Forum Advisor

unread,
Dec 12, 2022, 1:21:03 AM12/12/22
to tatana...@gmail.com, google-adm...@googlegroups.com

Hello,

 

Michael here from Mobile Ads SDK support team. Thank you for reaching out to us.

 

As I was not able to open the test project you shared, would you be able to share your project sample implementation privately via "Reply To Author" button or by following the below process? Kindly also provide the screen recording of the behavior on your end for better illustration of the issue.

 

If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

 

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002h1a3HQAQ&entry.80707362=00160288

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 

As a side note, removing your post message in the forum as it contains private information. Rest assured that we have all the details presented there for future investigation.

 

Regards,

Google Logo
Michael Angelo
Mobile Ads SDK Team
 


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