react-native-serial-port-api
react-native-serial-port-api copied to clipboard
Problem to implement on expo app.
I have a problem on use the libon expo app,

And i try add permissions

But it doesn't work either, can you help me?
Can you upload your code snippet? I think it's not about permission.
I Just implement this funcition
import SerialPortAPI from 'react-native-serial-port-api';
async function example() {
const devices = await devicePathsAsync()
console.log(devices)
}
example()
I can't see any thing about SerialPortAPI.
I can fix this error, i generated an build using the flag developmentClient in eas.json after install the lib.
But now, the software not list the device connected and it's always return []
It is happening to me. I had the impression that the plugin is no link properly in expo. Could you give me some advise to resolve this issue?
Thank you
Did you manage to get this to work in your expo app, @AndreOneti?
I Just implement this funcition
import SerialPortAPI from 'react-native-serial-port-api'; async function example() { const devices = await devicePathsAsync() console.log(devices) } example()
I believe that devicePathsAsync() is a static function of the SerialPortAPI class. So you would have to call it like this
const devices = await SerialPortAPI.devicePathsAsync()