i am a new android developer and in my app i want to send an image via email which is placed in Assets folder and the mailer view shows 0 kb size of image attachment but the name of image is properly shown and here is my code is:
try {
Intent picMessageIntent = new Intent(android.content.Intent.ACTION_SEND);
picMessageIntent.setType("image/png");
String str = "image.png"
String imageDirectoryPath = Environment.getExternalStorageDirectory().getAbsolutePath()+"file:///android_asset/Images/" + str;
File downloadedPic = new File(imageDirectoryPath);
picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(downloadedPic));
startActivity(Intent.createChooser(picMessageIntent, "Send your picture using:"));
} catch (Exception e) {
Toast.makeText(MyActivity.this, "No handler", Toast.LENGTH_LONG).show();
}
Pleas give me any suggestion... Thanx in Advance...