ideacreation / react-native-barcodescanner

A barcode scanner component for react native - not maintained anymore - use react-native-camera
MIT License
537 stars 162 forks source link

Upgrade to me.dm7.barcodescanner:zxing:1.8.4 #21

Closed mygu closed 8 years ago

mygu commented 8 years ago

How to do?

WillemStaels commented 8 years ago

Just tried to update it by changing the version in the node_modules/react-native-barcodescanner/android/build.grade file:

compile 'me.dm7.barcodescanner:zxing:1.8.4'

The issue is that it is compiling but not showing the view in React. When toggling the Inspector (Shake to bring up the menu), it shows the view... Reload JS hides the view again. Would love to upgrade to 1.8.4 for continuous scanning...

mygu commented 8 years ago

@WillemStaels I tried update the build.grade file but it can not work. And I think open the scanning too slow on this version.

andreaskeller commented 8 years ago

@mygu @WillemStaels you could try and use branch version-2 which is a rewrite to not use dm77/barcodescanner anymore as with a project of mine there was an error in a part of the library which I could not fix easily. The code is based on dm77/barcodescanner version 1.8.4, so should use continuous scanning. You can include the following in your package.json:

"react-native-barcodescanner": "git+https://github.com/ideacreation/react-native-barcodescanner/#version-2",

hope that helps.

WillemStaels commented 8 years ago

Let me try this today, I'll ping back with the results! Thank you @andreaskeller!

WillemStaels commented 8 years ago

@mygu True. Never been too much in Android development before but it's weird that everything related to barcodes / QR uses zxing or anything based on it...

WillemStaels commented 8 years ago

Works like a charm: stable and fast. Thank you!

mygu commented 8 years ago

@andreaskeller @WillemStaels Ok. Thanks for all ~