This commit is contained in:
2026-03-16 15:22:49 +09:00
parent a9fdf9ac9f
commit 1383781dc6
35 changed files with 830 additions and 0 deletions
@@ -0,0 +1,25 @@
package bums.lunatic.launcher.workers
import bums.lunatic.launcher.utils.Blog
import com.google.android.gms.wearable.MessageEvent
import com.google.android.gms.wearable.WearableListenerService
class WatchGestureService : WearableListenerService() {
override fun onMessageReceived(messageEvent: MessageEvent) {
when (messageEvent.path) {
"/gesture/next" -> {
// 런처의 다음 페이지로 이동하거나, 이북 앱에 키 이벤트 전송
handleGestureAction("NEXT")
}
"/gesture/prev" -> {
handleGestureAction("PREV")
}
}
}
private fun handleGestureAction(action: String) {
// Broadcast를 런처 메인 Activity로 쏘거나,
// 직접 AccessibilityService를 호출하여 시스템 이벤트를 발생시킵니다.
Blog.LOGE("WatchGesture", "Gesture Received: $action")
}
}