广告
最新更新 | 稳定版 | 候选发布版 | Beta 版 | Alpha 版 |
---|---|---|---|---|
2023 年 3 月 8 日 | - | - | - | 1.0.0-alpha05 |
声明依赖项
要添加对 Ads 的依赖项,您必须将 Google Maven 仓库添加到您的项目中。阅读Google 的 Maven 仓库以获取更多信息。
在您的应用或模块的 build.gradle
文件中添加所需工件的依赖项
Groovy
dependencies { implementation 'androidx.ads:ads-identifier:1.0.0-alpha05' // Optional - add if you're using Guava to handle // return values of type ListenableFuture. implementation 'com.google.guava:guava:28.0-android' }
Kotlin
dependencies { implementation("androidx.ads:ads-identifier:1.0.0-alpha05") // Optional - add if you're using Guava to handle // return values of type ListenableFuture. implementation("com.google.guava:guava:28.0-android") }
有关依赖项的更多信息,请参阅添加构建依赖项。
反馈
您的反馈有助于改进 Jetpack。如果您发现新问题或有改进此库的建议,请告诉我们。在创建新问题之前,请查看此库中的现有问题。您可以通过点击星形按钮为现有问题投票。
有关更多信息,请参阅问题跟踪器文档。
版本 1.0.0
版本 1.0.0-alpha05
2023 年 3 月 8 日
androidx.ads:ads-identifier:1.0.0-alpha05
、androidx.ads:ads-identifier-common:1.0.0-alpha05
和 androidx.ads:ads-identifier-provider:1.0.0-alpha05
已发布。1.0.0-alpha05 版包含这些提交。
API 变更
- 已弃用
androidx.ads:ads-identifier
和androidx.ads:ads-identifier-provider
。请改用Google Play 服务中提供的 Advertising ID API。(I57791)
版本 1.0.0-alpha04
2020 年 1 月 22 日
androidx.ads:ads-identifier:1.0.0-alpha04
、androidx.ads:ads-identifier-common:1.0.0-alpha04
和 androidx.ads:ads-identifier-provider:1.0.0-alpha04
已发布。1.0.0-alpha04 版包含这些提交。
新功能
- 性能改进。
API 变更
AdvertisingIdInfo.getId()
现在直接从AdvertisingIdProvider
返回广告 ID,因此该 ID 现在可以是任何格式。
版本 1.0.0-alpha03
2019 年 11 月 20 日
androidx.ads:ads-identifier:1.0.0-alpha03
和 androidx.ads:ads-identifier-common:1.0.0-alpha03
已发布。1.0.0-alpha03 版包含这些提交。
错误修复
- 移除了对 Java 8 编程语言的依赖。此库现在面向 Java 7 编程语言。
版本 1.0.0-alpha02
2019 年 9 月 18 日
androidx.ads:ads-identifier:1.0.0-alpha02
和 androidx.ads:ads-identifier-common:1.0.0-alpha02
已发布。1.0.0-alpha02 版包含这些提交。
API 变更
- 将
AdvertisingIdUtils.getAdvertisingIdProviderServices()
的返回类型从List<ResolveInfo>
更改为List<ServiceInfo>
错误修复
- 将
AdvertisingIdNotAvailableException
消息更改为更准确地显示“无可用的兼容 AndroidX Advertising ID 提供商。”
版本 1.0.0-alpha01
2019 年 8 月 7 日
androidx.ads:ads-identifier:1.0.0-alpha01
、androidx.ads:ads-identifier-common:1.0.0-alpha01
和 androidx.ads:ads-identifier-provider:1.0.0-alpha01
已发布。此版本中包含的提交可在此处找到。