NativeAdOptions

public final class NativeAdOptions


Used to configure native ad requests.

Summary

Nested types

@IntDef(value = )
public annotation NativeAdOptions.AdChoicesPlacement

AdChoices icon placement.

public final class NativeAdOptions.Builder

Builder class for NativeAdOptions.

@IntDef(value = )
public annotation NativeAdOptions.NativeMediaAspectRatio

Media aspect ratio.

@IntDef(value = )
public annotation NativeAdOptions.SwipeGestureDirection

Custom click swipe gesture direction.

Constants

static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int

Unknown media aspect ratio.

static final int

The swipe direction is down.

static final int

The swipe direction is to the left.

static final int

The swipe direction is to the right.

static final int

The swipe direction is up.

Public fields

final int
final int
final VideoOptions

Public methods

int

Returns the AdChoices placement.

int

Returns the aspect ratio of the media to be returned.

@Nullable VideoOptions

Returns the VideoOptions object.

boolean

Returns true if multiple images are requested.

boolean

Returns true if urls will be returned for image assets instead of images themselves.

Constants

ADCHOICES_BOTTOM_LEFT

public static final int ADCHOICES_BOTTOM_LEFT = 3

ADCHOICES_BOTTOM_RIGHT

public static final int ADCHOICES_BOTTOM_RIGHT = 2

ADCHOICES_TOP_LEFT

public static final int ADCHOICES_TOP_LEFT = 0

ADCHOICES_TOP_RIGHT

public static final int ADCHOICES_TOP_RIGHT = 1

NATIVE_MEDIA_ASPECT_RATIO_ANY

public static final int NATIVE_MEDIA_ASPECT_RATIO_ANY = 1

NATIVE_MEDIA_ASPECT_RATIO_LANDSCAPE

public static final int NATIVE_MEDIA_ASPECT_RATIO_LANDSCAPE = 2

NATIVE_MEDIA_ASPECT_RATIO_PORTRAIT

public static final int NATIVE_MEDIA_ASPECT_RATIO_PORTRAIT = 3

NATIVE_MEDIA_ASPECT_RATIO_SQUARE

public static final int NATIVE_MEDIA_ASPECT_RATIO_SQUARE = 4

NATIVE_MEDIA_ASPECT_RATIO_UNKNOWN

public static final int NATIVE_MEDIA_ASPECT_RATIO_UNKNOWN = 0

Unknown media aspect ratio.

SWIPE_GESTURE_DIRECTION_DOWN

public static final int SWIPE_GESTURE_DIRECTION_DOWN = 8

The swipe direction is down.

SWIPE_GESTURE_DIRECTION_LEFT

public static final int SWIPE_GESTURE_DIRECTION_LEFT = 2

The swipe direction is to the left.

SWIPE_GESTURE_DIRECTION_RIGHT

public static final int SWIPE_GESTURE_DIRECTION_RIGHT = 1

The swipe direction is to the right.

SWIPE_GESTURE_DIRECTION_UP

public static final int SWIPE_GESTURE_DIRECTION_UP = 4

The swipe direction is up.

Public fields

adChoicesPlacement

public final int adChoicesPlacement

mediaAspectRatio

public final int mediaAspectRatio

videoOptions

public final VideoOptions videoOptions

Public methods

getAdChoicesPlacement

public int getAdChoicesPlacement()

Returns the AdChoices placement.

getMediaAspectRatio

public int getMediaAspectRatio()

Returns the aspect ratio of the media to be returned.

getVideoOptions

public @Nullable VideoOptions getVideoOptions()

Returns the VideoOptions object. Returns null if VideoOptions is not present.

shouldRequestMultipleImages

public boolean shouldRequestMultipleImages()

Returns true if multiple images are requested.

shouldReturnUrlsForImageAssets

public boolean shouldReturnUrlsForImageAssets()

Returns true if urls will be returned for image assets instead of images themselves.