darryncampbell / react-native-datawedge-intents

React Native interface for Zebra's DataWedge Intent API
MIT License
43 stars 46 forks source link

Can't seem to recieve intent #23

Open dfcarpenter opened 2 years ago

dfcarpenter commented 2 years ago

To start thanks for the great library.

I'm using a Zebra TC26 and trying to write a small custom barcode scanning app to use in a private CBRS network and I have run into some issues. Basically I can't get it to receive the intents and I am not sure what is going on. Your React Native sample app seems to work as intended but the exact same app logic on RN0.66 does not work. I'm not entirely sure it's just an issue of RN0.66 or perhaps something else. I would like to use the latest version of RN if possible ( along with React v17+ ) because of peer dependencies of a few important libraries like React Navigation along with some others required by the project.

To demonstrate what I am talking about I created a new react native project and basically used the same libraries you have ( with some using updated versions ).

https://github.com/dfcarpenter/rn066datawedge

This will not receive intent data from scan being toggled at least on the TC26

I took some screenshots of the logs coming from your exact react-native Datawedge sample project running RN 0.64 zebra-tc26-rn064

And this does work. Below is a screenshot of the logs coming from the 0.66 version running similar code ( with a few additions like mobx so this is why I also created a fresh project without the other libraries and this also doesn't receive intents

zebra-tc26-RN066 Basically a press of the scan fires off the intent but never receives anything back. Successive presses of the scan button fires off the same thing but never receives anything.

Not sure if you have any insights here or thoughts on what what I would need to change but any feedback would be welcome.

darryncampbell commented 2 years ago

Hi, please change this line: https://github.com/dfcarpenter/rn066datawedge/blob/master/App.js#L187 to "PACKAGE_NAME": "com.rn066datawedge". The DataWedge profile is being created successfully but is not being applied when your app is in the foreground because you still have the old demo app associated with it.