Select platform: [Android (beta)
![New-selected](https://developers.google.com/static/admob/images/new-selected.svg)](https://developers.google.com/admob/android/next-gen/native/control-click "View this page for the Android (beta) platform docs.") [Android](https://developers.google.com/admob/android/native/control-click "View this page for the Android platform docs.") [iOS](https://developers.google.com/admob/ios/native/control-click "View this page for the iOS platform docs.")

<br />

When you register ad asset views with GMA Next-Gen SDK,
click-through behavior is enabled. If this click-through behaviour differs from
the rest of your app, accidental clicks can trigger the
[confirmed click policy](https://support.google.com/admob/answer/10094971)
for Google Ads.

This guide describes how to control click behavior of all native assets to
match your app's behavior and prevent accidental clicks.

## Prerequisites

Before you continue, ensure you do the following:

- Complete the [native ad guide](https://developers.google.com/admob/android/next-gen/native).
- Request your account manager to enable [custom playback controls](https://developers.google.com/admob/android/next-gen/native/options#custom_playback_controls) for video Google ads.

## Add an overlay to prevent clicks

To prevent clicks on a registered native ad asset, add a transparent overlay
over the native ad asset.

The following example places an overlay over the media view:  

### Kotlin

    override fun onNativeAdLoaded(nativeAd: NativeAd) {
      CoroutineScope(Dispatchers.Main).launch {
        // Block user interaction to the media view by creating an overlay on top
        // of the media view.
        // Create a clickable overlay view. FrameLayout is recommended because
        // its default width and height are MATCH_PARENT.
        val overlayFrameLayout = FrameLayout(nativeAdBinding.root.context)
        overlayFrameLayout.isClickable = true
        // Add the overlay as a child of the media view so that it doesn't
        // impact OMID viewability measurements.
        nativeAdBinding.adMedia.addView(overlayFrameLayout)
        // Make sure the overlay view sits on top of the media view.
        overlayFrameLayout.bringToFront()
      }
    }

### Java

    @Override
    public void onNativeAdLoaded(@NonNull NativeAd nativeAd) {
      runOnUiThread(
          () -> {
              // Block user interaction to the media view by creating an overlay on top
              // of the media view.
              // Create a clickable overlay view. FrameLayout is recommended because
              // its default width and height are MATCH_PARENT.
              FrameLayout overlayFrameLayout = new FrameLayout(adView.getContext());
              overlayFrameLayout.setClickable(true);
              // Add the overlay as a child of the media view so that it doesn't
              // impact OMID viewability measurements.
              nativeAdBinding.adMedia.addView(overlayFrameLayout);
              // Make sure the overlay view sits on top of the media view.
              overlayFrameLayout.bringToFront();
          });
    }

| **Note:** [Open Measurement](https://developers.google.com/admob/android/next-gen/open-measurement) requires that the overlay is transparent and non-obstructing. Ensure you leave your view's alpha at 0 or keep the overlay visibility unrendered.

## Add custom playback controls

| **Warning:** Access to this feature is limited. To request access reach out to your account manager.

Since default video controls come integrated within the media view, blocking the
media view also blocks these default playback controls. You must enable custom
playback controls and ensure you order these controls above the click blocking
overlay.

![](https://developers.google.com/static/admob/images/native-control-click.png)

To add custom playback controls into your project, see
[Custom playback controls](https://developers.google.com/admob/android/next-gen/native/options#custom_playback_controls).


## Verify policy violations

To help identify policy violations in your native ad, see
[Native validator](https://developers.google.com/admob/android/next-gen/native/validator).