@capgo/capacitor-android-inline-install

中文文档
8.0.19发布于 2026/10/15MPL-2.0TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 4.2万

Capacitor plugin to trigger Android inline install feature.

原始使用文档
文档目录13 节
  1. ➡️ Get started for free
  2. Key features
  3. Why Android Inline Install?
  4. Documentation
  5. Compatibility
  6. Install
  7. Usage
  8. Behavior
  9. Supported platforms
  10. API
  11. startInlineInstall(...)
  12. getPluginVersion()
  13. Interfaces

@capgo/capacitor-android-inline-install

Open the Google Play inline install overlay from your Capacitor app so users can install another app without leaving yours. Useful for cross-promotion in apps that qualify for Premium Growth Tools.

Capgo - Build Capacitor apps with AI, ship updates instantly

Capgo: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.

➡️ Get started for free

14-day unlimited free trial. No credit card required

🤖 Building with an AI coding agent? Install Capgo skills so Claude Code, Codex, Cursor, Copilot, or Gemini CLI know how to install and use @capgo/capacitor-android-inline-install in your Capacitor app: npx skills add Cap-go/capgo-skills. Then ask your agent: "Add @capgo/capacitor-android-inline-install to my Capacitor app and wire it up." Agent setup guides · Hosted MCP

@capgo/capacitor-android-inline-install for Capacitor apps

Key features

  • Inline install: startInlineInstall() opens the Google Play install overlay for a package.
  • Stay in app: users install without leaving your app.
  • Fallback: with fallback on (the default), the plugin opens the full Play Store page when the overlay is unavailable. The call rejects if neither can start.
  • Tiny API: one install method, no extra SDK dependency.
  • Platforms: Android. Android only, and only for apps that Google enabled for inline install.

Trigger the Google Play Inline Install overlay from a Capacitor app.

[!NOTE] Inline Install is only available to certain apps that qualify for Premium Growth Tools. See eligibility and program details here: https://play.google.com/console/about/guides/premium-growth-tools/

[!CAUTION] When using an app id that is published on the Play Store, but might not necessarily be eligible for Premium Growth Tools, the fallback will be used. (No overlay will be shown.)

Why Android Inline Install?

The only plugin supporting Google Play's Inline Install API - no other Capacitor plugin implements this:

  • In-app installations - Install apps without leaving your app
  • Premium Growth Tool - Access to Google's exclusive promotion features
  • Seamless UX - Overlay install experience keeps users engaged
  • Fallback handling - Automatically falls back to Play Store if overlay unavailable
  • Cross-promotion - Perfect for app families and ecosystem growth

Essential for apps eligible for Google Play Premium Growth Tools and app ecosystem builders.

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/android-inline-install/

Compatibility

Plugin versionCapacitor compatibilityMaintained
v8.*.*v8.*.*✅
v7.*.*v7.*.*On demand
v6.*.*v6.*.*❌
v5.*.*v5.*.*❌

Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.

Install

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-android-inline-install` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

npm install @capgo/capacitor-android-inline-install
npx cap sync

Usage

import { AndroidInlineInstall } from '@capgo/capacitor-android-inline-install';

// Start inline install for a target app by package name
await AndroidInlineInstall.startInlineInstall({
  id: 'com.example.targetapp',
  referrer: 'campaign=my-campaign', // optional but recommended
  // callerId defaults to your app's package name
  // csl_id: 'your-custom-store-listing-id',
  overlay: true,   // default true
  fallback: true,  // default true: open full Play Store page if overlay unavailable
});

Behavior

  • The plugin attempts to open the Google Play overlay via an intent that targets com.android.vending with a deep link of the form https://play.google.com/d?id=…&referrer=…&listing=… and extras overlay and callerId.
  • If the overlay is not available on the device or for your app, and fallback is true, it opens the full Play Store details page for the target app as a deep link.
  • The promise resolves with { started: true, fallbackUsed: boolean } when an intent is started.
  • The promise rejects with a descriptive error if neither the overlay nor the fallback can be started, or if required parameters are missing.

Supported platforms

  • Android: Supported, subject to Google Play eligibility and device support.
  • iOS/Web: Not supported; the method rejects with an informative error.

API

Android Inline Install Plugin for triggering Google Play in-app install flows.

startInlineInstall(...)

startInlineInstall(options: StartInlineInstallOptions) => Promise<StartInlineInstallResult>

Start an inline install flow using the Google Play overlay.

Note: Only eligible apps can use Inline Install. See: https://play.google.com/console/about/guides/premium-growth-tools/

ParamTypeDescription
optionsStartInlineInstallOptions- Configuration for the inline install

Returns: Promise<StartInlineInstallResult>

Since: 1.0.0


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


Interfaces

StartInlineInstallResult

Result of starting an inline install flow.

PropTypeDescription
startedbooleanTrue when the inline install intent has been started.
fallbackUsedbooleanTrue if a fallback deep link was used instead of inline overlay.

StartInlineInstallOptions

Options for starting an inline install flow.

PropTypeDescription
idstringPackage name of the app to be installed (target app).
referrerstringReferrer string to pass to Play. Optional but recommended.
callerIdstringPackage name of your app (caller). Defaults to the current app package if omitted.
csl_idstringOptional Custom Store Listing ID.
overlaybooleanWhether to request the Play overlay. Defaults to true.
fallbackbooleanIf true, falls back to full Play Store deep link when overlay unavailable. Defaults to true.

版本与发布记录

@capgo/capacitor-android-inline-install 共发布 38 个版本,首次发布于 2025/09/12;过去 12 个月发布了 24 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
8.0.19latest2026/10/1525 天前
8.0.182026/10/1327 天前
8.0.172026/10/091 个月前
8.0.162026/10/081 个月前
8.0.152026/09/161 个月前
8.0.142026/09/151 个月前

其他发布通道:lts-v7 → 7.6.0。

关于 @capgo/capacitor-android-inline-install 的常见问题

@capgo/capacitor-android-inline-install 是什么?

Capacitor plugin to trigger Android inline install feature.

如何安装 @capgo/capacitor-android-inline-install?

在项目目录运行 npm install @capgo/capacitor-android-inline-install,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@capacitor/core(>=8.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@capgo/capacitor-android-inline-install 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@capgo/capacitor-android-inline-install 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@capgo/capacitor-android-inline-install 可以商用吗?

@capgo/capacitor-android-inline-install 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@capgo/capacitor-android-inline-install 的下载量有多少?

根据 npm 官方下载统计,@capgo/capacitor-android-inline-install 在 2026/10/09 – 2026/11/07 这 30 天内被下载 41,522 次,日均约 1,384 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@capgo/capacitor-android-inline-install 还在维护吗?

最新版本 8.0.19 发布于 2026/10/15(25 天前);至今共发布 38 个版本,其中过去 12 个月发布了 24 个;首次发布于 2025/09/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。