Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem to implement on expo app. #50

Open
AndreOneti opened this issue Mar 28, 2023 · 7 comments
Open

Problem to implement on expo app. #50

AndreOneti opened this issue Mar 28, 2023 · 7 comments

Comments

@AndreOneti
Copy link
Contributor

I have a problem on use the libon expo app,

image

And i try add permissions
image

But it doesn't work either, can you help me?

@bastengao
Copy link
Owner

Can you upload your code snippet? I think it's not about permission.

@AndreOneti
Copy link
Contributor Author

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
Copy link
Owner

I can't see any thing about SerialPortAPI.

@AndreOneti
Copy link
Contributor Author

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
Copy link

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
Copy link

Did you manage to get this to work in your expo app, @AndreOneti?

@lagschwein
Copy link

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()

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

No branches or pull requests

5 participants