我已经通过这个代码做了录音:Android:如何发送语音作为MMS附件?
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
+"test.3gp");
try {
recorder.prepare();
} catch (IOException io) {
Toast.makeText(getApplicationContext(), "Record File", Toast.LENGTH_LONG).show();
}
recorder.start();
,并尝试使用份额的意图像这样分享:
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("video/3gp");
sharingIntent.putExtra(Intent.EXTRA_STREAM, "file:///sdcard/Downloadtest.3gp");
startActivity(Intent.createChooser(sharingIntent, "Share via"));
但是当我的邮箱是设置它通过电子邮件发送,但我想分享它vaia mms?它正在以毫米为单位?怎么做?
@NNirupoma Saha Chaiti接受的答案是你的工作。你必须在htc device.i有htc一个不能附加文件测试。 – Harshid 2013-01-11 11:43:32
我在做类似的事情! http://stackoverflow.com/questions/14452808/sending-and-receiving-mms-in-android – toobsco42 2013-01-22 06:45:34