Commit 9e8bcc5a authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Service isn't stopped anymore when any activity of the app is destroyed

parent a503f301
......@@ -38,6 +38,8 @@ public class ServerService extends NotificationService {
notificationBuilder = new NotificationCompat.Builder(this, Util.createNotificationChannel(this, false));
notificationBuilder.setContentTitle(getString(R.string.app_name));
notificationBuilder.setSmallIcon(R.mipmap.ic_launcher);
notificationBuilder.setOngoing(true);
notificationBuilder.setAutoCancel(false);
}
@Override
......@@ -89,4 +91,9 @@ public class ServerService extends NotificationService {
public boolean foregroundMode() {
return true;
}
@Override
public boolean removeNotificationOnTaskRemoval() {
return false;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment