Native ads allow you to design an ad placement that matches the style of your app. While native ads provide a lot of flexibility, it's important to ensure your placements remain compliant of AdMob policies.
Native Validator is a new feature to help you catch policy violations before your app ships. It automatically identifies certain policy violations in your app and notifies you through the app's UI.
- Google Mobile Ads SDK 19.2.0 or higher.
Enable Native Validator
To enable Native Validator, add a
<meta-data> tag with a name of
com.google.android.gms.ads.flag.NATIVE_AD_DEBUGGER_ENABLED and value of
AndroidManifest.xml within the application tag.
<manifest> <application> <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 --> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/> <meta-data android:name="com.google.android.gms.ads.flag.NATIVE_AD_DEBUGGER_ENABLED" android:value="true" /> </application> </manifest>
Then, ensure your device is configured as a test device.
Using Native Validator
Once enabled, Native Validator will automatically alert you to certain policy violations in your UI via an overlay popup next to the native ad.
Clicking on See Issues takes you to a fullscreen list of the relevant policy violations.