Description
This is the feature where from some other app on the device, when you say to "share" something, you get a system-provided bit of UI that lets you choose from various apps you can share the thing to. We should make Zulip one of the options there. (In the RN app, we've done this for Android but not iOS: zulip/zulip-mobile#3277)
From some surveying of the options (below), it looks like the way to do this will be to use Flutter's generic infrastructure for talking to platform APIs, rather than try to use an existing plugin for it.
In doing so, we might find there’s a reason this can’t be done real cleanly as a plugin. Or maybe we’ll make a better plugin.
Starting points for taking this on:
- Flutter docs for Android at “How do I handle incoming intents from external applications in Flutter?”, showing an example of exactly this.
- See also this Medium post that refreshingly isn’t just walking through a library’s setup instructions; it goes through building this functionality more directly.
- iOS docs: share extensions, and for messaging apps adding conversation suggestions.
- Also the existing libraries mentioned below are not a ton of code — like <1 kLoC each. So they may be useful as examples.
Subtasks:
Survey of existing packages for sharing to a Flutter app
(These are from notes I took 2023-02-01.)
There don't appear to be any existing packages for this problem that are real popular or well maintained.
- The most popular is
[receive_sharing_intent](https://pub.dev/packages/receive_sharing_intent)
. From the issue tracker, it seems not actively maintained. - There’s
[receive_multi_sharing_intent](https://pub.dev/packages/receive_multi_sharing_intent)
which is a fork of that one, unmaintained. - There’s
[share_handler](https://pub.dev/packages/share_handler)
which is maintained. - Another observation on all of the above: they call for quite a bit of changes to the project’s own files to fully wire them in.
- Newer and Android-only:
[receive_intent](https://pub.dev/packages/receive_intent)
.
Metadata
Metadata
Assignees
Type
Projects
Status