does anyone know about the seekbar function on notifications in android 10?
I can't seem to get the position indicator to show the current position. the bar is just blank but I can seek the media clicking the bar in the notification.
I have the normal notification builder code and I have added this to make the seekbar clickable in the "MediaPlayer.Event.Playing" event of libvlc
MediaMetadataCompat.Builder metadataBuilder = new MediaMetadataCompat.Builder();
metadataBuilder.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, mMediaPlayer.getLength());
PlaybackStateCompat.Builder mStateBuilder = new PlaybackStateCompat.Builder()
.setState(PlaybackStateCompat.STATE_PLAYING, 1, 1.0f)
.setBufferedPosition(mMediaPlayer.getLength())
.setActions(
PlaybackStateCompat.ACTION_PLAY |
PlaybackStateCompat.ACTION_PAUSE |
PlaybackStateCompat.ACTION_SKIP_TO_NEXT |
PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |
PlaybackStateCompat.ACTION_SEEK_TO |
PlaybackStateCompat.ACTION_PLAY_PAUSE);
mediaSession.setMetadata(metadataBuilder.build());
mediaSession.setPlaybackState(mStateBuilder.build());
the media playing is about half way but there is no indicator of its position.