What happens if you set the flag on a PendingIntent to 0?

别来无恙 提交于 2019-11-29 18:20:49

问题


What exactly happens when you set the flag on a pending intent to 0? Does it just not raiise a flag or does it default to one of the others?


回答1:


No this is the "default" behavior of creating a new PendingIntent regardless if one already exists or not. If you want more specialized behavior, like cancel an existing PendingIntent if the underlying Intent is the same, or update such an existing PendingIntent, then you should use the various flags you can find in the PendingIntent class.



来源:https://stackoverflow.com/questions/4523349/what-happens-if-you-set-the-flag-on-a-pendingintent-to-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!