Foreground service getting killed from Oreo

后端 未结 5 779
日久生厌
日久生厌 2020-12-07 22:18

I have written a foreground service which is working properly for all OS version lower than Oreo. From Oreo application process is getting killed after 5 minutes of closing

5条回答
  •  北海茫月
    2020-12-07 22:45

    in oneplus 6t, run this adb command

    setting put system com_oneplus_systemui_recent_task_lockd_list {com.topjohnwu.magisk/a.c#0}{com.mycompany.MyAndroidApp/com.mycompany.MyAndroidApp.MainActivity#0}

    prevent killing com.topjohnwu.magisk and com.mycompany.MyAndroidApp

提交回复
热议问题