You are here Android > 开发者 > 开发讨论 > android调用系统短信Intent时将预填接收号码

机器人


93.089%

disconnected
登录后回复主题 | 跳到回复

android调用系统短信Intent时将预填接收号码

... by 机器人 ... 29 月 9 天前 ... 319 次点击

前段世界在一个应用中调用系统自带的发送短信的Intent,但是接收者的号码一直穿不过去,代码如下:Uri smsToUri = Uri.parse("smsto:123456");
Intent sendIntent = new Intent(Intent.ACTION_VIEW, smsToUri);
sendIntent.putExtra("sms_body", "Hello dear world");
sendIntent.setType("vnd.android-dir/mms-sms");
startActivity(sendIntent); 复制代码然后查到原因是这个Uri格式的无法自动解析出来,需要另外设置下接收者地址,代码如下:sendIntent.putExtra("address", "123456"); 复制代码ok,搞得,备忘!

目前这个主题还没有回复,或许你可以帮楼主加盖一层?

在回复之前你需要先进行登录
电子邮件或昵称
密码
当前热门主题  有谁想学习利用ksoap2连接webService远程接口吗? ... 12 篇回复
© 2009 A Nanshapo Production   -   About
a site powered by Project Babel