insightautos / cordova-gmv-barcode-scanner

A Cordova barcode scanning plugin based on the Google Mobile Vision library for iOS & Android.
MIT License
52 stars 77 forks source link

Flashlight fix #3

Closed zisiszaverdas closed 6 years ago

zisiszaverdas commented 6 years ago

fixes #1 using the following method https://github.com/dealrinc/cordova-gmv-barcode-scanner/blob/60ddcd89165dfc0d58ce95976cc79a28cda4c6df/src/android/src/gmvScanner/ui/camera/CameraSource.java#L574

the above method does not require android 6.0 and above because it use the android.hardware.Camera instead of android.hardware.Camera2, in case of future needed upgrade there is this repository https://github.com/EzequielAdrianM/Camera2Vision as a sample.

i have tested and it works on 2 devices using android 7.0

forrestmid commented 6 years ago

@zisiszaverdas thanks for submitting that! I want to build it in the simulator prior to merging the pull request since I know very little about Android and don't want a build error, but then I'll take your word for it that the torch works since I don't have a device to test it on myself. Thanks for helping out!

I should be able to test it tomorrow sometime.