Minor bug: RNBluetoothClassic.isConnected() return true when the Bluetooth was disabled (previously turned on and paired)
See original GitHub issueMobile Device Environment
- Device: Android
- OS: API 29
Application Environment
- React Native version: 0.63.3
- RN Bluetooth Classic version: v0.10.12
Describe the bug The method’s returned value is true although the bluetooth is disabled.
To Reproduce Steps to reproduce the behavior:
- Connect to a bluetooth device
- Turn off the bluetooth feature from your phone.
- use method RNBluetoothClassic.isConnected()
- returned value is true.
Expected behavior The returned value should be false.
Additional context
Severity: Minor.
This may lead to unexpected behavior if the app monitor RNBluetoothClassic.isConnected()
/ RNBluetoothClassic.getConnectedDevice()
.
Full repository: https://github.com/kidfrom/learn-react-native-2/blob/master/record_audio_expo/App.tsx
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
isConnected() doesnt work after app reload · Issue #48 - GitHub
React Native version: v0.61.5; RN Bluetooth Classic version: v0.10.9 ... stays connected, but the isConnected() function returns flase.
Read more >Bluetooth Classic Module - React Native Bluetooth Classic
Requests whether the device Bluetooth adapter is enabled true or disabled false . Copy. try { const enabled = await RNBluetoothClassic.
Read more >Bug #1607390 “Bluetooth shows disabled even when ...
Bluetooth shows disabled even when switched on. Mouse can't connect (Ubuntu 16.04 LTS). Bug #1607390 reported by Mohamed on 2016-07-28.
Read more >react-native-bluetooth-classic - npm
Resolves with the currently connected devices, or rejects if there is none. Writes the provided message to the device.
Read more >react-native bluetooth Connection failed: java.io.IOException ...
Paired ; Has a BluetoothServerSocket open. When using this library you need to: Device 1. Set the library/device to accepting mode:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe that should not be the case. My known competitor support Android 4.1 and up (on Google Play).
Anyway, I will let you know if the problem persist on v1.60.x. I will get back in 2 hours.
I went through the codebase and reverted all the issues based on minSdk from
1.60.x
.There are no longer any failing/warning code analysis items based on min sdk.
I’m going to close this now, I don’t see myself back porting this logic to the
0.10.x
version since I’d like to just get1.60.x
completely working and used.I appreciate all the help you’ve provided.