Android Pie無法用adb shell執行沒有foreground service權限的service


Oreo的時候要求service要從背景叫起需要成為foreground service
https://github.com/Mirochiu/system-alert-window-example/blob/master/app/src/main/java/com/mattfenlon/ghost/MainService.java

Pie的時候進一步要求要加入權限android.permission.FOREGROUND_SERVICE

https://github.com/Mirochiu/system-alert-window-example/blob/master/app/src/main/AndroidManifest.xml

留言