diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java index d54d4422..481aff3c 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java @@ -1,5 +1,6 @@ package org.fox.ttrss.widget; +import android.app.Notification; import android.app.Service; import android.content.Context; import android.content.Intent; @@ -31,6 +32,15 @@ public class WidgetUpdateService extends Service { public static final int UPDATE_IN_PROGRESS = 4; @Override + public void onCreate() { + super.onCreate(); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + startForeground(1, new Notification()); + } + } + + @Override public IBinder onBind(Intent intent) { Log.d(TAG, "onBind"); |