On sharing image in drawable folder

Sam

Sorry for repeated question. I searched a lot on the Internet, got a lot of links too. But none of it worked correctly.

I've an Image in a drawable folder. Wanted to share t via apps like Gmail, Messaging etc. How's it possible? I used the following code:

shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + getPackageName() + "/" + R.drawable.myImage));

But this stop the "com.android.mms" what to do?

Also, is any permission required to be added? Or am I missing out anything? Does this sharing work on Android 2.2, cause I'm testing on it?

Alex

you have to store your image to the internal/external storage first, then you can be able to share it by using Gmail, ....

More info in comments

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Sharing a png image in drawable folder in SKD > 24

Name of image in drawable folder red

Nativescript Vue on android not updating image in drawable folder

How to create a drawable from an image in assets folder?

Where is the image folder for drawable in the Android Studio?

How to add an image to the "drawable" folder in Android Studio?

Can't access the image under drawable folder in AS

Set background image not from drawable folder

kotlin - get image from image array in drawable folder

How correctly retrieve an image into the res/drawable/ folder of an Android project?

How do I find the filepath to an image in the drawable folder as a string?

Android ffmpeg : Use image for Watermark from drawable or assets folder

unexpected behavior while loading the image from res/drawable folder

To copy an image from an sdcard into res/drawable folder of the Android app

How to load GIF image from drawable folder into ImageView using glide?

add image in another folder instead of drawable in xamarin cross-platforms

How to display image located in drawable folder in full screen in viewpager app?

Android:Image not found inside drawable folder Exception handling

Share drawable image to other apps properly (sharing PNG to Whatsapp fails without FileProvider)

How to get path from image on drawable folder and set as image view, Bitmap?

How to save image path/image to database where i have my images in my drawable folder?

Android accessing drawable folder

Fliping Drawable Image in Vector Drawable

Resource drawable not found but they exist in drawable folder

Why can't i put my background image in drawable v24 folder?

Download image from URL and save it in my app's drawable-hdpi folder

How do I add an image in the drawable folder to an ImageView in Android Studio 1.2?

Common image added in drawable folder doesn't get displayed in Samsung device - Android

How do you add a trimmed circular button image to your android drawable folder?