AdData.Builder.SetMetadata(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the buyer ad metadata used during the ad selection process.
[Android.Runtime.Register("setMetadata", "(Ljava/lang/String;)Landroid/adservices/common/AdData$Builder;", "", ApiSince=34)]
public Android.AdServices.Common.AdData.Builder SetMetadata(string metadata);
[<Android.Runtime.Register("setMetadata", "(Ljava/lang/String;)Landroid/adservices/common/AdData$Builder;", "", ApiSince=34)>]
member this.SetMetadata : string -> Android.AdServices.Common.AdData.Builder
Parameters
- metadata
- String
Returns
- Attributes
Remarks
Sets the buyer ad metadata used during the ad selection process.
The metadata should be a valid JSON object serialized as a string. Metadata represents ad-specific bidding information that will be used during ad selection as part of bid generation and used in buyer JavaScript logic, which is executed in an isolated execution environment.
If the metadata is not a valid JSON object that can be consumed by the buyer's JS, the ad will not be eligible for ad selection.
See AdData.getMetadata() for detail.
Android reference for android.adservices.common.AdData.Builder.setMetadata.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.