Receive share file intents with Flutter
Solution 1
You can use flutter-share
, all info in Github
You won't have to meddle with java except for changing the MainActivity extends.
It is fully functional for Android, and the iOS part is currently being developed to match the Android part.
Update (2020):
Now you can also use receive_sharing_intent
package. More info in pub.dev
Solution 2
There's a complete & simple example here - it includes everything you need both on the native side, and on the flutter side: https://flutter.io/flutter-for-android/#how-do-i-handle-incoming-intents-from-external-applications-in-flutter
noam aghai
Updated on December 05, 2022Comments
-
noam aghai over 1 year
I searched for a way to make my flutter app receive intents from other apps, but didn't find any.
I want to RECEIVE INTENTS not to send them.
example:
I want to open the Gallery and click on the share button, and choose my flutter app from the menu. and then have my flutter app receive the intent with the picture (and later send it by HTTP request).
Does anyone know how to do it?
-
noam aghai almost 6 yearsThis plugin not working well on android, This has an android exceptions, Please fix it.
-
dsilveira almost 6 yearsHi @noamaghai, thank you very much for your feedback, can I please ask you to file an issue on the github page with the details of your crash, like stack trace, and how did you setup the plugin, and what did you do just before the crash, please, so that I can help you! thanks again.
-
noam aghai almost 6 yearsHi @dsilveira, already did that .... Please watch out about updates on your Github
-
dsilveira almost 6 yearsI didn't get any email notification :O I've read it, and replied, lets continue debugging over there. Thanks
-
Salx over 5 years@dsilveira Any ETA on the ios support? I'm looking for this for my project.
-
dsilveira over 5 yearshey @Salx I'm loking for help on that front, since I haven't had the time lately to work on this plugin, can you, or do you know someone willing to step up and help with it? Otherwise, It'll just have to wait for my spare time to become reasonsble again
-
E.Bradford over 4 yearsDoesn't handle IOS shares.
-
ThorstenC over 3 yearsDoes this work on iOS 14? My attempts never produce a share target on a real device.