'In Flutter on Android: how to save non-image file so the user can instantly see it in other apps?
How can I save a file (txt/pdf/doc etc.) in my Flutter app on Android device in such a way that it will be accessible or "visible to the user" from any other app like an email client?
The desired behavior is very simple:
- My app saves a file - in its own folder provided by path_provider or any other place.
- User opens any other app that can read files on device, say an email client.
- User can instantly see the file that my app previously saved when open the typical 'Attach file' dialog or w/e.
Sounds pretty basic, but so far I could not achieve this result. I save files just fine and I tried different folders (hello path_provider), but it seems that it doesn't matter where my app saves the files - they just don't show up in other apps. Files are not images, just documents. Beyond that, the files that my app saves this way are obviously accessible via browsing through the standard "Files" app on device and via other means like connecting to a PC.
Is there a way to "flag" them for the system to show? I don't see any documentation mentioning this problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
