DEV Community

Yash Patel
Yash Patel

Posted on

Flutter’s Secret Handshake with External Apps 🤝

Sometimes the best feature in your app is not rebuilding something that already exists.

In one of my recent Flutter projects, I needed to collect structured field data. There was already a specialized third-party app that did this perfectly. Instead of recreating everything, I decided to let my Flutter app communicate with that external app.

The goal was simple:

  1. Launch the external app from Flutter
  2. Let the user complete their task there
  3. Receive the result back in my Flutter app
  4. Parse and store the returned data

But implementing this required handling two completely different platform approaches:

iOS

  • Uses URL Schemes
  • External app opens via a custom URL
  • Data returns through a callback URL

Android

  • Uses Intents
  • External app launched via explicit intent
  • Data returns via a BroadcastReceiver

To keep the Flutter side clean, I wrapped everything behind a small Dart service using MethodChannel, so the rest of the app only needs to call:

await ExternalAppLauncher.instance.launch(
  jobId: job.id,
  command: 'new',
);
Enter fullscreen mode Exit fullscreen mode

Under the hood, this:

  • Opens the external app
  • Waits while the user works there
  • Receives XML data back
  • Parses and stores it locally

The result is a clean app-to-app handshake between Flutter, iOS, and Android.

If you're building apps that need to integrate with other mobile apps, this approach can save a lot of time and complexity.

👉 Full breakdown with architecture diagrams, platform code, and pitfalls: Flutter’s Secret Handshake with External Apps 🤝

Top comments (0)