PendingIntent sentIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(SENT_SMS_ACTION), 0); manager.sendTextMessage(num, null, content, sentIntent, null);//判断是否发送成功

        <receiver android:name=".AutoSendMessageBroadcastReceiver">            <intent-filter android:priority="1000">                <action android:name="android.intent.action.SENT_SMS_ACTION"/>                           </intent-filter>        </receiver>

public class AutoSendMessageBroadcastReceiver extends BroadcastReceiver {@Overridepublic void onReceive(Context context, Intent intent) {// TODO Auto-generated method stubswitch (getResultCode()) { case -1: Toast.makeText(context, "短信发送成功", Toast.LENGTH_SHORT).show(); break; case 0:Toast.makeText(context, "发送失败", Toast.LENGTH_LONG).show(); break;default: break; } }}


   

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android软键盘之代码改变软键盘状态
  2. 【Android】让你的对话框炫起来!漂亮动画
  3. Android(安卓)UI开发第十五篇――分享一
  4. android webview 文字复制
  5. android扇形菜单
  6. android添加联系人(直接添加到联系人数据
  7. android 碎片
  8. LayoutInflater 流程解析
  9. Failed to resolve: com.android.support
  10. android使用HttpGet和HttpPost访问HTTP资