首页 > 其他 > 详细

短信发送器

时间:2014-12-08 02:00:57      阅读:259      评论:0      收藏:0      [点我收藏+]

注意:短信管理器的获取,长短信的拆分

        //点击发送按钮后发送用户输入的内容
        //1、获取用户输入的内容
        EditText et_phone = (EditText) findViewById(R.id.et_phone);
        EditText et_content = (EditText) findViewById(R.id.et_content);
        String phone = et_phone.getText().toString();
        String ms = et_content.getText().toString();
        //拿到发送短信的api
        SmsManager sm = SmsManager.getDefault();
        ArrayList<String> mss = sm.divideMessage(ms);
        for(String msg : mss){
            sm.sendTextMessage(phone, null, msg, null, null);
        }

 

短信发送器

原文:http://www.cnblogs.com/wanghongwei/p/4150235.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!