fix(Android app): sharing not enabled #4
+87
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
ShareReceiverActivity, to the Android manifest to handle incomingSENDintents withtext/plainMIME type, enabling the app to appear as a share target for URLs from other apps.MainActivity.ktto 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:
ShareReceiverServiceinmain.dartto handle received URLs on the Flutter side.main.dartto instantiateShareReceiverServiceafter BLoC providers are available, ensuring the service can dispatch shared URLs to the appropriate BLoC.