startForeground() does not show my Notification

后端 未结 6 637
悲哀的现实
悲哀的现实 2020-12-08 18:58

I am trying to make my Service running in foreground. I tried to use this example (please look for the section \"Running a Service in the Foreground\")

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 19:40

    in addition to the best answer. you should also check that have you called setSmallIcon. On my android phone, I cannot get what I expected without calling setSmallIcon

提交回复
热议问题