Closed aajahid closed 11 months ago
This interface is only suitable for determining Sunmi devices. You need to use getBrand in react-native-device-info to determine whether it is a Sunmi device.
Actually found the hasPrinter
works on other devices without crashing.
So before any print event - I just need to check hasPrinter
This actually solve my issue - on non Sunmi device - its always false.
Thank you @Surile for the library, really helpful.
We are working on an app that will run on generic android devices and also on Sunmi devices. Our expectation -
On Sunmi device - its working fine. But on non Sunmi device its crashing. I either need a way to detect if the app is running on a Sunmi device or support for
try catch
On non Sunmi devices - it doesn't have the SDK's and it throws android native
null object reference
. Putting the print function withtry catch
can't catch the native library exception.Any idea how would I be able to