0

My flutter app allows users to link their other social media platforms in their profile. When another user views their profile in the app and clicks one of those links, I want the app to show an alert saying “open in app name?” and then use the deeplink to open the app directly instead of launching safari first. An example of this is tiktok where you can go to a profile and click their instagram and it will take you straight to the instagram profile. How can I do this in flutter using the deep links provided by users?

Globe
  • 514
  • 3
  • 17

1 Answers1

1

you can use https://pub.dev/packages/external_app_launcher your code has to be like this

await LaunchApp.openApp(
    androidPackageName: 'net.pulsesecure.pulsesecure',
    iosUrlScheme: 'pulsesecure://',
    appStoreLink: 'itms-apps://itunes.apple.com/us/app/pulse- 
    secure/id945832041',
);
  • This is great for launching the app but is there a way to launch it to a specific screen using deep links? – Globe May 01 '22 at 18:31
  • It is possible with native code (Java / Kotlin). You have to channel in Flutter for it https://stackoverflow.com/questions/3872063/how-to-launch-an-activity-from-another-application-in-android – Amir Mohammad Shams May 01 '22 at 19:09