non removable notification

后端 未结 4 670
别那么骄傲
别那么骄傲 2020-12-05 07:57

In my app, there is service running on background. I want to notify user that the service is running. But I need that user cannot delete the notification - by pressing clear

4条回答
  •  孤城傲影
    2020-12-05 08:31

    To Create Non removable notification just use setOngoing (true);

    To Create removable notification just use setOngoing (false);

提交回复
热议问题