4
A
回答
9
Intent smsIntent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:5551212;5551212"));
smsIntent.putExtra("sms_body", "sms message goes here");
startActivity(smsIntent);
將電話號碼的分號分隔列表添加到「smsto:」作爲Intent構造函數中的URI。
0
Intent smsIntent = new Intent(Intent.ACTION_SENDTO,Uri.parse("smsto:5551212;5551212"));
smsIntent.putExtra("sms_body", "sms message goes here");
startActivity(smsIntent);
此代碼適用於所有android設備,但它不適用於三星的設備。所以請將昏迷狀態的電話號碼分開列表爲「smsto:作爲意圖中的URI」。 謝謝
5
在SAMSUNG設備中,當其他設備接受';'時,必須用','分隔電話號碼。你的代碼應該是這樣的: -
String separator = "; ";
if(android.os.Build.MANUFACTURER.equalsIgnoreCase("samsung")){
separator = ", ";
}
try {
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.putExtra("address", "55555"+seperator+"66666");
sendIntent.putExtra("sms_body", "Here is My text");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent);
} catch (Exception e) {
Toast.makeText(getApplicationContext(),
"SMS faild, please try again later!",
Toast.LENGTH_LONG).show();
e.printStackTrace();
}
相關問題
- 1. Android發送短信
- 2. android如何發送短信和彩信?
- 3. 短信通過短信管理器發送時沒有到達其他設備
- 4. 用於發送短信的短信不
- 5. 如何防止「短信發送」/ Android上的短信?
- 6. 如何連接oracle apex使用短信網關發送短信?
- 7. 發送短信
- 8. 發送短信
- 9. 發送短信
- 10. 發送短信
- 11. 發送短信
- 12. 短信管理中的Android
- 13. 發短信失敗發短信短信
- 14. 延遲短信發送ANDROID
- 15. 在Android中發送短信
- 16. Android短信發送結果
- 17. 發送短信錯誤Android
- 18. 在Android中發送短信
- 19. Android發送大量短信
- 20. 權限發送短信android
- 21. Android:發送即時短信
- 22. Catch發送短信(Android 2.2)
- 23. 在Android中發送短信,
- 24. 使用GPRS發送短信
- 25. 使用Ruby發送短信
- 26. 使用API發送短信
- 27. 發送短信使用Python
- 28. 短信網關不會發送短信
- 29. 通過PHP發送短信/短信
- 30. 如何發送短信
有什麼方法可以將照片附加到它嗎? – 2012-05-17 13:42:53