@capgo/capacitor-android-inline-install
v8.0.1
Published
Capacitor plugin to trigger Android inline install feature.
Maintainers
Readme
@capgo/capacitor-android-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/
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/
Install
npm install @capgo/capacitor-android-inline-install
npx cap syncUsage
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.vendingwith a deep link of the formhttps://play.google.com/d?id=…&referrer=…&listing=…and extrasoverlayandcallerId. - If the overlay is not available on the device or for your app, and
fallbackis 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/
| Param | Type | Description |
| ------------- | ------------------------------------------------------------------------------- | -------------------------------------- |
| options | StartInlineInstallOptions | - 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.
| Prop | Type | Description |
| ------------------ | -------------------- | ---------------------------------------------------------------- |
| started | boolean | True when the inline install intent has been started. |
| fallbackUsed | boolean | True if a fallback deep link was used instead of inline overlay. |
StartInlineInstallOptions
Options for starting an inline install flow.
| Prop | Type | Description |
| -------------- | -------------------- | -------------------------------------------------------------------------------------------- |
| id | string | Package name of the app to be installed (target app). |
| referrer | string | Referrer string to pass to Play. Optional but recommended. |
| callerId | string | Package name of your app (caller). Defaults to the current app package if omitted. |
| csl_id | string | Optional Custom Store Listing ID. |
| overlay | boolean | Whether to request the Play overlay. Defaults to true. |
| fallback | boolean | If true, falls back to full Play Store deep link when overlay unavailable. Defaults to true. |
