Subject: Query on Adding Adaptive Banners to a Combined Solution with Both Native and Banner Ads

38 views
Skip to first unread message

Suryakant Sharma

unread,
Jan 3, 2025, 7:08:37 AM (3 days ago) Jan 3
to Google Mobile Ads SDK Developers

Dear Google Ad Support Team,

I am reaching out to inquire about the feasibility of incorporating an adaptive banner ad within a combined ad solution that includes both native and banner ads.
I have checked the doc of adaptive banner and  combined solution with both native and banner
 but couldn't get a response when I requested for adaptive banner from combined request using GADLoader. Is this feasible ?

Your guidance on this matter would be greatly appreciated. If this is feasible, any documentation or examples you could provide would be incredibly helpful.


Thank you for your time and support. I look forward to your response. let me know any follow-up questions. 

Screenshot 2025-01-03 at 5.33.41 PM.png

Mobile Ads SDK Forum Advisor

unread,
Jan 3, 2025, 12:34:30 PM (3 days ago) Jan 3
to suryakan...@rapido.bike, google-adm...@googlegroups.com

Hi Suryakant,

As per the Combining Custom-Rendered Native Ad and Banner Ad Requests, with a few changes to your code, you can combine native and banner ads in your ad requests. The GADAdLoader object can also be configured to make ad requests that can result in either a banner or native ad.

Could you please share a sample project where the issue can be reproduced. This will allow us to review the implementation.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. 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=5004Q00002vGrG4QAK&entry.80707362=00280392

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.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vGrG4:ref" (ADR-00280392)

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5


 


Suryakant Sharma

unread,
Jan 5, 2025, 4:27:44 AM (22 hours ago) Jan 5
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com

Hi Team, 
Thanks for replying 
I have worked on a sample project to reproduce the issue. Please go through it. 
I have added //TODO: - uncomment so that you can play around with it I have talked it from Google sample project and converted it into a demo project to show the issue 
The code is in CombineNativeBannerAdaptiveWidthExample.swift 
If you choose the banner and native unit IDs it works with the default banner size (small, medium, large) but the adaptive banner unit ID is not working even if I add code for returning adaptive size in the delegate method. 

func validBannerSizes(for adLoader: GADAdLoader)

Let me know any further questions or have suggestions/workaround. 

I uploaded a sample project in the given link 
https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002vGrG4QAK&entry.80707362=00280392

Thanks 
Suryakant 


THIS EMAIL COMMUNICATION IS PRIVILEGED AND MAY CONTAIN CONFIDENTIAL INFORMATION OF RAPIDO. IF YOU ARE NOT THE INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT YOU HAVE RECEIVED THIS MESSAGE IN ERROR AND ANY REVIEW, DISSEMINATION, DISTRIBUTION OR COPYING OF THIS MESSAGE IS STRICTLY PROHIBITED. PLEASE NOTIFY US IMMEDIATELY BY EMAIL AND DELETE THE MESSAGE FROM YOUR SYSTEM.

NOTHING CONTAINED IN THIS DISCLAIMER SHALL BE CONSTRUED IN ANY WAY TO GRANT PERMISSION TO TRANSMIT CONFIDENTIAL INFORMATION OR AS A WAIVER OF ANY CONFIDENTIALITY OR PRIVILEGE.

RAPIDO DOES NOT ACCEPT ANY RESPONSIBILITY OR LIABILITY ARISING FROM THE USE OF THIS COMMUNICATION. NO REPRESENTATION IS BEING MADE THAT THE INFORMATION PRESENTED IS ACCURATE, CURRENT OR COMPLETE AND SUCH INFORMATION IS AT ALL TIMES SUBJECT TO CHANGE WITHOUT NOTICE

Mobile Ads SDK Forum Advisor

unread,
12:24 AM (3 hours ago) 12:24 AM
to suryakan...@rapido.bike, google-adm...@googlegroups.com

Hi Suryakant,

Thank you for providing us with the requested information.

I checked your sample project and observed that the current Ad unit being used doesn't match format. So I replaced it with the adaptive banner demo ad unit ID and specified which banner ad sizes should be requested by responding to the validBannerSizesForAdLoader message and I can see the Combining Native and BannerAdaptive is working as expected.

Code snippet for validBannerSizes(for adLoader: GADAdLoader):

  public func validBannerSizes(for adLoader: GADAdLoader) -> [NSValue] {
          return [NSValueFromGADAdSize(GADAdSizeBanner),
            NSValueFromGADAdSize(GADAdSizeMediumRectangle),
                  NSValueFromGADAdSize(GADAdSizeMediumRectangle),
            NSValueFromGADAdSize(GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(self.preferredContentSize.width))]
        }

I hope this helps! Let me know if you have any follow-up questions. 

Suryakant Sharma

unread,
12:33 AM (2 hours ago) 12:33 AM
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
Thank you for getting back to me. 
code below is working I agree 

Suryakant Sharma

unread,
12:37 AM (2 hours ago) 12:37 AM
to Mobile Ads SDK Forum Advisor, google-adm...@googlegroups.com
continuing same discussion 
Why is it not working? while I am sending adaptive size shouldn't I don't send other sizes of constant width and height?
It is showing an error. So not sure why this behavior? 

Failed to load combined ad: Request Error: No ad to show.


public func validBannerSizes(for adLoader: GADAdLoader) -> [NSValue] {
          return [NSValueFromGADAdSize(GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(self.preferredContentSize.width))]
        }
Reply all
Reply to author
Forward
0 new messages