2012-03-14 73 views
0

嗨,我想發送使用android消息應用程序的MMS,我想知道是否有任何方法,儘快用戶單擊發送按鈕,然後我應該得到一個回調(意味着任何監聽器),這樣我可以返回到我的活動,怎麼知道彩信是否被髮送或不這是我用來發送彩信android發送mms和接收回調

Intent sendIntent = new Intent(Intent.ACTION_SEND); 

     sendIntent.putExtra("address", "895877"); 
    sendIntent.putExtra(Intent.EXTRA_SUBJECT, "subject"); 

    Uri.parse("mms://"); 
    Uri uri = Uri.fromFile(new File(Environment.getExternalStorageDirectory(), "er.png")); 


    sendIntent.putExtra("sms_body", "some text"); 
    sendIntent.putExtra(Intent.EXTRA_STREAM, uri); 
    sendIntent.setType("image/png"); 
    startActivityForResult(sendIntent,requestCode); 

任何建議將是一個很大的幫助

+0

參見此鏈接:[http://stackoverflow.com/questions/9695773/how-to-make-sure-sms-is-sent-in-android/9695802#9695802][1] [1 ]:http://stackoverflow.com/questions/9695773/how-to-make-sure-sms-is-sent-in-android/9695802#9695802 – 2012-03-14 04:26:06

+0

我在做類似的事情! http://stackoverflow.com/questions/14452808/sending-and-receiving-mms-in-android – toobsco42 2013-01-22 07:25:57

回答

0

試試這個鏈接的代碼:

Detecting MMS messages on Android

另請注意,mms現在不是標準SDK/API的一部分,因此您可能必須做一些修補才能使其發揮作用。