Stop service with app shutdown, but persist on UI close

This commit is contained in:
Mark Qvist 2022-10-02 02:26:58 +02:00
parent bec6bda2f6
commit 8b275cbe7f
3 changed files with 31 additions and 15 deletions

View file

@ -177,7 +177,7 @@ public class PythonService extends Service implements Runnable {
super.onTaskRemoved(rootIntent);
//sticky servcie runtime/restart is managed by the OS. leave it running when app is closed
if (startType() != START_STICKY) {
stopSelf();
//stopSelf();
}
}