Skip to content

Commit

Permalink
Provide more metadata for Bluetooth devices
Browse files Browse the repository at this point in the history
* current radio station name (as album name)
* radio station icon

Should fix #462
  • Loading branch information
morckx committed May 7, 2019
1 parent d7ae40f commit 1189c6a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,10 @@ private void updateNotification(RadioPlayer.PlayState playState) {

if (mediaSession != null) {
final MediaMetadataCompat.Builder builder = new MediaMetadataCompat.Builder();
builder.putString(MediaMetadataCompat.METADATA_KEY_ALBUM, currentStationName);
builder.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, liveInfo.getArtist());
builder.putString(MediaMetadataCompat.METADATA_KEY_TITLE, liveInfo.getTrack());
builder.putBitmap(MediaMetadataCompat.METADATA_KEY_DISPLAY_ICON, radioIcon.getBitmap());
mediaSession.setMetadata(builder.build());
}
break;
Expand Down

0 comments on commit 1189c6a

Please sign in to comment.