开发者

how to send image in email body via Android application

i have to sent image via my application in mail body. but i am unable to see that image in mail editor. it only shows rectangular box with written "OBJ" inside. thanx.

I am using the following code.

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);                                                                             
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
    "Product:"+ProductComparisonActivity.s_title);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Title:
    "+ProductComparisonActivity.s_title+"\n"+"Description:
    "+ProductComparisonActivity.s_des+"\n"+"\n"+"Max Price:
    "+ProductComparisonActivity.s_max+"\n"+"Min Price:
    "+ProductComparisonActivity.s_min+"\n");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<img src="+"\""+ProductComparisonActivity.image_med+";base64,#IMAGEDATA#"+"\">",imgGetter,null));
// emailIntent.putExtra(Intent.EXTRA_STREAM, ProductComparisonActivity.prod_bm开发者_如何学编程p);
emailIntent.setType("text/html");
startActivity(Intent.createChooser(emailIntent, "Send mail..."));


Sorry, I don't think it is possible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜