januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
351 stars 411 forks source link

check if the paired printer is available to connect ? #165

Open hikaaam opened 2 years ago

hikaaam commented 2 years ago

when i use BluetoothManager.scanDevices()

its return paired and found

both have parameter name and address but on found the already paired devices is not on the list. i want to know if the device is available to connect or not without using the connect() function so i can make the paired list have red or green circle (if red mean the device is out of reach or turn off)

so i expect something like

the paired return 3 paramater

{
name:'the device name',
address:'the device address',
active:'a boolean if the device is connectable or not'
}

i thought i was able to bypass this by using the searching paired item on the found but i realize the already paired device is not inside found.

can you add this feature ?

thank you