as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持

AdIdRetriever

AdIdRetriever

AdIdRetriever提供用于检索广告ID和广告跟踪状态的API。

构造函数

new AdIdRetriever()

new AdIdRetriever(): AdIdRetriever

返回值

AdIdRetriever

方法

fetchAdvertisingId()

static fetchAdvertisingId(): string

获取广告ID。

无论广告跟踪状态如何,都返回广告ID。只有在启用广告跟踪后,广告ID才能在“基于兴趣的广告”竞价中生效。有关何时使用广告ID的更多信息,请参阅:https://developer.amazon.com/zh/docs/policy-center/advertising-id.html#when-to-use-the-advertising-id

返回值

string


getMajorVersion()

static getMajorVersion(): number

获取底层原生模块的主版本。这可用于进行版本检查。

返回值

number


getMinorVersion()

static getMinorVersion(): number

获取底层原生模块的次版本。这可用于进行版本检查。

返回值

number


getPatchVersion()

static getPatchVersion(): number

获取底层原生模块的补丁版本。这可用于进行版本检查。

返回值

number


isAdvertisingTrackingEnabled()

static isAdvertisingTrackingEnabled(): boolean

获取广告跟踪状态。

如果用户启用了广告跟踪,则返回true。启用后,用户将看到“基于兴趣的广告”。禁用后,用户将看到“上下文广告”(即代表用户“选择不看”基于兴趣的广告)。有关如何使用“选择不看”控制基于兴趣的广告,请参阅:https://developer.amazon.com/zh/docs/policy-center/advertising-id.html#when-to-use-the-advertising-id

返回值

boolean


Last updated: 2025年9月30日