NativeAdOptions

class NativeAdOptions


Used to configure native ad requests.

Summary

Nested types

@IntDef(value = [0, 1, 2, 3])
annotation NativeAdOptions.AdChoicesPlacement

AdChoices icon placement.

@IntDef(value = [0, 1, 2, 3, 4])
annotation NativeAdOptions.NativeMediaAspectRatio

Media aspect ratio.

@IntDef(value = [1, 2, 4, 8])
annotation NativeAdOptions.SwipeGestureDirection

Custom click swipe gesture direction.

Constants

const Int
const Int
const Int
const Int
const Int

Any media aspect ratio.

const Int

Landscape media aspect ratio.

const Int

Portrait media aspect ratio.

const Int

Square media aspect ratio.

const Int

Unknown media aspect ratio.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

This property is deprecated.

const Int

The swipe direction is down.

const Int

The swipe direction is to the left.

const Int

The swipe direction is to the right.

const Int

The swipe direction is up.

Public functions

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

const val ADCHOICES_BOTTOM_LEFT = 3: Int

ADCHOICES_BOTTOM_RIGHT

const val ADCHOICES_BOTTOM_RIGHT = 2: Int

ADCHOICES_TOP_LEFT

const val ADCHOICES_TOP_LEFT = 0: Int

ADCHOICES_TOP_RIGHT

const val ADCHOICES_TOP_RIGHT = 1: Int

NATIVE_MEDIA_ASPECT_RATIO_ANY

const val NATIVE_MEDIA_ASPECT_RATIO_ANY = 1: Int

Any media aspect ratio.

NATIVE_MEDIA_ASPECT_RATIO_LANDSCAPE

const val NATIVE_MEDIA_ASPECT_RATIO_LANDSCAPE = 2: Int

Landscape media aspect ratio.

NATIVE_MEDIA_ASPECT_RATIO_PORTRAIT

const val NATIVE_MEDIA_ASPECT_RATIO_PORTRAIT = 3: Int

Portrait media aspect ratio.

NATIVE_MEDIA_ASPECT_RATIO_SQUARE

const val NATIVE_MEDIA_ASPECT_RATIO_SQUARE = 4: Int

Square media aspect ratio. This is not a strict 1:1 aspect ratio.

NATIVE_MEDIA_ASPECT_RATIO_UNKNOWN

const val NATIVE_MEDIA_ASPECT_RATIO_UNKNOWN = 0: Int

Unknown media aspect ratio.

ORIENTATION_ANY

const val ORIENTATION_ANY = 0: Int

ORIENTATION_LANDSCAPE

const val ORIENTATION_LANDSCAPE = 2: Int

ORIENTATION_PORTRAIT

const val ORIENTATION_PORTRAIT = 1: Int

SWIPE_GESTURE_DIRECTION_DOWN

const val SWIPE_GESTURE_DIRECTION_DOWN = 8: Int

The swipe direction is down.

SWIPE_GESTURE_DIRECTION_LEFT

const val SWIPE_GESTURE_DIRECTION_LEFT = 2: Int

The swipe direction is to the left.

SWIPE_GESTURE_DIRECTION_RIGHT

const val SWIPE_GESTURE_DIRECTION_RIGHT = 1: Int

The swipe direction is to the right.

SWIPE_GESTURE_DIRECTION_UP

const val SWIPE_GESTURE_DIRECTION_UP = 4: Int

The swipe direction is up.

Public functions

shouldRequestMultipleImages

fun shouldRequestMultipleImages(): Boolean

Returns true if multiple images are requested.

shouldReturnUrlsForImageAssets

fun shouldReturnUrlsForImageAssets(): Boolean

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

Public properties

adChoicesPlacement

val adChoicesPlacementInt

customClickGestureAllowTaps

val customClickGestureAllowTapsBoolean

customClickGestureDirection

val customClickGestureDirectionInt

mediaAspectRatio

val mediaAspectRatioInt

shouldRequestMultipleImages

val shouldRequestMultipleImagesBoolean

shouldReturnUrls

val shouldReturnUrlsBoolean

useCustomMuteThisAd

val useCustomMuteThisAdBoolean

videoOptions

val videoOptionsVideoOptions?