question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minor bug: RNBluetoothClassic.isConnected() return true when the Bluetooth was disabled (previously turned on and paired)

See original GitHub issue

Mobile 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:

  1. Connect to a bluetooth device
  2. Turn off the bluetooth feature from your phone.
  3. use method RNBluetoothClassic.isConnected()
  4. 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:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kidfromcommented, Dec 7, 2020

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.

0reactions
kenjdavidsoncommented, Jan 14, 2021

I went through the codebase and reverted all the issues based on minSdk from 1.60.x.

  • Streams
  • BiConsume (the java.util.Function package)
  • Etc

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 get 1.60.x completely working and used.

I appreciate all the help you’ve provided.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found