Start foreground on start command too

This shouldn't be necessary ...
pull/160/head
M66B 5 years ago
parent 5f71c31357
commit 0606dac914

@ -48,6 +48,9 @@ public class ServiceExternal extends Service {
Log.i("Received intent=" + intent);
Log.logExtras(intent);
super.onStartCommand(intent, flags, startId);
startForeground(Helper.NOTIFICATION_EXTERNAL, getNotification().build());
if (intent == null)
return START_NOT_STICKY;

@ -225,6 +225,7 @@ public class ServiceSend extends ServiceBase {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
startForeground(Helper.NOTIFICATION_SEND, getNotificationService(null, null).build());
return START_STICKY;
}

@ -254,6 +254,7 @@ public class ServiceSynchronize extends ServiceBase {
Log.logExtras(intent);
super.onStartCommand(intent, flags, startId);
startForeground(Helper.NOTIFICATION_SYNCHRONIZE, getNotificationService(null).build());
if (action != null)
try {

Loading…
Cancel
Save