Closed NEOCG closed 3 years ago
I have not looked at React for a long time but request you to please look at the following branch where I have tried to update my test project to use 0.63.3, https://github.com/darryncampbell/DataWedgeReactNative/tree/update_react-native_63_3. It seems to work for me but as I say, my React Native knowledge may be a bit out of date.
tried it with react native 0.63.2 and worked like a charm, the only problem that I encountered is the fact that I receive multiple intents for the same scan event, but I was able to filter them by the time when the scan was made (the time that comes with the intents).
Which device are you using?
Zebra tc26, scanner on it is SE4100, data wedge version 8.4. Tried with the demo app from git and I received one intent per scan, but whe I tried it in my app that uses the newer version of react native there are times when I get one intent and times when I get lots of intents.
You should only be getting a single Intent regardless of the version of react native - I (think) I updated the demo app to the latest at https://github.com/darryncampbell/DataWedgeReactNative/tree/update_react-native_63_3 and it seems to work fine for me so I don't know what is causing your multiple Intents to be received. It does ring a bell as an issue that has happened before but I don't remember what the resolution was (if any)
Did you upgrade it with the upgrade tool from react native? Because I tried the code from the demo app in my app also and it behaved the same as far as I remember. Will try to upgrade the demo app when I get the chance, maybe it's just something with my app
Hello Darryn,
thanks for the fast respond.
I've looked at the example implementation and it runs on a PC with nodejs 12. What irritates me is that the app dosn't stopped on breakpoint - at least that's how it is in WebStorm. I will now implement Redux and then check whether the ReduxState changes in the same way as the State changed in your example.
I have one more request: gradlew check fails with the message that the targetSdkVersion is 21. There should be at least 26 here (https://medium.com/codespace69/google-play-warning-app-must-target-at-least-api-level-26-to-ensure-it-is-built-on- the-latest-7a8729d70679). Can you this modified? Then I could give up the fork again.
Many thanks Rene
Hi @NEOCG , where is target SDK 21 specified?
Resolved by https://github.com/darryncampbell/react-native-datawedge-intents/pull/11 and published as 0.1.3, https://www.npmjs.com/package/react-native-datawedge-intents/v/0.1.3
Hi Darryn, thank you for your support, your sample works now fine on my Environment. And thank you for your version update.
Hi Darryn,
In the first version I was able to use the hand scanner well following your instructions. This was the react / react native version "react": "16.8.1", "react-native": "0.57.8", "react-native-datawedge-intents": "0.1.1"
I packed everything you showed in the example into a class and instantiated it once centrally in the App.js. After that I can in the method
barcodeScanned (scanData: any) { let scannedData: any = scanData ["com.symbol.datawedge.data_string"]; let scannedType: any = scanData ["com.symbol.datawedge.label_type"]; store.dispatch ({type: ReduxActionTypes.SET_SCAN_CODE_REQUEST, scanCode: {scannedData: scannedData, scannedType: scannedType}});
intercept the scanned value and process it further in the application.
Now I had to raise the react-native version because I need react-native-v8, so I switched to the current version of react/react-native and react-native-datawedge-intents right away.
However, there is no longer any output in the console, so that I no longer have a central point to intercept the scanner values - I am really at a loss.
Thanks Rene