2011-08-01 44 views
0

邮件中显示图像我需要采取屏幕捕获并共享邮件中捕获的屏幕(捕获的屏幕将显示邮件)。如何在我的Android应用程序中的Android

我没有通过下面的代码屏幕截图:

view = (LinearLayout)findViewById(R.id.screen); 
......... 

View v1 = view.getRootView(); 

System.out.println("Root View : "+v1); 

v1.setDrawingCacheEnabled(true); 

Bitmap bm = v1.getDrawingCache(); 

System.out.println("Bitmap : "+bm); 

iv.setImageBitmap(bm); 

这把屏幕短,显示ImageView的图像。我不知道如何显示邮件中的屏幕截图以及图像的存储位置。请帮帮我。

登录猫:ⅰ得到以下

12月8日至1日:40:40.640:INFO/System.out的(3115):位图:[email protected]

+0

你是什​​么意思..'带邮件捕获屏幕? –

+0

将图像保存到文件并作为附件发送:S? –

+0

如何保存它,我需要显示在消息部分不作为attachment.please帮助我。 –

回答

0
Intent emailIntent = new Intent(Intent.ACTION_SEND); 
Uri U=Uri.parse("file:///sdcard/logo.png"); 
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,"[email protected]"); 
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Test"); 
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "This is email's message"); 
emailIntent.setType("image/png"); 
emailIntent.putExtra(android.content.Intent.EXTRA_STREAM,U); 
startActivity(Intent.createChooser(emailIntent, "Email:")); 
+0

保存图像我从“http://stackoverflow.com/questions/649154/ Android的位图保存到位置”。并尝试过,但图像没有正确存储。和你的代码显示图像作为附件,但我需要在电子邮件正文。请帮帮我。 –

相关问题