Skip to content

feat: implement WearOS support with DataApi, NodeApi, BLE discovery, and notification/media bridge [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH] - #3673

Open
waterWang wants to merge 1 commit into
microg:masterfrom
waterWang:feat/wearos-support
Open

feat: implement WearOS support with DataApi, NodeApi, BLE discovery, and notification/media bridge [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]#3673
waterWang wants to merge 1 commit into
microg:masterfrom
waterWang:feat/wearos-support

Conversation

@waterWang

Copy link
Copy Markdown

Summary

This PR implements WearOS support in microG by replacing the stub implementations of the Wearable API with fully functional code. The existing codebase already had a substantial play-services-wearable module with AIDL interfaces, service implementations, and protocol handling — what was missing was the actual client-side API implementations and the notification/media bridging layer.

What changed

Replaced stubs (were throwing UnsupportedOperationException):

  • DataApiImpl.java — All 8 methods now properly delegate to the service via GmsConnector.call(): putDataItem, getDataItem, getDataItems, deleteDataItems, getFdForAsset, addListener, removeListener
  • NodeApiImpl.java — All 4 methods implemented: getLocalNode, getConnectedNodes, addListener, removeListener
  • MessageApiImpl.java — addListener and removeListener now functional

New services:

  • NotificationBridgeService.java — NotificationListenerService that captures Android notifications and forwards them to WearOS devices via the Data Layer API
  • MediaControlBridgeService.java — WearableListenerService that monitors active media sessions and syncs metadata/playback state to wearable, handles transport commands from the watch
  • WearableBleManager.java — BLE scanning and GATT connection management for WearOS device discovery using Google Wear Service UUID

Modified:

  • WearableImpl.java — Integrated BLE manager for device discovery and connection
  • AndroidManifest.xml — Added BLE permissions and service registrations

Related

LLM Disclosure

This PR was created with assistance from an AI agent. The implementation follows the existing microG service patterns and all changes have been reviewed for correctness.

…and notification/media bridge [FaaFyfxR9WAQrL7FcAgEHJvztd8cVMxvjHRS55rw1nwH]
@waterWang

Copy link
Copy Markdown
Author

Hi, friendly reminder! All CI checks passed on this PR. Could you take a look when you have a moment? Let me know if anything needs to be changed. Thanks!

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.

1 participant