googleads / googleads/googleads-mobile-android-examples
Jetpack Compose Native Ad Example: Missing `setNativeAd()` call and AdMob Policy Compliance Concern
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.9k
- Avg merge
- 15d 19h
- Merged PRs (30d)
- 1
Description
Affected Files:
Description
I noticed that setNativeAd() is not being called in the affected files, and I'm concerned this might violate AdMob policies.
As someone new to Compose but experienced with Android Views, I understand that we typically need to:
- Call
setNativeAd()on theNativeAdView - Populate each child view within the
NativeAdView
However, I don't see this implementation in the current code.
Questions:
- Is this a bug that needs to be addressed?
- Or can you confirm that this implementation is compliant with AdMob policies?
I want to ensure the code follows best practices and doesn't risk policy violations.
Expected Behavior
The native ad implementation should properly call setNativeAd() and register child views as per AdMob guidelines.
Current Behavior
The setNativeAd() method call appears to be missing from the implementation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with NativeScreen.kt around line 133 and the compose-util NativeAdView.kt implementation, then compare their behavior with the AdMob native ad guidance. Determine whether the utility registers child views and calls setNativeAd(); done means either confirming the existing implementation is compliant or documenting and correcting the missing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100