How can I implement ScanDevices()?
thiagopeluque opened this issue · comments
I tried to do like this
useEffect(() => {
async function init() {
const devices = await BluetoothSerial.scanDevices();
setDeviceList(devices);
console.log(deviceList);
}
init();
return () => {
async function remove() {
await BluetoothSerial.stopScan();
console.log('Stop Scan');
}
remove();
};
}, []);
It´s return an empty array
Anyone have an example??? please!!!