Android 引荐者
复制一个设置提示,包括安装步骤和此插件的全Markdown指南。
Google Play Install Referrer
Section titled “Google Play Install Referrer”On Android, getReferrer() connects to the Google Play Install Referrer service and returns data from the Play Store install record.
const result = await InstallReferrer.getReferrer();
console.log(result.referrer);console.log(result.clickTimestampSeconds);console.log(result.installBeginTimestampSeconds);console.log(result.googlePlayInstantParam);Returned Fields
Section titled “Returned Fields”| Field | 描述 |
|---|---|
platform | 始终 android. |
referrer | 原始Play安装引荐字符串。 |
clickTimestampSeconds | 客户端引荐点击时间戳(秒)。 |
installBeginTimestampSeconds | 客户端安装开始时间戳(秒)。 |
googlePlayInstantParam | 用户是否启动了应用的即时体验。 |
需求
标题:需求- 应用必须从Google Play安装才能获取真实的安装引荐数据。
- 设备必须具有支持Install Referrer服务的Play Store版本。
- 不需要Android运行时权限。
错误案例
错误案例部分当Play Store服务不可用、不支持、在返回结果之前断开连接或返回意外响应时,插件会被拒绝。
从Android Referrer继续
从Android Referrer继续部分如果您正在使用 Android Referrer 来规划原生插件工作,连接它到 使用@capgo/capacitor-install-referrer 在使用@capgo/capacitor-install-referrer时, Capgo插件目录 在Capgo插件目录中 Capacitor 插件由 Capgo 为 Capacitor 插件由 Capgo 的实现细节 添加或更新插件 为添加或更新插件的实现细节, 和 Ionic 企业插件替代品 为 Ionic 企业插件替代品的产品工作流程