-1
可能重複:
How to attach audio file from SD card to E-Mail in Android?如何將音頻文件和圖像附加到電子郵件?
我要附加上從SD卡來了音頻文件和圖像從資源產品/繪製folder.And我想刪除的音頻文件SD卡郵件發送成功後,Receiver.Please有人幫我我這個問題。感謝提前。
可能重複:
How to attach audio file from SD card to E-Mail in Android?如何將音頻文件和圖像附加到電子郵件?
我要附加上從SD卡來了音頻文件和圖像從資源產品/繪製folder.And我想刪除的音頻文件SD卡郵件發送成功後,Receiver.Please有人幫我我這個問題。感謝提前。
試試這個音頻:
private File file;
file = new File("audio file name/ path");
File filelocation = file ;
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("audio/mp4");
sharingIntent.putExtra(Intent.EXTRA_EMAIL, "[email protected]");
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+filelocation.getAbsolutePath()));
startActivity(Intent.createChooser(sharingIntent, "Send email"));
嘗試一下本作的圖像:
private File file;
file = new File("your image path");
File filelocation = file ;
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/jpeg");
sharingIntent.putExtra(Intent.EXTRA_EMAIL, "[email protected]");
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+filelocation.getAbsolutePath()));
startActivity(Intent.createChooser(sharingIntent, "Send email"));
但如何既從圖像繪製和音頻文件以電子郵件附? – Biginner
你必須添加圖像和音頻文件在同一封郵件中可繪製? –
如何將音頻文件從資產文件夾附加到電子郵件? – Biginner