Implement of Admob Ads in Jetpack Compose App

414 views
Skip to first unread message

Ibrahim Ezzat

unread,
Jan 29, 2024, 5:53:54 AM1/29/24
to Google Mobile Ads SDK Developers
I'm building an app fully in compose Kotlin and I needed a way to implement ads in compose. I found a way for a banner and Interstial Ad which I will share here so I can get feedback if this solution is as good as XML or not. I also need a way to implement Native ads in the compose

image_2024-01-28_190650058.png

image_2024-01-28_190718079.png

I have found a conversation in 2021 that says it's not recommended to use ads in compose and I was wondering if that is still the case in 2024
https://groups.google.com/g/google-admob-ads-sdk/c/X_KCHHHRIpM

Mobile Ads SDK Forum Advisor

unread,
Jan 29, 2024, 9:22:33 AM1/29/24
to ibrahim...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

By reviewing your concern, I understand that you need guidance on how to implement Native ads in the jetpack compose.

It is important to note that, as per the Native advanced documentation, it is preferable to adhere to the XML layout structure.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02ryQKu:ref"

Thanks,
 
Google Logo Mobile Ads SDK Team


publio antonio

unread,
Mar 18, 2025, 3:58:10 AMMar 18
to Google Mobile Ads SDK Developers
I really don't understand. Google says (since years): Use Compose and forget Views. Than you read: " It is important to note that, as per the Native advanced documentation, it is preferable to adhere to the XML layout structure." Bah!

Mobile Ads SDK Forum Advisor

unread,
Mar 18, 2025, 9:15:39 AMMar 18
to publioan...@gmail.com, google-adm...@googlegroups.com

Hi,

Please check Android sample showing use of ads in Jetpack Compose, available at JetpackComposeDemo. The sample currently includes UMP SDK integration, a simple banner example, and banner ads within a lazy list. But for native ads please follow this Native advanced documentation

Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-03-18 13:14:50Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02ryQKu:ref" (ADR-00221025)



Reply all
Reply to author
Forward
0 new messages