Android リファラー
このプラグインのインストール手順とフルマークダウンガイドを含むセットアッププロンプトをコピーします。
Google Play インストールリファラー
「Google Play インストールリファラー」のセクションAndroidで getReferrer() Google Play インストールリファラー サービスに接続し、Playストアのインストールレコードからデータを取得します。
const result = await InstallReferrer.getReferrer();
console.log(result.referrer);console.log(result.clickTimestampSeconds);console.log(result.installBeginTimestampSeconds);console.log(result.googlePlayInstantParam);返却されたフィールド
「返却されたフィールド」のセクション| フィールド | 説明 |
|---|---|
platform | 常に android. |
referrer | プレイインストールリファラーストリングを取得します。 |
clickTimestampSeconds | クライアント側のリファラークリックタイムスタンプ(秒) |
installBeginTimestampSeconds | クライアント側のインストール開始タイムスタンプ(秒) |
googlePlayInstantParam | ユーザーがアプリのインスタントエクスペリエンスを起動したかどうか |
- Google Playからアプリをインストールする必要があります。
- Play StoreのバージョンがInstall Referrerサービスをサポートしている必要があります。
- Android runtimeの許可は必要ありません。
エラーケース
エラーケースPlay Storeサービスが利用できない、サポートされていない、結果を返す前に切断された、または予期しない応答を返す場合、プラグインは拒否されます。
Android Referrerから続けて
エラーケースあなたが使用している場合 Android Referrer nativeプラグインの作業を計画する場合、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-install-referrerと接続してください Using @capgo/capacitor-install-referrer for the native capability in Using @capgo/capacitor-install-referrer, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 プラグインの追加または更新の実装詳細について、 Ionic Enterpriseプラグインの代替 Ionic Enterpriseプラグインの代替の製品ワークフローについて