feat(android): lyrics engine assembly + in-app synced lyrics (Phase 2) - #7
Merged
Conversation
Release windows-v0.10.0 — first Musebase release
- AndroidEngineDispatcher: IEngineDispatcher를 메인 Looper Handler로 구현
(Post + PostDelayed 자기 재예약 타이머, WpfEngineDispatcher와 대칭)
- MusebaseApp(커스텀 Application): LyricsEngineFactory.Create로 엔진 1회 조립
- 소스=LyricsSourceRegistry.AllIds(개인용), 번역=libretranslate(무키)
- 대상 언어=기기 로케일→DeepL 코드(Windows DefaultTargetLanguage와 동일 규칙,
Java 레거시 "in"→ID 정규화 포함)
- 캐시=FilesDir/translations.db(SqliteTranslationCache+LyricsCacheStore 공용,
bundle_e_sqlite3 android 네이티브는 Microsoft.Data.Sqlite 전이 참조로 자동 포함)
- 텔레메트리 미연결(기본 Noop), 화면 회전에도 엔진 유지
- MainActivity: 가사 영역 추가 — 검색 상태 문구 + 현재 줄(26sp 굵게) + 번역,
StateChanged/StatusChanged 구독(초기 스냅샷 반영, OnDestroy에서 해제).
스파이크의 권한 안내·곡 정보 표시는 유지, 루트를 ScrollView로 감쌈
- AndroidManifest: INTERNET 권한 명시(Release 대비)
- 버전 0.2.0(versionCode 2)
검증: dotnet build(Debug APK, 경고 0/오류 0, libe_sqlite3.so 4 ABI 포함 확인),
Musebase.sln Release 빌드·Core 테스트 87개 통과(코어 미변경).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
재생 감지 스파이크(실기기 검증 완료) 위에 가사 엔진을 조립해, 재생 중인 곡의 가사를 실제로 찾아 앱 화면에 동기 표시한다. 오버레이(다른 앱 위 표시)·카라오케 채움·DeepL 키 UI는 다음 단계. 소유 경로(
src/Musebase.Android/)만 수정 — 코어/Windows/sln 무변경.Services/AndroidEngineDispatcher.cs(신규):IEngineDispatcher를 메인 LooperHandler로 구현 —Post+ PostDelayed 자기 재예약 주기 타이머(WpfEngineDispatcher와 대칭, 공유 Handler 보호를 위해 자기 Runnable만 제거)MusebaseApp.cs(신규, 커스텀Application):LyricsEngineFactory.Create(AndroidNowPlayingSource, AndroidEngineDispatcher, config, SqliteTranslationCache, logcat)1회 조립 — 화면 회전(Activity 재생성)에도 엔진 유지LyricsSourceRegistry.AllIds(개인용 프로파일)libretranslate(무키·무료, 기본 엔드포인트)AppSettings.DefaultTargetLanguage와 동일 규칙 + Java 레거시"in"→ID정규화),ShowOnlyTargetTranslation=true, offset=0FilesDir/translations.db(번역 라인 캐시 + 곡 단위 가사 캐시 공용 SQLite) —Microsoft.Data.Sqlite가bundle_e_sqlite3의 android 네이티브(libe_sqlite3.so)를 전이 참조로 자동 포함하므로 추가 패키지/초기화 불필요 (APK에서 4개 ABI 확인)MainActivity.cs: 가사 영역 추가 — 검색 상태 문구(한국어 하드코딩, i18n은 다음 단계) + 현재 줄(26sp 굵게) + 번역(없으면 숨김).StateChanged/StatusChanged구독으로 갱신, 초기 스냅샷은Coordinator.CurrentState/App.LastStatus에서 복원,OnDestroy에서 구독 해제. 기존 권한 안내·곡 정보 표시 유지, 루트를 ScrollView로 감쌈AndroidManifest.xml:INTERNET권한 명시(디버그 자동 추가에 의존하지 않도록)검증
dotnet build src/Musebase.Android -c Debug(SDK/JDK 지정): 경고 0, 오류 0, APK 산출Musebase.{Core,Engine,Android}.dll+libe_sqlite3.so(arm64-v8a/armeabi-v7a/x86/x86_64) 포함, 병합 매니페스트에INTERNET권한·android:name=com.countnine.musebase.MusebaseApp반영dotnet build Musebase.sln -c Release: 성공(코어 미변경 확인 — 유일 경고 CS0067은 기존 테스트 코드)dotnet test tests/Musebase.Core.Tests: 87/87 통과🤖 Generated with Claude Code