Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add Bluetooth support for WearOS devices#3178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SBALAVIGNESH123 wants to merge23 commits intomicrog:master
base:master
Choose a base branch
Loading
fromSBALAVIGNESH123:wearos-bluetooth-support
Open
Changes from1 commit
Commits
Show all changes
23 commits
Select commitHold shift + click to select a range
6fb0195
Add Bluetooth support for WearOS devices
Dec 10, 2025
ef58386
Fix bugs reported by code review: thread safety, socket leaks, file l…
Dec 11, 2025
f663ea8
Fix bugs: race conditions, NPE, missing flush (Round 2)
Dec 11, 2025
febb05c
Refactor: Use standard MessageHandler for full protocol support (Roun…
Dec 11, 2025
5cf84de
Feat: Add basic Wearable UI for managing connections
Dec 11, 2025
7b4047c
Fix: Clear static impl reference on service destroy
Dec 11, 2025
ece85ec
Fix: TOCTOU race condition in WearableSettingsActivity
Dec 11, 2025
80ee65f
Fix: Socket leak on handshake failure and incomplete Connect message
Dec 11, 2025
ff4c1a9
Fix: Thread-safety for static impl and missing null check in Connecti…
Dec 11, 2025
fcba2eb
Fix: Define undefined adapter variable in ConnectionThread
Dec 11, 2025
1c4933f
Fix: Sync race condition in activeConnections access
Dec 11, 2025
725e7d4
Fix: Remove duplicate ACCESS_NETWORK_STATE permission
Dec 11, 2025
882fa2f
Docs: Add comments to handshake logic
Dec 11, 2025
0ffc9c2
Feat: UI/UX Improvements (Material Design, Scan, Disconnect)
Dec 11, 2025
6631713
Fix: Perms, Connection Race, and UI Status Logic
Dec 11, 2025
9149be9
Fix variable shadowing and connection race condition
Dec 12, 2025
b1d1aaa
Fix compilation error: remove duplicate closing brace
Dec 12, 2025
09f6146
Fix: Resolve all compilation errors for WearOS Bluetooth support
Dec 14, 2025
2b9c0be
Merge branch 'master' into wearos-bluetooth-support
SBALAVIGNESH123Dec 14, 2025
c59523d
Fix: Add missing BLUETOOTH_CONNECT permission
Dec 15, 2025
eda5727
Merge branch 'wearos-bluetooth-support' of https://github.com/SBALAVI…
Dec 15, 2025
9440651
Merge branch 'master' into wearos-bluetooth-support
SBALAVIGNESH123Dec 16, 2025
22b8895
Fix: Add runtime permission checks for BLUETOOTH_CONNECT
Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Refactor: Use standard MessageHandler for full protocol support (Roun…
…d 3)
  • Loading branch information
SBALAVIGNESH123 committedDec 11, 2025
commitfebb05c8f51cbdf503cb5e9f25a41f56229b650b
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -711,41 +711,13 @@ public void run() {
Log.d(TAG, "Successfully connected via Bluetooth to " + device.getName());

// Create wearable connection wrapper
BluetoothWearableConnection connection = new BluetoothWearableConnection(
socket,
new WearableConnection.Listener() {
private Connect connectMsg;

@Override
public void onConnected(WearableConnection connection) {
// Connection established, wait for handshake
}

@Override
public void onMessage(WearableConnection connection, RootMessage message) {
// Handle incoming protocol messages
if (message.connect != null) {
this.connectMsg = message.connect;
onConnectReceived(connection, message.connect.id, message.connect);
} else if (message.filePiece != null) {
// Only pass digest if this is the final piece
String digest = message.filePiece.finalPiece ? message.filePiece.digest : null;
handleFilePiece(connection, message.filePiece.fileName,
message.filePiece.piece.toByteArray(), digest);
} else {
Log.d(TAG, "Received message: " + message);
}
}

@Override
public void onDisconnected() {
if (connectMsg != null) {
onDisconnectReceived(connection, connectMsg);
}
}
}
);
ConnectionConfiguration config = new ConnectionConfiguration(null, device.getAddress(), device.getName(), 3, true);
MessageHandler messageHandler = new MessageHandler(context, WearableImpl.this, config);
BluetoothWearableConnection connection = new BluetoothWearableConnection(socket, messageHandler);

// Enable auto-close on error
// connection.setListener(messageHandler); // Implied by constructor

// Start message processing thread
new Thread(connection).start();

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp