NativeAdOptions.Builder

public static final class NativeAdOptions.Builder extends Object

Public Constructor Summary

Public Method Summary

NativeAdOptions
build()
Constructs a NativeAdOptions object with the specified attributes.
NativeAdOptions.Builder
setAdChoicesPlacement(int adChoicesPlacement)
Sets the placement of AdChoices icon (if present).
NativeAdOptions.Builder
setImageOrientation(int orientation)
This method is deprecated. Use setMediaAspectRatio(int) to set video and image aspect ratio.
NativeAdOptions.Builder
setMediaAspectRatio(int aspectRatio)
NativeAdOptions.Builder
setRequestCustomMuteThisAd(boolean requestCustomMuteThisAd)
Set this boolean to true to request a custom implementation for the Mute This Ad feature.
NativeAdOptions.Builder
setRequestMultipleImages(boolean shouldRequestMultipleImages)
Sets whether multiple images should be requested or not.
NativeAdOptions.Builder
setReturnUrlsForImageAssets(boolean shouldReturnUrls)
Sets whether URLs alone should be returned for image assets.
NativeAdOptions.Builder
setVideoOptions(VideoOptions videoOptions)
Sets the VideoOptions object.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public NativeAdOptions build ()

Constructs a NativeAdOptions object with the specified attributes.

public NativeAdOptions.Builder setAdChoicesPlacement (int adChoicesPlacement)

Sets the placement of AdChoices icon (if present). The value should be one of ADCHOICES_TOP_LEFT, ADCHOICES_TOP_RIGHT, ADCHOICES_BOTTOM_RIGHT or ADCHOICES_BOTTOM_LEFT. The default value is ADCHOICES_TOP_RIGHT.

public NativeAdOptions.Builder setImageOrientation (int orientation)

This method is deprecated.
Use setMediaAspectRatio(int) to set video and image aspect ratio.

Sets the orientation in which image should be returned.

public NativeAdOptions.Builder setMediaAspectRatio (int aspectRatio)

public NativeAdOptions.Builder setRequestCustomMuteThisAd (boolean requestCustomMuteThisAd)

Set this boolean to true to request a custom implementation for the Mute This Ad feature. Default value is false.

public NativeAdOptions.Builder setRequestMultipleImages (boolean shouldRequestMultipleImages)

Sets whether multiple images should be requested or not. Default value is false.

public NativeAdOptions.Builder setReturnUrlsForImageAssets (boolean shouldReturnUrls)

Sets whether URLs alone should be returned for image assets. If true, the SDK will not download image assets and instead return a NativeAd.Image with just the URI and Scale properties populated. If false, the SDK will automatically download image assets and return a NativeAd.Image with all three properties (URI, Scale, and Drawable) populated. The default value is false.

public NativeAdOptions.Builder setVideoOptions (VideoOptions videoOptions)

Sets the VideoOptions object.