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

Get/use bluetooth device from OS #23

Open
KannarFr opened this issue Nov 13, 2019 · 5 comments
Open

Get/use bluetooth device from OS #23

KannarFr opened this issue Nov 13, 2019 · 5 comments

Comments

@KannarFr
Copy link

Hi,

There is a way to get the deviceInfo from already connected bluetooth device when launching EscPos and then EscPos.connect easily without listeners on device connection?

Alex.

@KannarFr KannarFr reopened this Nov 13, 2019
@KannarFr
Copy link
Author

@leesiongchan ^

@KannarFr
Copy link
Author

Using another lib?

@KannarFr
Copy link
Author

KannarFr commented Nov 14, 2019

Or simply using the bluetoothDeviceFound listener, but it doesn't work, only the bluetoothStateChanged works on connection from Android bluetooth settings.

@KannarFr
Copy link
Author

KannarFr commented Nov 14, 2019

Another question: (I'm trying to debug) how to print react-native-esc-pos logs to JS server which is running an application using this library? Probably just a loglevel or a mode to set?

@leesiongchan
Copy link
Owner

leesiongchan commented Nov 15, 2019

There is a way to get the deviceInfo from already connected bluetooth device when launching EscPos and then EscPos.connect easily without listeners on device connection?

Probably we could expose a new API connectedDevices. I will need to refer to one of the famous lib (https://polidea.github.io/react-native-ble-plx/#blemanagerdevices).

Another question: (I'm trying to debug) how to print react-native-esc-pos logs to JS server which is running an application using this library? Probably just a loglevel or a mode to set?

Agree with your suggestion, a debug: boolean option could probably be beneficial to the developer.

I am in the midst of rewriting the codebase, but I have very little time on this project as of now, if that is something bothering you probably will need your help on contributing to the project 💯

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

2 participants