Skip to content

CustedNG/external_app_launcher

Repository files navigation

ExternalAppLauncher2

A Flutter plugin which helps you to open another app from your app.

Code Illustration

/// It returns bool. 
/// [true] if the app is opened successfully.
/// [false] if the app is not installed or open failed.
await ExternalAppLauncher2.openApp('urlscheme://path')

Platform specific config

From APP-A to APP-B

Android

APP-A AndroidManifest.xml

<manifest>
    .....
    <queries>
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="APP-B-Scheme" />
        </intent>
    </queries>
    .....
</manifest>

APP-B AndroidManifest.xml

<manifest>
    .....
    <application>
            <intent-filter>
                <!--must haves-->
                <action android:name="android.intent.action.VIEW"/>
                <!--add this line if you want to open app via web-->
                <category android:name="android.intent.category.BROWSABLE"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <!--protocol-->
                <data android:scheme="APP-B-Scheme"
                    android:host="PATH"/>
            </intent-filter>
        </activity>
    </application>
    .....
</manifest>

iOS

In iOS, for opening an external app from your app, you need to provide URLscheme of the target app.

To know more about URLScheme refer to this Link

If your deployment target is greater than or equal to 9, then you also need to update APP-A information in Info.plist.

    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>APP-B-Scheme</string>
    </array>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published