Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59f8064 commit d1026d3Copy full SHA for d1026d3
1 file changed
app/src/main/java/com/inuker/bluetooth/MainActivity.java
@@ -5,6 +5,7 @@
5
import android.view.View;
6
import android.widget.TextView;
7
8
+import com.inuker.bluetooth.library.connect.listener.BluetoothStateListener;
9
import com.inuker.bluetooth.library.search.SearchRequest;
10
import com.inuker.bluetooth.library.search.SearchResult;
11
import com.inuker.bluetooth.library.search.response.SearchResponse;
@@ -52,6 +53,13 @@ public void onRefresh() {
52
53
});
54
55
searchDevice();
56
+
57
+ ClientManager.getClient().registerBluetoothStateListener(new BluetoothStateListener() {
58
+ @Override
59
+ public void onBluetoothStateChanged(boolean openOrClosed) {
60
+ BluetoothLog.v(String.format("onBluetoothStateChanged %b", openOrClosed));
61
+ }
62
+ });
63
}
64
65
private void searchDevice() {
0 commit comments