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. 可以使用短信管理器發送多個短信(羣組短信)?
- 3. 短信管理器發送多個短信
- 4. &符號在短信 - 短信發送android
- 5. 如何從iPad發送短信(短信)
- 6. Android發送短信
- 7. Android發送短信
- 8. android如何發送短信和彩信?
- 9. 短信管理員不斷髮送短信
- 10. 短信通過短信管理器發送時沒有到達其他設備
- 11. 用於發送短信的短信不
- 12. 如何使用PHP發送短信/短信?
- 13. 如何更改發送短信時使用橙色api短信
- 14. 如何連接oracle apex使用短信網關發送短信?
- 15. Android:更新發送短信的方法發送短信
- 16. 如何防止「短信發送」/ Android上的短信?
- 17. 發送短信
- 18. 發送短信
- 19. 發送短信
- 20. 發送短信
- 21. 短信管理中的Android
- 22. 發短信失敗發短信短信
- 23. 如何在短信發送短信發送事件短信應用程序在Android操作系統
- 24. Android:收到短信之後發送短信
- 25. 使用.net發送短信
- 26. 使用VB.NET發送短信
- 27. 使用Sikuli發送短信
- 28. 使用API發送短信
- 29. 使用Java發送短信
- 30. 使用Ruby發送短信
有什麼方法可以將照片附加到它嗎? – 2012-05-17 13:42:53