Share an image from drawable folder in android


Hi All, Today in android programming we are going to learn how to share an image which is placed inside the drawable folder to otherApps like Gmail or Whatsapp, In this method in which i am showing there is no need of special permissions, usually this is done by first writing a copy of the image to external memory and then sharing, instead i used a better approach. For this we want to implement FileProvider for supporting Android versions above Nougat.You can get enough tutorials on how to implement FileProvider on web from here
After implementing file provider as shown in above link we can use the below code using FileProvider class to easily share images from drawable folder. kudos developers:)
Share on Google Plus

About Admin

I am a Java and Android developer and a science enthusiast.I Like to explain complex things in simple language so anybody even without a graduation in computer science or Electronics can understand the concepts easily.

0 comments:

Post a Comment