[自由讨论] 请问一下android怎么调用短消息发送

fourfire 2007-11-30
尝试做个小例子
fourfire 2007-11-30
像这样吗?
private void sendMessage()
{
Handler handler=new Handler();
Message msg=new Message();
HashMap data=new HashMap();
data.put("1", "hello");
msg.setData(data);
msg.obj="133333333";
handler.sendMessage(msg);

}
lordhong 2007-12-03
我具体还没试过。。。
larryzou 2008-04-16
fourfire 写道
像这样吗?
private void sendMessage()
{
Handler handler=new Handler();
Message msg=new Message();
HashMap data=new HashMap();
data.put("1", "hello");
msg.setData(data);
msg.obj="133333333";
handler.sendMessage(msg);

}

no..
你可以看看是不是system service,如 gps
yzhong_sa 2009-03-23
你是说发sms是吗?
fourfire 2009-03-23
当然是啊。会吗
lordhong 2009-03-29
AndroidManifest.xml里加:
<uses-permission android:name="android.permission.SEND_SMS" />

final SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage("电话号码", null, "具体SMS内容", null, null);
yzhong_sa 2009-04-02
lordhong 写道
AndroidManifest.xml里加:
<uses-permission android:name="android.permission.SEND_SMS" />

final SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage("电话号码", null, "具体SMS内容", null, null);



真是高手。。即学即卖了。。
Global site tag (gtag.js) - Google Analytics