Problem to implement on expo app.
Opened this issue · 7 comments
AndreOneti commented
bastengao commented
Can you upload your code snippet? I think it's not about permission.
AndreOneti commented
I Just implement this funcition
import SerialPortAPI from 'react-native-serial-port-api';
async function example() {
const devices = await devicePathsAsync()
console.log(devices)
}
example()
bastengao commented
I can't see any thing about SerialPortAPI.
AndreOneti commented
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 []
juanstan commented
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
larshanskrause commented
Did you manage to get this to work in your expo app, @AndreOneti?
lagschwein commented
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()