SDカードからのオーディオファイルとリソース/描画可能フォルダからの画像を添付したい.メールがレシーバーに正常に送信された後、SDカードからオーディオファイルを削除したい.この問題について誰か助けてください.ありがとう前進。
1 に答える
0
オーディオ用にこれを試してください:
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, "xxxxxxxxxxxxxxx@gmail.com" );
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, "XXXXXXXXX@gmail.com" );
sharingIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+filelocation.getAbsolutePath()));
startActivity(Intent.createChooser(sharingIntent, "Send email"));
于 2012-12-06T05:42:40.273 に答える