A Flutter plugin which helps you to open another app from your app.
/// 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')
From APP-A to APP-B
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>
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>