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

后端 未结 3 1759
故里飘歌
故里飘歌 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:21

    Pushing up the comment of KR_Android : according to this blog and this other question : a service Intent is declared 'bad' after crashing at least twice.

    Please try to

    • Encapsulate all methods in try { method(..); } catch(..) { log(..) } security belts
    • Deinstall and reinstall the app

    Let us know and we shall update our answers after digging further

提交回复
热议问题