From fbcdaa77e317ffcdaf57ec7bf2248751127d5b67 Mon Sep 17 00:00:00 2001 From: Stypox Date: Fri, 2 Oct 2020 15:17:04 +0200 Subject: [PATCH] Initialize player notification asap Otherwise Android's foreground services implementation would complain --- app/src/main/java/org/schabi/newpipe/player/MainPlayer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java index 0aed3469f..c7fbb444b 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java @@ -103,6 +103,8 @@ public final class MainPlayer extends Service { playerImpl = new VideoPlayerImpl(this); playerImpl.setup(layout); playerImpl.shouldUpdateOnProgress = true; + + NotificationUtil.getInstance().createNotificationAndStartForeground(playerImpl, this); } @Override