startForeground() does not show my Notification

后端 未结 6 636
悲哀的现实
悲哀的现实 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

    Is your service a started service or a bound service? I had the same issue with a bound service, but starting the service before binding it allowed me to call startForeground(int, notification) with and have the notification show up.

提交回复
热议问题