feat: Add Wear OS support — Bluetooth transport, notification mirroring, and media control#3535
Open
kouyouqi123 wants to merge 6 commits into
Open
feat: Add Wear OS support — Bluetooth transport, notification mirroring, and media control#3535kouyouqi123 wants to merge 6 commits into
kouyouqi123 wants to merge 6 commits into
Conversation
…ng, and media control Fixes microg#2843 Adds comprehensive Wear OS support to microG: - Bluetooth RFCOMM transport (BluetoothConnectionServer + BluetoothWearableConnection) - Notification mirroring to watch (WearableNotificationListenerService) - Media control bridge (WearableMediaSessionBridge) - see what's playing on the phone and control it from the watch (play/pause/next/skip/seek)
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.
Fixes #2843
This PR adds comprehensive Wear OS support to microG, enabling smartwatch connectivity without Google Play Services.
1. Bluetooth RFCOMM Transport Layer
BluetoothWearableConnection.java- bidirectional data streaming over BluetoothSocketBluetoothConnectionServer.java- listens for Wear OS connections via SPP UUIDWearableImpl.java- lifecycle management2. Notification Mirroring
WearableNotificationListenerService.java- captures phone notifications and forwards to watch via data layer3. Media Control Bridge
WearableMediaSessionBridge.java- monitors active MediaSessions, pushes metadata/state to watchCommands from watch:
/wearable/media/control/play|/wearable/media/control/pause|/wearable/media/control/toggle/wearable/media/control/next|/wearable/media/control/previous/wearable/media/control/seek(8-byte big-endian position in ms)/wearable/media/control/rate(4-byte float speed)State data:
/wearable/media/state- contains title, artist, album, duration, isPlaying, position, albumArt, etc.