Android job scheduler not persisted on reboot

后端 未结 3 626
长发绾君心
长发绾君心 2021-01-02 02:05

I have implemented Job scheduler in my project and it works fine in the case if the app is in background or if the app is killed. But it is not working if the device is rebo

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-02 02:39

    You need to call the setPersisted(boolean isPersisted) method.

    You can find it in the doc https://developer.android.com/reference/android/app/job/JobInfo.Builder.html#setPersisted(boolean)

提交回复
热议问题