summaryrefslogtreecommitdiff
path: root/core/src/main/java/de/danoeh
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-05-27 11:48:19 +0200
committerByteHamster <info@bytehamster.com>2020-05-29 09:32:46 +0200
commit0b60a8acee6439d290f7d2cda5cc72f4ee7b11d4 (patch)
tree362aa5ffb6e1c8cbfe4301dfa0fbfe7b8dffb8fc /core/src/main/java/de/danoeh
parent1fc7352702e4df1a67c1362d23f34b139e254936 (diff)
downloadAntennaPod-0b60a8acee6439d290f7d2cda5cc72f4ee7b11d4.zip
Do not show service running notification on onCreate
Sometimes (Bluetooth/Android Auto), the service is created and then just bound to. That means that onStartCommand is never called. This causes a persistent notification. Just in case the notification is somehow still shown to users, modified the message to tell them how to hide it.
Diffstat (limited to 'core/src/main/java/de/danoeh')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java1
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java2
2 files changed, 1 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
index 3257e2eea..585510ef8 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
@@ -269,7 +269,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
stateManager = new PlaybackServiceStateManager(this);
notificationBuilder = new PlaybackServiceNotificationBuilder(this);
- stateManager.startForeground(R.id.notification_playing, notificationBuilder.build());
registerReceiver(autoStateUpdated, new IntentFilter("com.google.android.gms.car.media.STATUS"));
registerReceiver(headsetDisconnected, new IntentFilter(Intent.ACTION_HEADSET_PLUG));
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
index 915e77f6c..4bb88200a 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceNotificationBuilder.java
@@ -131,7 +131,7 @@ public class PlaybackServiceNotificationBuilder {
}
} else {
notification.setContentTitle(context.getString(R.string.app_name));
- notification.setContentText("Service is running");
+ notification.setContentText("Loading. If this does not go away, play any episode and contact us.");
}
notification.setContentIntent(getPlayerActivityPendingIntent());