From 1baa8f7baa336ce7e78d4b8389a351526cb8c673 Mon Sep 17 00:00:00 2001 From: yy1717 <fctom1215@outlook.com> Date: 星期三, 25 十一月 2020 15:10:39 +0800 Subject: [PATCH] 蓝牙密码 --- lib/src/main/java/com/anyun/exam/lib/util/BluetoothChatService.java | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/src/main/java/com/anyun/exam/lib/util/BluetoothChatService.java b/lib/src/main/java/com/anyun/exam/lib/util/BluetoothChatService.java index 3cd6e67..7d3fc13 100644 --- a/lib/src/main/java/com/anyun/exam/lib/util/BluetoothChatService.java +++ b/lib/src/main/java/com/anyun/exam/lib/util/BluetoothChatService.java @@ -35,7 +35,7 @@ * This class does all the work for setting up and managing Bluetooth * connections with other devices. It has a thread that listens for * incoming connections, a thread for connecting with a device, and a - * thread for performing data transmissions when connected. + * thread for amperforming data transmisspions when connected. */ public class BluetoothChatService { // Debugging @@ -212,6 +212,12 @@ msg.setData(bundle); mHandler.sendMessage(msg); + msg = mHandler.obtainMessage(Constants.MESSAGE_DEVICE_ADDRESS); + bundle = new Bundle(); + bundle.putString(Constants.DEVICE_ADDRESS, device.getAddress()); + msg.setData(bundle); + mHandler.sendMessage(msg); + setState(STATE_CONNECTED); // Start the thread to manage the connection and perform transmissions -- Gitblit v1.8.0