(1) android.app.PendingIntent.FLAG_UPDATE_CURRENT

如果PendingIntent已经存在,保留它并且只替换它的extra数据。

(2) android.app.PendingIntent.FLAG_CANCEL_CURRENT

(3) android.app.PendingIntent.FLAG_ONE_SHOT

PendingIntent只能使用一次。调用了实例方法send()之后,它会被自动cancel掉,再次调用send()方法将失败。

(4) android.app.PendingIntent.FLAG_NO_CREATE

如果PendingIntent不存在,简单了当返回null。

相关文章:

  • 2022-01-09
  • 2021-04-02
  • 2021-11-11
  • 2021-09-24
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-05
  • 2022-02-01
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
相关资源
相似解决方案