Skip to content

Conversation

@asaintsever
Copy link

This pull request adds support for receiving shared URLs from other Android apps and improves integration between the Android and Flutter layers. The most significant changes include registering a new Android activity to handle share intents, setting up a Flutter method channel for communication, and initializing a service to process incoming shared URLs in the Flutter app.

Android platform integration:

  • Added a new activity, ShareReceiverActivity, to the Android manifest to handle incoming SEND intents with text/plain MIME type, enabling the app to appear as a share target for URLs from other apps.
  • Updated MainActivity.kt to set up a Flutter method channel (com.veille.mobile_share/share) for communication between Android and Flutter, handle method calls from Flutter (such as showing toasts and closing the activity), and process custom intents for shared URLs by sending them to Flutter.

Flutter app integration:

  • Imported the new ShareReceiverService in main.dart to handle received URLs on the Flutter side.
  • Modified the app initialization in main.dart to instantiate ShareReceiverService after BLoC providers are available, ensuring the service can dispatch shared URLs to the appropriate BLoC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant