我已經通讀了所有的文件和以前發佈的問題,但我找不到自己的答案。通過編寫下面的代碼,我想發送短信,每當我在附近。意向發送短信
首先,我想檢查一下,如果意圖只創建短信而不發送它?如果沒有,是否有一種方法可以發送近距離警報的短信。 其次,由於某些原因,proximityalert沒有啓動,代碼有問題嗎?
謝謝。
Intent smsintent = new Intent(android.content.Intent.ACTION_VIEW);
smsintent.putExtra("address", "96424127");
smsintent.putExtra("sms_body", "child alert");
smsintent.setType("vnd.android-dir/mms-sms");
PendingIntent pendintent = PendingIntent.getService(this, 0, smsintent, 0);
lm.addProximityAlert(103.8497215, 1.3630663, 1000, 100000000, pendintent);`
對此問題一看http://stackoverflow.com/questions/2372248/launch-sms-application-with-an-intent的http:// stackoverflow.com/questions/5013651/android-send-sms-intent-help http://stackoverflow.com/questions/4967448/send-sms-in-android如果你仍然有問題比去這兩個教程http:///android-er.blogspot.in/2011/03/send-sms-using-intentactionsendto.html http://www.mkyong.com/android/how-to-send-sms-message-in-android/我希望通過這個鏈接之一,你會得到解決方案 – Aamirkhan 2012-07-16 04:38:39