Google 播放安装推荐人 API 与 INSTALL_REFERRER 广播
Google Play Install Referrer API vs. INSTALL_REFERRER broadcast
最近 Google 发布了 Google Play Install Referrer API (announcement)。
与来自 Google Play 的 INSTALL_REFERRER 广播相比,除了推荐人本身之外,它还提供额外的信息,例如点击和安装时间。
第一个问题:它是INSTALL_REFERRER广播的完全替代品吗?我们是否应该放弃广播接收器并开始使用新的 API?
其次: 是否有任何信息在哪些特定情况下新 API 比 INSTALL_REFERRER 广播更可靠?
一切都是为了 安全 和 简单。作为 doc implies, you can use the Google Play Store's Install Referrer API to securely retrieve more accurate and reliable referral content from Google Play and also you can consider switch to Install Referrer API Client Library to simplify your development process. and as u mentioned in the query it returns ReferrerDetails 对象,使用以下三种方法保存与安装相关的额外信息。
ReferrerDetails response = mReferrerClient.getInstallReferrer();
response.getInstallReferrer();
response.getReferrerClickTimestampSeconds();
response.getInstallBeginTimestampSeconds();
API 仅适用于 Play 商店版本 8.3.73 及更高版本。任何想要开始使用它的开发者都可以立即开始,但必须在他们的应用程序和 Play 商店之间建立连接。
此外,请查看 article from Adjust,其中解释了新的 API 如何防止移动广告的点击注入欺诈。
P.S。您需要跟踪最新的 API 级别,以便能够为您在项目中遇到的问题提供最佳解决方案。
最近 Google 发布了 Google Play Install Referrer API (announcement)。
与来自 Google Play 的 INSTALL_REFERRER 广播相比,除了推荐人本身之外,它还提供额外的信息,例如点击和安装时间。
第一个问题:它是INSTALL_REFERRER广播的完全替代品吗?我们是否应该放弃广播接收器并开始使用新的 API?
其次: 是否有任何信息在哪些特定情况下新 API 比 INSTALL_REFERRER 广播更可靠?
一切都是为了 安全 和 简单。作为 doc implies, you can use the Google Play Store's Install Referrer API to securely retrieve more accurate and reliable referral content from Google Play and also you can consider switch to Install Referrer API Client Library to simplify your development process. and as u mentioned in the query it returns ReferrerDetails 对象,使用以下三种方法保存与安装相关的额外信息。
ReferrerDetails response = mReferrerClient.getInstallReferrer();
response.getInstallReferrer();
response.getReferrerClickTimestampSeconds();
response.getInstallBeginTimestampSeconds();
API 仅适用于 Play 商店版本 8.3.73 及更高版本。任何想要开始使用它的开发者都可以立即开始,但必须在他们的应用程序和 Play 商店之间建立连接。
此外,请查看 article from Adjust,其中解释了新的 API 如何防止移动广告的点击注入欺诈。
P.S。您需要跟踪最新的 API 级别,以便能够为您在项目中遇到的问题提供最佳解决方案。