Skip to content
This repository has been archived by the owner on Aug 19, 2021. It is now read-only.

How can I implement ScanDevices()? #72

Closed
thiagopeluque opened this issue Feb 15, 2021 · 1 comment
Closed

How can I implement ScanDevices()? #72

thiagopeluque opened this issue Feb 15, 2021 · 1 comment

Comments

@thiagopeluque
Copy link

thiagopeluque commented Feb 15, 2021

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

@thiagopeluque
Copy link
Author

Anyone have an example??? please!!!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant