Android发送短信
来源:互联网 发布:java工程师和web前端 编辑:程序博客网 时间:2024/05/29 13:17
原文地址:http://www.zmkm.info/archives/73
Android发送短信有两种方式是:一、调用短信程序;二、直接发送短信。
第一种的代码如下:
Uri uri=Uri.parse(“smsto:5554”); Intent i=newIntent(Intent.ACTION_SENDTO,uri); i.putExtra(“sms_body”,"你好"); startActivity(i);
第二种代码如下:
SmsManager sms=SmsManager.getDefault();PendingIntent pt=PendingIntent.getBroadcast(this,0,newIntent(),0);sms.sendTextMessage(“5554”,null,”你好",pt,null);
第二种方法不会直接向发送箱中写数据,如果需要写数据,需要用以下方法:
ContentValues values=newContentValues(); values.put(“address”,"5554");values.put(“body”,"你好");
- android 中发送短信
- android中发送短信
- android发送短信
- Android 发送短信
- Android自动发送短信
- Android发送短信
- android 发送短信sms
- android 发送短信
- android发送短信
- Android短信发送器
- android 之短信发送
- Android自动发送短信
- android短信发送
- Android发送短信
- android 发送短信问题
- android 短信发送程序
- Android发送短信
- Android短信发送程序
- JDBC调用存储过程
- 在linux系统内里找一个目录
- 在XP系统下按住2个键,你的电脑就会崩溃
- SQL语句技巧
- unix网络编程的基本步骤
- Android发送短信
- GridView选中,编辑,取消,删除
- 在OpenCV中实现透视变换的方法
- PHP负载均衡指南
- JDBC的MYSQL继续学习
- QOS区分模型学习
- 自动麻将桌测试面试记录
- 状态栏添加进度条
- smarty内置函数的使用