Share Photos & Files Using FileProvider

preview_player
Показать описание
This tutorial will show you how to share data (texts, photos, files, etc.) with other apps that are capable of receiving it. We will be using FileProvider to share them.

Рекомендации по теме
Комментарии
Автор

After couple of requests, I have made another similar tutorial, but with audios (mp3) incase anyone is interested.

androidtutorials
Автор

Finally somebody is explaining this clearly. Thanks for that!

khchin
Автор

Thanks so much man, you saved my life. Your tutorial is very good, objective and simple.

artcodezen
Автор

Just want to say, thank you so much bro!

zeta
Автор

Thank you very much, for couple of days i am stuck in this matter.

engosm
Автор

realy u save my ass got a new suscriber, u are the only one that explains how fileprovider works on a easy way u cant imagine how greatfull i am after ours of app crashing bless u !

LucasMasciotra
Автор

ty dude its the only updated tutorial about this

LucasMasciotra
Автор

I'm strugling quite a bit in the oposite end, on how to handle/request the shared data (my app will be the receiver of the shared content, in my case is a CSV file, I'm able to get a "content://" path but not the actual shared file)...
It's been quite hard to find resources in this matter, anyone has a good tutorial/how does it work/code example or any other kind of information that could help me to understand and implement? thanks!

i-nozex
Автор

FileProvider is jut a ridiculous way to solve a problema that does not exist. Now just a simple file share that should take 5 lines of code requires to create 5 files

CanalRenaultClio
Автор

The font is too small for me to watch this on mobile.thanks for doing this but can you adjust the font size

chandanaphere
Автор

How can we do it for audios (mp3) ? (Saving sd card codes)

huseyintunc
Автор

Subscribed.. I just wanna ask is this the same as shareit function? if it does. well this is awesome!

zaptor
Автор

How to implement it for those photo that are coming in the recyclerview from the net that are not stored in the drawable.Please make a video of it or code for it

ramvilashkumar
Автор

Hi there I'm using a file provider for take a picture from the camera an save it in the internal storage and everything works fine but when I make a little change to the code for save it the image in the private files of my app the image not is saved, I getting private files with getFilesDir(), one thing more that only happen in android KitKat because un higer version I can save the image in the last directory and everything works fine, do you have some idea about that wat happen?

DjangoMx
Автор

it's show "the file format is not supported" on sharing with whatsapp and show "unable to attach file" on gmail

abhijeetsingh
Автор

And if I want to open an excel file?
Somebody could please tell me what can I do? I am almost two days trying that

CeorNormal
Автор

Thanks for the video, very helpful. But how do I share a picture from an ImageView ?

juniorlanga
Автор

And in this showing - file format not supported.
I am trying to share the clicked image.
Kindly help.

RealMeenakshiDangi
Автор

While sending an audio. It just stuck on "still pending" status.
What would I need to share an audio file that's already been save on External storage?

ebpvgeb
Автор

Sir, how to take image from the camera and crop it FOR ANDROID 7.1.2?
I am using FileProvider already but there is IllegalArgumentException error.
Guessed something to do with uri.
Thanks in advance!

khchin