ZX ing Multi-format 1D/2D barcode image processing library with clients for Android, Java This is Harry’s learning material about barcode, which he knew nothing about before
It’s all about QR code First created in Japan, 1994. used for tracking parts in vehicle manufacturing Usage nowadays commercial tracking mobile tagging Role – information carrier Text based info, including URL, contact info etc.
Mobile Tagging URL Contact information SMS Text Even MORE to come….. NOTE: Microsoft Tag is more creative, it is even colorful tagging!!!
Barcode Scanner(from ZXing team) Project hosting http://code.google.com/p/zxing / How to use Call via Intent(if barcode scanner is installed) -- easy Call via Intent(if not installed, link to the app’s URL to Android Market)--easy Embedding in your own app(applicable but not easy)
Consistent UI There are 2 types of UI, which need to be modified in order to have consistent UI Scan UI ViewFinderView.java Result UI Should be a customized UI
Embedding call - 1 public final Button.OnClickListener mScanQRCode = new Button.OnClickListener () { public void onClick (View v) { Intent intent = new Intent(" com.google.zxing.client.android.SCAN "); intent.putExtra ("SCAN_MODE", "QR_CODE_MODE"); startActivityForResult (intent, 0); } };
Embedding call - 2 @Override 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"); showDialog ( R.string. result_succeeded , "Format: " + format + "\ nContents : " + contents); } else if ( resultCode == RESULT_CANCELED) { showDialog ( R.string. result_failed , getString ( R.string.result_failed_why )); } } }
m ore to come I am still diving in the code. I try and clear it up. Will give more info soon.