FLAG_CANCEL_CURRENT或FLAG_UPDATE_CURRENT [英] FLAG_CANCEL_CURRENT or FLAG_UPDATE_CURRENT

查看:593
本文介绍了FLAG_CANCEL_CURRENT或FLAG_UPDATE_CURRENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序设置上用户交互的重复报警,它可能
更改间隔时间与报警管理广播设置。结果
没有多少群众演员中的方法。结果
是在这种情况下,更新或取消标志更好?

My app sets a repeating alarm on user interaction, it might change the interval time set for the broadcast with Alarm Manager.
There is not much in the way of extras.
Is the update or cancel flag better in this case?

感谢

推荐答案

如果您使用的不是演员,你没有指定任何这些标志。他们只改变系统是如何处理群众演员以的PendingIntent :替换当前的匹配(由系统缓存的那些的PendingIntent )或取消它,并创建一个新的。详情请参阅文档:的http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT

If you are not using extras, you don't have to specify any of those flags. They only change how the systems handles extras with a PendingIntent: replace the ones in the current matching (cached by the system PendingIntent) or cancel it and create a new one. Refer to the documentation for details: http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT

这篇关于FLAG_CANCEL_CURRENT或FLAG_UPDATE_CURRENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆