How to properly update a notification post api 11?

后端 未结 4 724
野性不改
野性不改 2021-02-02 13:14
  • Before Notification.Builder came into existence the way to update a notification that was already in the notification tray was to call setLatestEventInfo()

4条回答
  •  醉梦人生
    2021-02-02 14:08

    What you are doing is correct, you're just missing the flags you can set. I don't know your particular notification implementation but you might consider using:

    setOngoing(boolean ongoing)
    

    or

    setOnlyAlertOnce(boolean onlyAlertOnce)
    

提交回复
热议问题