as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
AdIdRetriever provides APIs for retrieving advertising IDs and advertising tracking state.

Constructors

new AdIdRetriever()

new AdIdRetriever(): AdIdRetriever

Returns

AdIdRetriever

Methods

fetchAdvertisingId()

static fetchAdvertisingId(): string
Get the advertising ID. Return the advertising ID regardless of the advertising tracking state. Advertising ID is effective in bidding for “interest-based advertisements” only when advertising tracking is enabled. See more details on when to use advertising ID: https://developer.amazon.com/docs/policy-center/advertising-id.html#when-to-use-the-advertising-id

Returns

string

getMajorVersion()

static getMajorVersion(): number
Get the Major version of the underlying native module. This can be used to make version checks.

Returns

number

getMinorVersion()

static getMinorVersion(): number
Get the Minor version of the underlying native module. This can be used to make version checks.

Returns

number

getPatchVersion()

static getPatchVersion(): number
Get the patch version of the underlying native module. This can be used to make version checks.

Returns

number

isAdvertisingTrackingEnabled()

static isAdvertisingTrackingEnabled(): boolean
Get the advertising tracking state. Return true if the user enables advertising tracking. When enabled, the user will see “interest-based advertisements”. When disabled, the user will see “contextual advertisements” (which means the user selected to “opt-out” of interest-based advertisements). See how “opt-out” controls interest-based advertisements: https://developer.amazon.com/docs/policy-center/advertising-id.html#when-to-use-the-advertising-id

Returns

boolean
最后修改于 2026年8月25日