Integrating ZXing for Glass Release into Android Studio project -
Integrating ZXing for Glass Release into Android Studio project -
i'm working on qr code scanning on google glass. i've used zxing in android , happy find google glass port has been released recently.
i've downloaded , installed apk on glass , works great. having problem incorporating project own project. there no maven resource , i've tried importing module without success.
i've tried incorporating code project, range of compilation errors such as:
error:(109, 43) type parameter com.google.zxing.decodehinttype not within bound error:(163, 44) cannot find symbol method decode(com.google.zxing.binarybitmap,java.util.map).
here link provided release - https://github.com/zxing/zxing/releases/tag/bsglass-0.2.1 - have suggestions on how create app sample 1 using provided code?
thanks in advance.
use "intent" in activity start qr scanner (zxing) on google glass:
intent intent = new intent("com.google.zxing.client.android.scan"); intent.putextra("scan_mode", "qr_code_mode"); startactivityforresult(intent, 0); you have handle results returned scan.
public void onactivityresult(int requestcode, int resultcode, intent intent) { if (requestcode == 0) { if (resultcode == result_ok) { string contents = intent.getstringextra("scan_result"); string format = intent.getstringextra("scan_result_format"); card card = new card(this); card.settext(contents); view cardview = card.getview(); setcontentview(cardview); } else if (resultcode == result_canceled) { // handle cancel } } } you need create changes androidmanifest.xml
this blog job @ explaining need -> http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/does
zxing google-glass
Comments
Post a Comment