Show admob banner ads by using only java

57 views
Skip to first unread message

16 64 69 B Hanif

unread,
Oct 7, 2022, 7:00:54 AM10/7/22
to Google Mobile Ads SDK Developers
Is there any way to show admob banner ads by using only java code and not by writing a single line of xml code? It would be better for me to understand if someone share me an example.. 


Thank for reading this question 

Mobile Ads SDK Forum Advisor

unread,
Oct 7, 2022, 2:43:14 PM10/7/22
to hnfal...@gmail.com, google-adm...@googlegroups.com
Hello,

Thank you for reaching out to us.

With regard to your concern, I'm afraid that we don't have a sample app with your use implementation use case. As stated on our guide, the first step toward displaying a banner is to place AdView in the layout for the Activity or Fragment in which you'd like to display it. The easiest way to do this is to add one to the corresponding XML layout file. However, you will need to create the layout programmatically instead for your use case. We would recommend to check out to developer forums like StackOverflow on how to do this.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


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