Implement of Native Ads in Jetpack Compose App

1,682 views
Skip to first unread message

Ahmad Joseph

unread,
Jun 18, 2021, 9:27:43 AM6/18/21
to Google Mobile Ads SDK Developers
Hi,

I would like to know if it's safe to implement native ads in a composable view or shall I stick to regular NativeAdView xml view?

Mobile Ads SDK Forum Advisor

unread,
Jun 21, 2021, 12:12:15 AM6/21/21
to ah.jos...@gmail.com, google-adm...@googlegroups.com

Hi Ahmad,

Thank you for reaching out to us.

As per documentation, it better to stick to xml layout as all assets for a given native ad should be rendered inside the NativeAdView layout. Registering the views in this way allows the SDK to automatically handle tasks such as:

  • Recording clicks
  • Recording impressions (when the first pixel is visible on the screen)
  • Displaying the AdChoices overlay

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 


 

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