0

I'm using FileProvider implementing the logic for sharing internal app zip files, i tested it and works fine with Intent.ACTION_SEND with OneDrive,Google Drive, Gmail, Outlook, Wifi direct and bluetooth.

I tried with viber also but this failed to attach zip file then i used a file browser and tried to share the same file with viber and it succeeded.

I think it's coming from Intent Action but wich one is suitable for sharing files with all possible apps ? And better yet how to display a "save in device" alike from ShareActionProvider ?

Anas
  • 713
  • 1
  • 8
  • 17
  • You might try the technique outlined in [this SO answer](http://stackoverflow.com/a/25020642/115145) to improve Viber compatiblity with `ACTION_SEND` and your `FileProvider`. – CommonsWare Dec 11 '15 at 19:39
  • So i guess i have to implement the hole logic by extending FileProvider or using StreamProvider.i'm new to all these but i will study the code given in the answer, i thought since many apps could share files for whatsapp viber and so on i could do too . – Anas Dec 11 '15 at 19:56
  • "i thought since many apps could share files for whatsapp viber and so on i could do too" -- if they are using a `ContentProvider`, they may be using the same sorts of workarounds as is outlined in that answer. Or, perhaps they are using `file:` `Uri` values, as your file browser app would. FWIW, [this sample app](https://github.com/commonsguy/cw-omnibus/tree/master/ContentProvider/V4FileProvider) demonstrates using `FileProvider` with my `LegacyCompatCursorWrapper`. It is fairly simple to integrate. – CommonsWare Dec 11 '15 at 20:02
  • Just tested , i reproduced the exact code but seems that some apps do not smartly recognize what to do with a file, or just do not expect to receive it !! whatever thank you for the hints – Anas Dec 11 '15 at 22:52

0 Answers0