Skip to content

feat(lyrics): add notification lyrics support - #1005

Merged
nift4 merged 4 commits into
FoedusProgramme:betafrom
SteveZMTstudios:feat/notification-lyrics
Aug 31, 2026
Merged

feat(lyrics): add notification lyrics support#1005
nift4 merged 4 commits into
FoedusProgramme:betafrom
SteveZMTstudios:feat/notification-lyrics

Conversation

@SteveZMTstudios

Copy link
Copy Markdown
Contributor

Summary

Notification lyrics — opt-in setting that surfaces the current synced lyric line in both the expanded media notification and the system media session metadata (lockscreen / BT / Android Auto), with the original title+artist preserved as the subtitle line.

Screenshots, CI tests and more, see #1003

@SteveZMTstudios
SteveZMTstudios marked this pull request as draft August 22, 2026 17:37
@SteveZMTstudios

Copy link
Copy Markdown
Contributor Author

@SteveZMTstudios
SteveZMTstudios marked this pull request as ready for review August 22, 2026 18:29
@SteveZMTstudios
SteveZMTstudios force-pushed the feat/notification-lyrics branch from 495b22b to 58700a2 Compare August 22, 2026 18:43
@nift4

nift4 commented Aug 24, 2026

Copy link
Copy Markdown
Member

Hi, is this intended for use with bluetooth cars and Android Auto mainly, or also for phone usage?

I am wondering whether it should be restricted to the Bluetooth and AA session, so that the notification in phone UI continues to not show lyrics.

@SteveZMTstudios

SteveZMTstudios commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Hi, is this intended for use with bluetooth cars and Android Auto mainly, or also for phone usage?

I am wondering whether it should be restricted to the Bluetooth and AA session, so that the notification in phone UI continues to not show lyrics.

First of all, embarrassingly, I don't have a car yet, and I don't have a device that can display Bluetooth media names. So I cant promise that 100% works.

However, my WearOS watch displays lyrics correctly, so I'm not sure if both of these are working correctly.

IMG_0115

@SteveZMTstudios

Copy link
Copy Markdown
Contributor Author

Additionally, this feature is only available after the lyrics notification switch in Settings - Player - Lyrics is manually turned on.

As far as I know, modifying the publicly announced name of the playback media to display lyrics is a fairly common practice, or at least that's how the commercial streaming media I use works.

I added this feature because it works well with the manufacturer's fluid cloud and offers an experience almost identical to commercial software.

Screenshot_2026-08-25-01-05-10-69_b783bf344239542886fee7b48fa4b892

@nift4

nift4 commented Aug 25, 2026

Copy link
Copy Markdown
Member

Makes sense, then we can keep it for phone too.

Comment thread app/src/main/java/org/akanework/gramophone/logic/GramophonePlaybackService.kt Outdated
Comment thread app/src/main/java/org/akanework/gramophone/logic/GramophonePlaybackService.kt Outdated
<string name="tab_order_summary">应用将在启动时显示第一个标签页。分隔线后的标签页将被隐藏。</string>
<string name="settings_status_bar_lyrics_title">状态栏歌词</string>
<string name="settings_status_bar_lyrics_summary">启用魅族状态栏歌词(仅适用于部分设备)</string>
<string name="settings_notification_lyrics_title">通知栏歌词</string>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing translations for the new feature! However, the automated script that updates changes would override the change and delete the translation. Translations have to be contributed through Weblate for the workflow to work - and this can only be done after english strings in PR was merged.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well-- i speak chinese and i add it for testing and self use :)
i will submit to weblate after merged. Thanks for notice!

@ghhccghk

Copy link
Copy Markdown
Contributor

@nift4 If this is merged, Xiaomi Media Island will be able to share real-time lyrics.

}
val metadataWithLyric = superState.currentMetadata.buildUpon()
.setTitle(notifLyric)
.setArtist(subtitle)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if it works with setDisplayTitle+setSubtitle but without setTitle+setArtist?

Reason I'm asking: apps like Pano Scrobbler might not work when changing title/artist

@SteveZMTstudios SteveZMTstudios Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gramophone-1.1.2.1666f33-release.apk.zip
snapshot.tar.gz

I forked out and added another switch, compcompiled one for my phone, but that seems glichey, and edit notification seems unstable.

@SteveZMTstudios SteveZMTstudios Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot_20260828-204436

Android 7, which higher than minsdk, unsupport this.

Android 16, which brought by OEM, will flickers and displays erratically, as if it's unsure which indicator to follow.

https://github.com/nift4/media/blob/5fcf02d05e7e840e12274473420f6268d2cd2925/libraries/session/src/main/java/androidx/media3/session/DefaultMediaNotificationProvider.java#L601-L635

Perhaps we can explain the destructive nature of this function within the response switch itself.

@nift4
nift4 merged commit 59c4782 into FoedusProgramme:beta Aug 31, 2026
@nift4

nift4 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants