Collapsible banner ads is not expanded

1,153 views
Skip to first unread message

Splend Apps

unread,
Oct 18, 2023, 1:58:52 PM10/18/23
to Google Mobile Ads SDK Developers
Hi!

We have a problem with the implementation of collapsible banner ads. We took all steps in accordance with the guidelines.
We use latest library version: com.google.firebase:firebase-ads:22.4.0
Banner is displayed but not expanded. It is collapsed but the collapse button is visible in the right (see screenshot):
Zrzut ekranu 2023-10-18 o 16.43.26.png
Error occurs on physical devices and the emulator on all 10 of our apps.
Do you have any idea what might be wrong?

Mobile Ads SDK Forum Advisor

unread,
Oct 18, 2023, 5:01:59 PM10/18/23
to splen...@gmail.com, google-adm...@googlegroups.com
Hi,

Thank you for getting back to us.

By reviewing your concern, I understand that you are facing an issue while implementing collapsible banners in your android application. Kindly provide a sample project so we could have full visibility of your implementation.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pUJLz:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


Splend Apps

unread,
Oct 24, 2023, 10:07:57 PM10/24/23
to Google Mobile Ads SDK Developers
OK, problem solved.
We passed to the AdView activity context instead of app context and now it works well.

MatJB

unread,
Mar 17, 2024, 11:08:59 AM3/17/24
to Google Mobile Ads SDK Developers
Hi! 
Thank you for replying with the solution.

This should be added to the official documentation.
We also tripped on the context detail.
Apparently Collapsible banner ads require you to pass an Activity context, not just a Context.
This is confusing as we used to use just a Context without any issue, but this is no longer the case when you try to implement Collapsible banner ads.

Regards,
Mat

Mobile Ads SDK Forum Advisor

unread,
Mar 18, 2024, 6:41:57 AM3/18/24
to codebor...@gmail.com, google-adm...@googlegroups.com

Hi Mat,

Thank you for contacting the Mobile Ads SDK Support team.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pUJLz:ref" (ADR-00205702)


Thanks,
 
Google Logo Mobile Ads SDK Team


Mobile Ads SDK Forum Advisor

unread,
Jul 22, 2024, 1:47:58 PM7/22/24
to codebor...@gmail.com, google-adm...@googlegroups.com
Hi,

The collapsible banner serving behaviour is not guarantee to return a collapsible banner. That said, if you are still having issues please provide some sample code and we will take a look.

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pUJLz:ref" (ADR-00205702)

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Ankit Chandora

unread,
Jan 26, 2025, 8:46:58 PMJan 26
to Google Mobile Ads SDK Developers
I'm also facing an issue where banner ads in Google Ad Manager require the activity context to load the ad. If we pass the application conext then the ad is not expanding.  This blocks us from preloading ads, as preloading happens before the activity is opened. How can we preload ads effectively in this scenario
Message has been deleted

Ankit Chandora

unread,
Jan 27, 2025, 2:00:38 AMJan 27
to Google Mobile Ads SDK Developers
Please find the sample code below :

 fun loadCollapsibleBannerAd() {

      adview = AdView(this.applicationContext)
      adview.adUnitId = "ca-app-pub-3940256099942544/2014213617"
      val adSize = getAdSize()

      adview.setAdSize(adSize)
      val extras = Bundle()
      extras.putString("collapsible", "bottom")
      val adRequest = AdRequest.Builder()
      .addNetworkExtrasBundle(AdMobAdapter::class.java, extras)
     .build()

      binding.bannerContainer.addView(adview
      adview.loadAd(adRequest)
}

Currently, I'm using a test ad unit for a collapsible banner. If I pass the activity context while creating the instance of AdView, the ad expands as expected. However, when I use the application context, the ad does not expand. This limitation prevents me from preloading the ad before the activity is opened and it is easily reproducible.

On Monday, 27 January 2025 at 07:18:06 UTC+5:30 Ankit Chandora wrote:
I'm facing an issue where banner ads in Google Ad Manager require the activity context to load the ad. If we don't pass the activity context then the loaded ad is not expanding. This blocks us from preloading ads, as preloading happens before the activity is opened. How can we preload ads effectively in this scenario?

Mobile Ads SDK Forum Advisor

unread,
Jan 27, 2025, 1:50:28 PMJan 27
to ankit.ch...@gmail.com, google-adm...@googlegroups.com

Hi Ankit,

 

Thank you I have confirmed the issue and will ask for a fix. I will let you know when we have next steps.

 

 

 
This message is in relation to case "ref:!00D1U01174p.!5004Q02pUJLz:ref" (ADR-00205702)

Thanks,
 
Google Logo
Nicholas Ventimiglia
Mobile Ads SDK Team


Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
 

 



Ankit Chandora

unread,
Jan 28, 2025, 4:19:12 AMJan 28
to Google Mobile Ads SDK Developers
Sure,  thanks
Reply all
Reply to author
Forward
0 new messages