@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/
Install
npm install @capgo/capacitor-android-inline-install
npx cap sync
Usage
import { AndroidInlineInstall } from '@capgo/capacitor-android-inline-install';
await AndroidInlineInstall.startInlineInstall({
id: 'com.example.targetapp',
referrer: 'campaign=my-campaign',
overlay: true,
fallback: true,
});
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
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/
Returns: Promise<StartInlineInstallResult>
Interfaces
StartInlineInstallResult
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
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. |