FLAG_CANCEL_CURRENT or FLAG_UPDATE_CURRENT
问题 My app sets a repeating alarm on user interaction, it might change the interval time set for the broadcast with Alarm Manager. There is not much in the way of extras. Is the update or cancel flag better in this case? Thanks 回答1: If you are not using extras, you don't have to specify any of those flags. They only change how the systems handles extras with a PendingIntent : replace the ones in the current matching (cached by the system PendingIntent ) or cancel it and create a new one. Refer to