januslo / react-native-sunmi-inner-printer

http://docs.sunmi.com/htmls/index.html?lang=zh##V1文档资源 根据商米V1文档开发的热敏打印
MIT License
74 stars 121 forks source link

PrinterStatus #35

Open mmunozha opened 6 years ago

mmunozha commented 6 years ago

Hi there!!, i've been doing some testing with the plugin and it works great, the only thing a recently discoverd is that the PrinterStatus listener only gets invoke when i open the cover or the printer sends a 'no paper' alert. The code i use is the one from the example, i added and set a "printerOk" state when getting the " SunmiInnerPrinter.Constants.NORMAL_ACTION" action to true, by default and on other actions it's set to false, so when i start the app and have all up and running, printer wise, it's not printing, because the listener didn't got evoke, i thought that the componentWillMount was not getting triggerd but i added and alert and it works fine.

Am i missing something?

Thanks in advance!

januslo commented 6 years ago

Try to add a timeout to delay the execution?

发自我的 iPhone

在 2018年10月11日,下午8:25,Mauro notifications@github.com 写道:

Hi there!!, i've been doing some testing with the plugin and it works great, the only thing a recently discoverd is that the PrinterStatus listener only gets invoke when i open the cover or the printer sends a 'no paper' alert. The code i use is the one from the example, i added and set a "printerOk" state when getting the " SunmiInnerPrinter.Constants.NORMAL_ACTION" action to true, by default and on other actions it's set to false, so when i start the app and have all up and running, printer wise, it's not printing, because the listener didn't got evoke, i thought that the componentWillMount was not getting triggerd but i added and alert and it works fine.

Am i missing something?

Thanks in advance!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

januslo commented 5 years ago

@mmunozha any update ?