<img src="https://img.shields.io/badge/%20-ENTERPRISE-%23B10031" style="float:left"/><br /> <img src="https://img.shields.io/badge/Android-V4-009727?logo=android" style="float:left"/><br />

The Android SDK includes support for the Open Measurement Interface Definition (OMID). By default, Open Measurement functionality is enabled for both VAST and Google IMA. OMID permits several ad-related features:

  • Third-party viewability

  • Verification measurement

  • (VAST only) Vendor restrictions

<br /> <hr />

## Requirements

The ad response must contain an `AdVerifications` node.

<br /> <hr />

## Customize OMID for VAST

OMID functionality is enabled by default for VAST, however you can use the following steps to customize the Open Measurement functionality:

  1. (Optional) Create an array of vendors allowed to execute scripts within the `AdVerifications`. If a verification script from an unauthorized vendor is found within an ad, the `verificationNotExecuted` script will be executed for the ad as per Open Measurement’s standard. If not defined, all vendors are assumed to be approved.

  2. Use `OmidConfig.Builder()` to create an Open Measurement config, `OmidConfig`. If defined in the previous step, be sure to pass the array of vendors allowed to execute scripts.

  3. Use `VastAdvertisingConfig.Builder()` to add the `OmidConfig` to the `VastAdvertisingConfig` object.

<br /> <hr />

## Disable OMID

The IAB recommends implementing a <a href="https://interactiveadvertisingbureau.github.io/Open-Measurement-SDKAndroid/#kill-switch-guidance" target="_blank">kill switch</a> to permit disabling OMID when a bad creative or verification data has been detected.

<br />

### VAST

To disable OMID, set `isOmidEnabled(false)`.

<br />

### Google IMA

To disable OMID, configure your ad server to not deliver the `AdVerifications` node. Contact your ad server representative for assistance.

<br />

(Script tags will be stripped)