How does android compare pending intents

后端 未结 2 725
长发绾君心
长发绾君心 2020-12-05 18:21

Documentation for PendingIntent.FLAG_NO_CREATE reads:

Flag indicating that if the described PendingIntent does not already exist, then simply return n

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 19:02

    To determine if 2 PendingIntents match, the following must be equal:

    • The requestCode parameter used when the PendingIntent was created
    • The Intent ACTION
    • The Intent CATEGORIES
    • The Intent DATA
    • The Intent MIMETYPE
    • The Intent PACKAGE
    • The Intent COMPONENT

    Extras are not taken into consideration.

    You can read more in the PendingIntent summary documentation and Intent.filterEquals().

提交回复
热议问题