I wanted to use my own style icon on notification bar in my app, so I created some custom button , but only forwardButton worked, the other button showed on notification bar, but not worked at all, maybe only support one custom on notification bar at the same time?
if (mediaEvent.customEventId == replay10ButtonId) {
_forwardBackgroundAudio(-10.0);
} else if (mediaEvent.customEventId == playnowButtonId) {
_resumeBackgroundAudio();
} else if (mediaEvent.customEventId == forwardButtonId) {
_forwardBackgroundAudio(30.0);
} else if (mediaEvent.customEventId == pausenowButtonId) {
_pauseBackgroundAudio();
}
final _pauseButton = AndroidCustomMediaButton(
'pausenow', pausenowButtonId, 'ic_stat_pause_circle_filled');
final _replay10Button = AndroidCustomMediaButton(
'replay10', replay10ButtonId, 'ic_stat_replay_10');
final _forwardButton = AndroidCustomMediaButton(
'forward', forwardButtonId, 'ic_stat_forward_30');
final _playnowButton = AndroidCustomMediaButton(
'playnow', likeButtonId, 'ic_stat_play_circle_filled');
I wanted to use my own style icon on notification bar in my app, so I created some custom button , but only forwardButton worked, the other button showed on notification bar, but not worked at all, maybe only support one custom on notification bar at the same time?
if (mediaEvent.customEventId == replay10ButtonId) { _forwardBackgroundAudio(-10.0); } else if (mediaEvent.customEventId == playnowButtonId) { _resumeBackgroundAudio(); } else if (mediaEvent.customEventId == forwardButtonId) { _forwardBackgroundAudio(30.0); } else if (mediaEvent.customEventId == pausenowButtonId) { _pauseBackgroundAudio(); }
final _pauseButton = AndroidCustomMediaButton( 'pausenow', pausenowButtonId, 'ic_stat_pause_circle_filled'); final _replay10Button = AndroidCustomMediaButton( 'replay10', replay10ButtonId, 'ic_stat_replay_10'); final _forwardButton = AndroidCustomMediaButton( 'forward', forwardButtonId, 'ic_stat_forward_30'); final _playnowButton = AndroidCustomMediaButton( 'playnow', likeButtonId, 'ic_stat_play_circle_filled');