Implement standard ad metadata on Android

Ad constants

Constant name Description  
MediaHeartbeat.MediaObjectKey.StandardAdMetadata Constant for attaching standard ad metadata on Ad MediaObject.

Implemement standard ad metadata

For standard ad metadata, create a dictionary of standard ad metadata key value pairs using the keys for your platform:

// Setting standard Ad Metadata
Map <String, String> standardAdMetadata = new HashMap<String, String>();
standardAdMetadata.put(MediaHeartbeat.AdMetadataKeys.ADVERTISER, "Sample Advertiser");
standardAdMetadata.put(MediaHeartbeat.AdMetadataKeys.CAMPAIGN_ID, "Sample Campaign");
adInfo.setValue(MediaHeartbeat.MediaObjectKey.StandardAdMetadata, standardAdMetadata);

On this page