Add ability to disable lockscreen/notification seek and skip functionality

App version: 3.0.2 F-Droid

Problem you may be having, or feature you want:
It would be nice to be able to disable the seek bar and the skip podcast buttons on the lock screen/notification players.

Suggested solution:
Add a setting to be able to toggle those as options.

Screenshots / Drawings / Technical details:
Not sure if this is a good fix but if you remove these lines it seems to work:

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 6fc9035ca..bb904851b 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
@@ -1204,7 +1204,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
                 | PlaybackStateCompat.ACTION_REWIND
                 | PlaybackStateCompat.ACTION_PAUSE
                 | PlaybackStateCompat.ACTION_FAST_FORWARD
-                | PlaybackStateCompat.ACTION_SEEK_TO
                 | PlaybackStateCompat.ACTION_SET_PLAYBACK_SPEED;

         sessionState.setActions(capabilities);
@@ -1234,13 +1233,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
                         R.drawable.ic_notification_playback_speed
                 ).build()
         );
-        sessionState.addCustomAction(
-                new PlaybackStateCompat.CustomAction.Builder(
-                        CUSTOM_ACTION_SKIP_TO_NEXT,
-                        getString(R.string.skip_episode_label),
-                        R.drawable.ic_notification_skip
-                ).build()
-        );

         We

1 Like

Are changing those session state capabilities the correct way to go about implementing this? I will start working on adding something to the settings if this is a reasonable feature. The amount of times I have accidentally seeked a podcast greatly outnumber the number of times I have purposefully done it, so I definitely want this feature.

I have never done any android programming before, and don’t want to go off on the wrong track.

On my Samsung S20 I can stop any media player controls from appearing on the Lock Screen from the Lock Screen settings menu. Play / Pause / Skip can still be done from the Bluetooth speaker / headphone controls.

I don’t want to disable all lock screen controls, I like having the fast forward and rewind accessible.

The problem with hacks like this is that it has all kinds of side effects, for example on Android Auto, Android Wear, or maybe even some bluetooth headsets. I’m not really convinced that adding this setting is a good thing.

Won’t this just disable that functionality for android wear and android auto? I don’t see how this is a negative side effect if someone intentionally disables it in the settings menu.

Users also intentionally disabled the cover image on the lockscreen (+everywhere else, like your proposal) and then complained that they don’t have covers on Android Auto. So we removed the setting again.