I am Using this code to Share the Image that is already available in to My SDCard:
Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);
picMessageIntent.setType("image/jpeg");
//File downloadedPic = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),"q.jpeg");
//picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(downloadedPic));
File f = new File(lastPath);
picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(f));
startActivity(picMessageIntent);
//finish();
But, Instead of that i want to use the ImageView Image file that i have set to the Imageview. And Want to Share that file. Then how it is possible to get File from ImageView and send to share with the above code ??
Thanks.
You can use
ACTION_SEND_MULTIPLEand include a list of images an anArrayList<Parcelable>and useputParcelableArrayListExtra()to storeit. Gallery does this and would be a good reference.
(answer snagged from
http://groups.google.com/group/android-developers)