Android 通知PendingIntent意图发送广播,但Intent数据无更新? 解决方法
2014-07-27 21:02
513 查看
把原来的 PendingIntent mTimedMessagePendingIntent = PendingIntent
.getBroadcast(context, 0, intent, 0); 改为PendingIntent mTimedMessagePendingIntent = PendingIntent
.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);这样,向intent放数据比如 intent.putExtra("msg", val);就会更新了,而不会只是第一次的数据了。
.getBroadcast(context, 0, intent, 0); 改为PendingIntent mTimedMessagePendingIntent = PendingIntent
.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);这样,向intent放数据比如 intent.putExtra("msg", val);就会更新了,而不会只是第一次的数据了。
相关文章推荐
- Android 通知PendingIntent意图打开Activity,数据无更新? 解决方法
- android 多次调用PendingIntent.getBroadcast intent数据不更新问题
- Android PendingIntent.getBroadcast intent数据不更新问题
- Android--PendingIntent 实现发送通知notification
- 解决Notification PendingIntent意图打开Activity数据没有更新的问题
- Android 子线程发送handle更新UI遇到This message is already in use解决方法
- Android在 普通类(非Activity,多数为Adapter) 中 传输数据为空值 解决方法 :在startActivity 用 intent传输数据
- Android AppWidget 开发中PendingIntent传送数据丢失解决办法
- Android RecyclerView 中多Item的EditText焦点混乱,数据错乱的解决方法(更新)
- Android开发中ListView数据更新显示的解决方法
- 解决TextView数据不能更新的问题以及Android Button事件响应函数的两种方法
- Android AppWidget 开发中PendingIntent传送数据丢失解决办法
- Android--PendingIntent 实现发送通知notification
- Android使用wifi通过UDP协议发送广播数据包给PC接收不到问题解决方法
- android 多次调用PendingIntent.getBroadcast intent数据不更新问题
- android中多次调用PendingIntent.getBroadcast(),intent数据不更新问题
- Alarm Receiver 使用 Intent无法更新值的解决方法
- ajax中如何将utf-8编码的数据请求发送到gbk编码应用的解决方法
- 子线程更新UI会发生android.view.ViewRoot$CalledFromWrongThreadException异常的解决方法
- 关于Android不能正确发送User-Agent的解决方法