Comments (14)
+1
In iOS you can switch the camera side, but in Android you can't
from phonegap-plugin-barcodescanner.
It is camera and android specific quirk. Of course you can change which camera should be used via JS, and then also barcode scanner:
cameraDirection property is used to set the camera direction(front/back). You have to add it in the options like this:
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, cameraDirection:1, destinationType: destinationType.DATA_URL}); }
"1" is used for front-facing camera and "2" is used for back-facing camera.
via http://stackoverflow.com/questions/17021601/phonegap-cordova-front-facing-camera-by-default-in-android
But, but...
"Any cameraDirection value results in a back-facing photo."
via http://docs.phonegap.com/en/3.1.0/cordova_camera_camera.md.html#cameraOptions_android_quirks
from phonegap-plugin-barcodescanner.
You are talking about the camera plugin...
The barcodescanner plugin does not accept any options / config as I'm concerned, or does it?
At least I can't find any documentation, that the .scan method would accept options.
from phonegap-plugin-barcodescanner.
As far as we are talking about the iOS side, take a look at #97 😉
from phonegap-plugin-barcodescanner.
@convey-mane #97 adds Android front camera support? seems to me iOS improvements
from phonegap-plugin-barcodescanner.
@MaicolBen That's exactly why I wrote
As far as we are talking about the iOS side
The original poster didn't mention any OS, so … just to be sure 😉
But on iOS, you were right, switching cameras is already possible without my extensions – just added the right icon. Sorry for that!
from phonegap-plugin-barcodescanner.
Indeed, I was also more thinking about android.
Otherwise, I wasn't talking about the camera plugin, but the barcode plugin (which doesn't accept any options; so the camera options are not really helpfull).
from phonegap-plugin-barcodescanner.
from phonegap-plugin-barcodescanner.
Did anybody find a way to use front camera ?
from phonegap-plugin-barcodescanner.
Is there a way to disable camera flipping in the barcode scanner plugin?
from phonegap-plugin-barcodescanner.
Note that in the latest ZXing library release a feature was added to specify the camera id. So once this is updated it's easy to pass it in to Android as well.
from phonegap-plugin-barcodescanner.
To Remove camera flipping in iOS, open CDVBarcodeScanner.mm.
Remove everything associated with flipCamera in CDVBarcodeScanner.mm
from phonegap-plugin-barcodescanner.
Thank you! I ended up commenting it out and doing pretty much just that.
I have yet to get a custom XIB to work - but for now that's working.
from phonegap-plugin-barcodescanner.
This thread has been automatically locked.
from phonegap-plugin-barcodescanner.
Related Issues (20)
- Plugin Crash HOT 5
- Plugin fails to declare ZXing activity HOT 1
- Android: camera not opening HOT 9
- Issue when scanning a GS1-128 barcode with \F (FNC1) terminator HOT 1
- Customize ui HOT 1
- "Close" button don't close the scanner when using overlayXib (iOS) HOT 1
- Scanning Failed : Scan is already in progress HOT 2
- global variable HOT 1
- Accessibility - add button label for the flash button HOT 2
- iOS: datamatrix scan result truncated when code contains null characters HOT 1
- after upgrading to ios 13.4.1 : index.html scan is already in progress HOT 2
- Does this plugin work in angular 8? HOT 1
- encode does not execute success or fail
- cannot installed this plugin over cordova / phonegap
- App crashes when try to open camera HOT 1
- Scanning of vertical barcodes not working on Android in portrait mode
- Unable to build with cordova-plugin-firebase-messaging HOT 1
- Android: Camera doesn't show, blinking elements when using Magni font size
- IOS - get noticed when the the scanning dialog is swiped out HOT 1
- the zxing version of barcodescanner-release-2.1.5.aar is?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phonegap-plugin-barcodescanner.