Getting Started
Installation
Section titled “Installation”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 syncUsage Example
Section titled “Usage Example”import { AndroidInlineInstall } from '@capgo/capacitor-android-inline-install';
// Basic inline installawait AndroidInlineInstall.startInlineInstall({ id: 'com.example.targetapp'});
// Advanced install with trackingawait AndroidInlineInstall.startInlineInstall({ id: 'com.example.targetapp', referrer: 'campaign=my-campaign&source=app', overlay: true, fallback: true});
// Handle the installation flowtry { 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);}Core API Methods
Section titled “Core API Methods”Installation Management
Section titled “Installation Management”startInlineInstall(options)- Trigger Google Play inline install overlay for specified app
Configuration Options
Section titled “Configuration Options”interface InlineInstallOptions { id: string; // Target app package name (required) referrer?: string; // Tracking campaign string (optional) callerId?: string; // Caller app package name (defaults to current app) overlay?: boolean; // Enable/disable Play overlay (default: true) fallback?: boolean; // Use full store page if overlay fails (default: true)}Google Play Requirements
Section titled “Google Play Requirements”Premium Growth Tools Eligibility
Section titled “Premium Growth Tools Eligibility”Your app must qualify for Google Play’s Premium Growth Tools to use inline install:
- Apps with significant user engagement
- Good Play Store ratings and reviews
- Compliance with Google Play policies
Target App Requirements
Section titled “Target App Requirements”- Target app must be available on Google Play Store
- Target app must support inline installation
- User must be signed into Google Play Store
Behavior and Fallbacks
Section titled “Behavior and Fallbacks”Overlay Mode (default)
Section titled “Overlay Mode (default)”- Attempts to open Google Play overlay within your app
- If overlay is unavailable, falls back to full Play Store page
- If Play Store is not available, shows error
Full Store Mode
Section titled “Full Store Mode”- Directly opens the full Google Play Store page
- Bypasses overlay attempt entirely
Platform Support
Section titled “Platform Support”- Android: Full support with Google Play Services
- iOS: Not supported (Android-specific feature)
- Web: Not supported (native Android feature)
Implementation Details
Section titled “Implementation Details”The plugin uses Android intents to communicate with Google Play Store:
- Intent action for inline install overlay
- Fallback to standard Play Store intent
- Automatic handling of Play Services availability
Use Cases
Section titled “Use Cases”- App discovery: Promote related apps within your ecosystem
- Cross-promotion: Drive installs for partner applications
- Feature unlocking: Install additional modules or extensions
- Companion apps: Install supporting applications seamlessly
Best Practices
Section titled “Best Practices”- Always provide fallback options for users without Play Services
- Test with different device configurations and Play Store versions
- Use referrer tracking to measure conversion rates
- Handle installation errors gracefully
- Respect user choice if they decline installation
Limitations
Section titled “Limitations”- Android-only functionality
- Requires Google Play Services
- Only works with apps qualifying for Premium Growth Tools
- Subject to Google Play Store policies and availability