我已经通读了所有的文件和以前发布的问题,但我找不到自己的答案。通过编写下面的代码,我想发送短信,每当我在附近。意向发送短信
首先,我想检查一下,如果意图只创建短信而不发送它?如果没有,是否有一种方法可以发送近距离警报的短信。 其次,由于某些原因,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