如果将PendingIntent上的标志设置为0,会发生什么情况? [英] What happens if you set the flag on a PendingIntent to 0?

查看:205
本文介绍了如果将PendingIntent上的标志设置为0,会发生什么情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您将挂起的意图上的标志设置为0时,会发生什么?它只是不升起一个标志,还是默认为其他标志之一?

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?

推荐答案

否,这是创建新的PendingIntent的默认"行为,无论是否已经存在.如果您想要更特殊的行为,例如在基础Intent相同的情况下取消现有的PendingIntent,或更新此类现有的PendingIntent,则应使用在PendingIntent类中可以找到的各种标志.

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.

这篇关于如果将PendingIntent上的标志设置为0,会发生什么情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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