ZXing android use front camera -


i'm trying build qr code reader following tutorial

http://code.tutsplus.com/tutorials/android-sdk-create-a-barcode-reader--mobile-17162

i managed working, except need camera front camera of device instead of rear camera. can't find place in tutorial allows me change this. tried following this answer, still not work.

mainly, issue importing library. following error.

operator not allowed source level below 1.7 

when set compiler settings 1.7, this

android requires compiler compliance level 5.0 or 6.0. found '1.7' instead 

i'm not proficient android , apologize if might not question.

so, way me use zxing front camera in app? links?

thank much.

the source code uses java 7. android not require java <= 6. can see build provided in project happily feeds java 7 bytecode dex , produces working app. not sure tool using suggests otherwise. maybe old.

you should not need copy , compile project's code though. why necessary? use core.jar file.

you don't need of use front camera. invoke intent (https://github.com/zxing/zxing/wiki/scanning-via-intent) , set scan_camera_id id of camera want -- 1 front one.

example:

        intent.putextra("scan_mode", "qr_code_mode");         intent.putextra("scan_camera_id", 1); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -