-
-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Advertise the action to seek to particular points in the playback state #127
Comments
Another way to see it is that each |
That would, thanks. It might make the order of notification buttons a bit unclear, though. |
True. I guess it does make sense to have a separate parameter to static Future<void> setState({
@required List<MediaControl> controls,
List<MediaAction> enabledActions,
@required BasicPlaybackState basicState,
int position = 0,
double speed = 1.0,
int updateTime,
List<int> androidCompactActions,
}) Not sure if there's a better name than |
What about |
I like |
Not sure, but it might be device specific? The standard media style notification is the one offered by the Android system itself, so conceivably different device manufacturers could have customised the style of their notifications and each device might look different. |
Just to follow up on my previous answer, I should have mentioned that you should look at the included example as a starting point, because it demonstrates how to turn on the seek bar and the duration time. It's just that the positioning might be different on different devices. |
I have the media notification working on Android and I see a seek bar in the notification however it is just a black bar with no Duration timestamp and no SeekBar Dot/Handle. I can tap on it and seek happens however it does not look like how that users sees it. As far as my device, I have tested another flutter package that also generates a media notification but their notification generates it exactly like what the user above sees. I don't know what the difference might be you guys are both using Here are some articles that might help? |
I can take a look at it but right now I am trying to get this package working how I need it. This is not a major feature that I need at the moment. |
I don't know as to the layout issue, but the duration information displayed in the notification comes from various places. The duration comes from the current media item so you have to include that data when you call |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with audio_service. |
Is your feature request related to a problem? Please describe.
Android 10 introduces seek bars in media notifications. To be interactive, the action bits must include
PlaybackStateCompat.ACTION_SEEK_TO
.The problem is, the plugin only includes the notification button actions in the playback state, so Android doesn't know that seeking is supported, as there are no notification buttons that seek to a certain point.
Describe the solution you'd like
I propose that we separate the notification actions from the actions in the playback state. The
AudioServiceBackground.setState
function can be changed to have, perhaps,notificationControls
andsystemControls
arguments. For the latter argument, we can copy theACTION_*
constants from thePlaybackStateCompat
Android class, and they can be merged and passed through in a customisable way.Describe alternatives you've considered
There are no alternatives without changing plugin code.
The text was updated successfully, but these errors were encountered: