目录

Constant-values

All constants are under the ppsads.settings object.

AdType

Ad type.

Attribute

Value

Description

NATIVE

3

Native ad.

REWARD

7

Rewarded ad.

BANNER

8

Banner ad.

ICON

9

Icon ad.

INTERSTITIAL

12

Interstitial ad.

AudioFocusType

Scenarios in which your app will or won't obtain the audio focus.

Attribute

Value

Description

GAIN_AUDIO_FOCUS_ALL

0

Obtains the audio focus when a video is played, no matter whether the video is muted.

NOT_GAIN_AUDIO_FOCUS_WHEN_MUTE

1

Does not obtain the audio focus when a video is played, no matter whether the video is muted.

NOT_GAIN_AUDIO_FOCUS_ALL

2

Obtains the audio focus only when a video is played without being muted.

ChoicesPosition

Ad choice icon position.

Attribute

Value

Description

TOP_LEFT

0

Upper left corner.

TOP_RIGHT

1

Upper right corner.

BOTTOM_RIGHT

2

Lower right corner.

BOTTOM_LEFT

3

Lower left corner.

INVISIBLE

4

Invisible.

ContentClassification

Ad content rating.

Attribute

Value

Description

CLASSIFICATION_W

'W'

Content suitable for widespread audiences.

CLASSIFICATION_PI

'PI'

Content suitable for audiences with parental guidance.

CLASSIFICATION_J

'J'

Content suitable for junior and older audiences.

CLASSIFICATION_A

'A'

Content suitable for adults only.

CreativeType

Returned creative type.

Attribute

Value

Description

TEXT

1

Text only.

PIC

2

Large image.

PIC_TXT

3

Large image with text.

GIF

4

GIF

NONE

5

The creative type is not specified.

VIDEO_TEXT

6

Video with text.

SMALL_PIC_TEXT

7

Small image with text.

THREE_SMALL_PIC_TEXT

8

Three small images with text.

VIDEO

9

Video.

UNKNOW

100

Unknown type. This value is returned when an error occurs.

TEXT_WITH_DOWNLOAD_BTN

101

Text with a download button.

BIG_IMAGE_WITH_DOWNLOAD_BTN

102

Large image with a download button.

BIG_IMAGE_TEXT_WITH_DOWNLOAD_BTN

103

Large image with text and a download button.

VIDEO_TEXT_WITH_DOWNLOAD_BTN

106

Video with text and a download button.

SMALL_IMAGE_TEXT_WITH_DOWNLOAD_BTN

107

Small image with text and a download button.

THREE_SMALL_PIC_TEXT_WITH_DOWNLOAD_BTN

108

Three small images with text and a download button.

DetailedCreativeType

Requested creative type.

Attribute

Value

Description

BIG_IMAGE

901

Large static image.

VIDEO

903

Video.

THREE_IMG

904

Three small images with text.

SMALL_IMG

905

Small image with text.

SINGLE_IMG

909

Single image.

SHORT_TEXT

913

Short text link.

LONG_TEXT

914

Long text link.

DeviceType

Device type.

Attribute

Value

Description

PHONE

4

Phone.

TABLET

5

Tablet.

Mapping Between DetailedCreativeType and CreativeType

Example: If DetailedCreativeType is set to 901 in an ad request, value 3 or 103 of CreativeType will be returned.

DetailedCreativeType

CreativeType

901: large static image.

3: large image.

103: large image with text and a download button.

903: video.

6: video with text.

106: video with text and a download button.

904: three small images with text.

8: three small images with text.

108: three small images with text and a download button.

905: small image with text.

7: small image with text.

107: small image with text and a download button.

909: single image.

2: large image.

102: large image with a download button.

913: short text link.

1: text.

101: text with a download button.

914: long text link.

1: text.

101: text with a download button.

MediaAspect

Aspect ratio of a native ad image.

Attribute

Value

Description

ASPECT_CUSTOM_SIZE

-1

Custom aspect ratio.

ASPECT_UNKNOWN

0

Unknown aspect ratio.

ASPECT_ANY

1

Any aspect ratio.

ASPECT_LANDSCAPE

2

Aspect ratio in landscape orientation.

ASPECT_PORTRAIT

3

Aspect ratio in portrait orientation.

ASPECT_SQUARE

4

Square.

MediaDirection

Image orientation.

Attribute

Value

Description

ANY

0

Any orientation.

PORTRAIT

1

Portrait.

LANDSCAPE

2

Landscape.

NonPersonalizedAd

Indicates whether to request only non-personalized ads.

Attribute

Value

Description

ALLOW_ALL

0

Requests personalized and non-personalized ads.

ALLOW_NON_PERSONALIZED

1

Requests only non-personalized ads.

TagForChild

Child-directed setting.

Attribute

Value

Description

PROTECTION_FALSE

0

Does not process ad requests according to the COPPA.

PROTECTION_TRUE

1

Processes ad requests according to the COPPA.

PROTECTION_UNSPECIFIED

-1

Whether to process ad requests according to the COPPA is not specified.

UnderAge

Setting directed to users under the age of consent.

Attribute

Value

Description

PROMISE_FALSE

0

Does not process ad requests as directed to users under the age of consent.

PROMISE_TRUE

1

Processes ad requests as directed to users under the age of consent.

PROMISE_UNSPECIFIED

-1

Whether to process ad requests as directed to users under the age of consent is not specified.

IsQueryUseEnabled

Indicates whether to request only non-personalized ads.

Attribute

Value

Description

QUERY_USE_ENABLED

1

Search keywords can be used.

QUERY_USE_DISABLED

0

Search keywords cannot be used.