audio_service icon indicating copy to clipboard operation
audio_service copied to clipboard

[Android-notification] seek bar not updating via `rewind/fastForward`

Open 838 opened this issue 2 years ago • 3 comments

Documented behaviour

You encapsulate your audio code in an audio handler which implements standard callbacks on Android, iOS and the web that allow it to respond to playback requests coming from your Flutter UI, headset buttons, the lock screen, notification, iOS control center, car displays and smart watches, even when the app is in the background

Actual behaviour

The seek bar in android notification not updating when using the rewind/fastForward buttons from notification center. The seek bar inside example app works as expected.

Minimal reproduction project

Official example: example_multiple_handlers.dart

Reproduction steps

  1. Add MediaControl.rewind and MediaControl.fastForward to example_multiple_handlers -> AudioPlayerHandler._broadcastState -> playbackState -> controls
  2. Run example_multiple_handlers
  3. Open android notification and expand the audio controls so the seek bar is also visible
  4. Use rewind/fastForward to seek back/forward in the track
  5. Note that the seek bar does not get updated

Output of flutter doctor

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.78.0)
[✓] Connected device (4 available)
[✓] HTTP Host Availability```
### Devices exhibiting the bug
On both android device and emulator.

https://github.com/ryanheise/audio_service/assets/3314171/766ea4ba-11ba-462c-9715-79e82251e407

838 avatar May 13 '23 10:05 838

What version of Android? It might not be relevant here given that it looks more related to the paused state even in the flutter ui, but it will be good to have the information on hand just in case.

ryanheise avatar May 13 '23 13:05 ryanheise

The real device is Samsung Galaxy A33 5G Android 13 and emulator is Pixel 3a Api 30 x86 Android 11.

838 avatar May 13 '23 16:05 838