はじめに
Copy a setup prompt with the install steps and the full markdown guide for this plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-android-inline-install`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/ja/docs/plugins/android-inline-install/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
Section titled “インストール”npm install @capgo/capacitor-android-inline-installnpx cap syncyarn add @capgo/capacitor-android-inline-installnpx cap syncpnpm add @capgo/capacitor-android-inline-installnpx cap syncbun add @capgo/capacitor-android-inline-installnpx cap syncimport { AndroidInlineInstall } from '@capgo/capacitor-android-inline-install';
// 基本的なインラインインストールawait AndroidInlineInstall.startInlineInstall({ id: 'com.example.targetapp'});
// 追跡機能付きの高度なインストールawait AndroidInlineInstall.startInlineInstall({ id: 'com.example.targetapp', referrer: 'campaign=my-campaign&source=app', overlay: true, fallback: true});
// インストールフローを処理try { await AndroidInlineInstall.startInlineInstall({ id: 'com.spotify.music', referrer: 'utm_source=myapp&utm_campaign=music_promotion' }); console.log('Install overlay triggered successfully');} catch (error) { console.error('Install failed:', error);}コアAPIメソッド
Section titled “コアAPIメソッド”インストール管理
Section titled “インストール管理”startInlineInstall(options)- 指定されたアプリのGoogle Playインラインインストールオーバーレイをトリガー
設定オプション
Section titled “設定オプション”interface InlineInstallOptions { id: string; // ターゲットアプリのパッケージ名(必須) referrer?: string; // 追跡キャンペーン文字列(オプション) callerId?: string; // 呼び出し元アプリのパッケージ名(デフォルトは現在のアプリ) overlay?: boolean; // Playオーバーレイを有効/無効(デフォルト: true) fallback?: boolean; // オーバーレイが失敗した場合にフルストアページを使用(デフォルト: true)}Google Playの要件
Section titled “Google Playの要件”Premium Growth Toolsの適格性
Section titled “Premium Growth Toolsの適格性”インラインインストールを使用するには、アプリがGoogle PlayのPremium Growth Toolsの対象である必要があります:
- 重要なユーザーエンゲージメントを持つアプリ
- 良好なPlay Storeの評価とレビュー
- Google Playポリシーへの準拠
ターゲットアプリの要件
Section titled “ターゲットアプリの要件”- ターゲットアプリがGoogle Play Storeで利用可能である必要があります
- ターゲットアプリがインラインインストールをサポートしている必要があります
- ユーザーがGoogle Play Storeにサインインしている必要があります
動作とフォールバック
Section titled “動作とフォールバック”オーバーレイモード(デフォルト)
Section titled “オーバーレイモード(デフォルト)”- アプリ内でGoogle Playオーバーレイを開くことを試みます
- オーバーレイが利用できない場合、フルPlay Storeページにフォールバック
- Play Storeが利用できない場合、エラーを表示
フルストアモード
Section titled “フルストアモード”- フルGoogle Play Storeページを直接開きます
- オーバーレイの試行を完全にバイパス
プラットフォームサポート
Section titled “プラットフォームサポート”- Android: Google Play Servicesで完全サポート
- iOS: サポート対象外(Android固有の機能)
- Web: サポート対象外(ネイティブAndroid機能)
このプラグインはAndroidインテントを使用してGoogle Play Storeと通信します:
- インラインインストールオーバーレイ用のインテントアクション
- 標準Play Storeインテントへのフォールバック
- Play Servicesの可用性の自動処理
ユースケース
Section titled “ユースケース”- アプリ発見: エコシステム内の関連アプリを宣伝
- クロスプロモーション: パートナーアプリケーションのインストールを促進
- 機能のロック解除: 追加モジュールや拡張機能をインストール
- コンパニオンアプリ: サポートアプリケーションをシームレスにインストール
ベストプラクティス
Section titled “ベストプラクティス”- Play Servicesを持たないユーザーのために常にフォールバックオプションを提供
- 異なるデバイス構成とPlay Storeバージョンでテスト
- リファラー追跡を使用してコンバージョン率を測定
- インストールエラーを適切に処理
- ユーザーがインストールを拒否した場合は選択を尊重
- Android専用機能
- Google Play Servicesが必要
- Premium Growth Toolsの対象となるアプリでのみ動作
- Google Play Storeのポリシーと可用性に従う