react-native-ble-manager icon indicating copy to clipboard operation
react-native-ble-manager copied to clipboard

Connection and getConnected functions error

Open OzgunAkkoyun opened this issue 6 years ago • 2 comments

Version

Tell us which versions you are using:

  • react-native-ble-manager: "^6.6.6"
  • react-native : "0.59.9"

Expected behaviour

I trying to only specific device which is bluetooth headphone,but i cant get any connected device or connect this device

Actual behaviour

its giving me error when i get connected devices "No connected peripherals" or connect function with mac adress. Other bounded functions all work fine.

OzgunAkkoyun avatar Jun 21 '19 14:06 OzgunAkkoyun

Hi, I don't think you can get the connection of a bounded device on iOS, on Android use that functions..

marcosinigaglia avatar Jun 21 '19 15:06 marcosinigaglia

Im using in android but i cant get any response in this functions.

OzgunAkkoyun avatar Jun 21 '19 16:06 OzgunAkkoyun

global.isBLEManagerInitialized = false; if (!global.isBLEManagerInitialized) { BleManager.start({showAlert: false}).then(() => { console.error('Module initialized'); global.isBLEManagerInitialized = true; }); }

add this in index.js and make sure BleManager.start will never be called again anywhere in app

rakshitbharat avatar Nov 22 '23 12:11 rakshitbharat