PendingIntent.getBroadcast第四个参数flags

(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。

posted @ 2014-06-21 17:29  crazywenza  阅读(3699)  评论(0编辑  收藏  举报