Skip to content

feat: Add CompanionPairingManager for Wear OS 3+ device pairing - #3672

Open
laurentketterle-hub wants to merge 24 commits into
microg:masterfrom
laurentketterle-hub:feature/wearos-companion-pairing-2843
Open

feat: Add CompanionPairingManager for Wear OS 3+ device pairing#3672
laurentketterle-hub wants to merge 24 commits into
microg:masterfrom
laurentketterle-hub:feature/wearos-companion-pairing-2843

Conversation

@laurentketterle-hub

Copy link
Copy Markdown

Summary

This PR adds Companion Device pairing support for Wear OS 3+ devices, addressing the WearOS support bounty (#2843).

Changes

New: CompanionPairingManager.java

  • Manages companion device pairing for Wear OS 3+ smartwatches
  • Implements BLE scanning with Wear OS service UUID filters for device discovery
  • Manages paired companion devices with persistent SharedPreferences storage
  • Provides a PairingListener interface for pairing lifecycle events:
    • onDeviceDiscovered / onDevicePaired / onDeviceUnpaired
    • onScanStarted / onScanStopped / onError
  • Integrates with existing ConnectionConfiguration system through WearableImpl
  • Handles Bluetooth ACL connect/disconnect events to track device state
  • Supports known Wear OS device name prefixes for improved device filtering

Modified: WearableServiceImpl.java

  • Instantiates CompanionPairingManager in the constructor
  • Exposes getCompanionPairingManager() for access by companion apps

Technical Details

  • Compatible with API 18+ (Jelly Bean MR2), with BLE features requiring API 21+ (Lollipop)
  • Uses BluetoothLeScanner for low-energy scanning optimized for Wear OS discovery
  • Known Wear OS service UUIDs: 0000fce2-... (Wear OS service), 0000180f-... (Battery service)
  • Device name filtering for known Wear OS watch brands (Galaxy Watch, Pixel Watch, Fossil, TicWatch, etc.)

Related

Add CompanionPairingManager class that handles BLE-based discovery and
pairing of Wear OS 3+ smartwatches using Android's Bluetooth LE APIs.

- Implements BLE scanning with Wear OS service UUID filters
- Manages paired companion devices with persistent storage
- Provides listener interface for pairing lifecycle events
- Integrates with existing connection configuration system
- Bridges companion device pairing with WearableImpl

Modify WearableServiceImpl to instantiate and expose the
CompanionPairingManager for use by companion apps.

Related: microg#2843
@laurentketterle-hub

Copy link
Copy Markdown
Author

Hi maintainers! 👋 The CI workflow is stuck with "Action required — awaiting approval from a maintainer" (first-time contributor restriction). Would you mind approving it when you get a chance? Thanks a lot! 🙏

@laurentketterle-hub
laurentketterle-hub force-pushed the feature/wearos-companion-pairing-2843 branch from a465274 to 0d71ecc Compare July 29, 2026 16:22
@laurentketterle-hub
laurentketterle-hub force-pushed the feature/wearos-companion-pairing-2843 branch from efe3c12 to 4940fa2 Compare July 29, 2026 16:24
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.

[BOUNTY] WearOS Support [$1340]

1 participant