Android에서 새로운 기능입니다. m4a 형식 (또는 AMR, 3GP와 같은 기타)으로 오디오 파일이있는 MMS를 보내려고합니다. 이렇게하려면 의도를 사용하지만 결코 내 MMS를 보내지 않습니다. 다음은 내가 사용중인 코드입니다 :인 텐트를 사용하여 오디오를 전송하는 MMS
Intent share = new Intent(Intent.ACTION_SEND);
share.setType("audio/m4a");
share.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + new Environment.getExternalStorageDirectory().getPath()+"/recordaudio.m4a")));
startActivity(share);
그리고 내 오디오 파일이 30kb를 넘지 않습니다. 제발 도와 주실 수 있습니까? 나는 프랑스어
File audiofile = new File(directory,"/recordaudio.m4a");
byte fileContent[] = new byte[(int) audiofile.length()];
InputStream input = new FileInputStream(audiofile);
int data = input.read();
while(data != -1) {
data = input.read(fileContent);
}
input.close();
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_PHONE_NUMBER, mPhoneNumber);
sendIntent.setType("audio/*");
sendIntent.putExtra(Intent.EXTRA_STREAM, fileContent);
startActivity(sendIntent);*
해요 모든
먼저, 당신의 도움을 주셔서 대단히 감사합니다 영어에 대한 죄송합니다 !!!! 이 코드를 시도하고 mms가 전송되지 않습니다 ... 다시 도와 주시겠습니까 ??
이것은 도움이 될 수도 있습니다 : http://stackoverflow.com/a/1914522/265167 –
나는 비슷한 것을하고 있습니다 !!! http://stackoverflow.com/questions/14452808/sending-and-receiving-mms-in-android – toobsco42