Sam
Sam

Reputation: 841

On sharing image in drawable folder

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?

Upvotes: 1

Views: 1108

Answers (1)

Alex
Alex

Reputation: 688

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

Upvotes: 2

Related Questions