安卓referrer
复制一个包含安装步骤和完整Markdown指南的设置提示。
Google Play Install Referrer
Google Play 安装引荐服务在 Android 上, getReferrer() 连接 Google Play 安装引荐服务并返回 Play Store 安装记录中的数据.
const result = await InstallReferrer.getReferrer();
console.log(result.referrer);console.log(result.clickTimestampSeconds);console.log(result.installBeginTimestampSeconds);console.log(result.googlePlayInstantParam);返回的字段
返回的字段| 字段 | 描述 |
|---|---|
platform | 始终 android. |
referrer | 原始 Play 安装引荐字符串 |
clickTimestampSeconds | 客户端引荐点击时间戳(秒) |
installBeginTimestampSeconds | 客户端安装开始时间戳(秒数)。 |
googlePlayInstantParam | 用户是否启动了应用的即时体验。 |
需求
标题:需求- 应用必须从Google Play安装才能获取真实安装引荐人数据。
- 设备必须具有支持Install Referrer服务的Play Store版本。
- 不需要任何Android运行时权限。
错误案例
标题:错误案例插件在Play Store服务不可用、不支持、断开连接前返回结果或返回的响应不期望时拒绝。
继续从Android引荐
标题:继续从Android引荐如果您正在使用 Android Referrer 为native插件工作做好准备,连接它与 使用 @capgo/capacitor-install-referrer 为native能力在使用 @capgo/capacitor-install-referrer 中 Capgo 插件目录 为产品工作流程在 Capgo 插件目录 中 Capacitor 由 Capgo 的插件 为实现细节在 Capacitor 由 Capgo 的插件 中 添加或更新插件 为实现细节在添加或更新插件 中,和 Ionic Enterprise插件替代方案 为 Ionic Enterprise Plugin 替代品的产品工作流。