Android 引荐者
复制一个带有安装步骤和完整 Markdown 指南的设置提示。
Google Play 安装引荐者
标题为“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 引荐 来规划原生插件工作,连接它与 使用 @capgo/capacitor-install-referrer 为使用 @capgo/capacitor-install-referrer 原生能力 Capgo 插件目录 为 Capgo 插件目录中的产品流程 Capacitor 由 Capgo 提供的插件 为 Capacitor 由 Capgo 提供的插件中的实现细节 添加或更新插件 为添加或更新插件中的实现细节 Ionic Enterprise 插件替代方案 为 Ionic Enterprise 插件替代方案中的产品流程