Updating an ongoing notification quietly

后端 未结 4 1456
感动是毒
感动是毒 2020-11-29 01:55

I have a service which connects to other devices wirelessly. When the service is enabled, I have an ongoing notification which states it is enabled.

After the servi

4条回答
  •  爱一瞬间的悲伤
    2020-11-29 02:15

    Try this

        int id = (int) Calendar.getInstance().getTimeInMillis();
    

    Use this id in the notify() method. Time of your Android System itself creates a unique ID

提交回复
热议问题