How to send files to flutter app via sharing?

2,092

Here is the official documentation from Flutter team showing how to handle incoming intents from external applications. Here, it is shown how to handle images and videos not only text.

According to this article, the above-mentioned example has a problem.

However, I found that their piece of code only works, if you share data to an app that is still closed. If you had opened your app before and it idles in the background, it won’t receive the sharing intent when it is resumed. Therefore, I extended the example

So you might want to follow that tutorial as well.

In addition, here is a flutter-share plugin.

Note, please, I have not tested them.

Share:
2,092
Akas Antony
Author by

Akas Antony

Updated on November 29, 2022

Comments

  • Akas Antony
    Akas Antony over 1 year

    I want my flutter application to accept Videos and Images when shared by other apps. For eg. if a user hits the share button for an image from the Gallery, my app should show up in the list and when the user selects my application the app should be able to accept the file. This link explains how to accept text data but not files.