Sticky foreground service fails to restart with a “process is bad” error

后端 未结 3 1761
故里飘歌
故里飘歌 2021-02-01 14:53

I have a started foreground service. I\'ve taken care to return START_STICKY from onStartCommand. I\'ve observed that foreground services don\'t run indefinitely bu

3条回答
  •  独厮守ぢ
    2021-02-01 15:33

    It annoyed me that the system wouldn't restart my service until I rebooted the box. Then I found this trick to clear the crash counts much more quickly:

    adb shell killall system_server
    

提交回复
热议问题