Java Code Examples for zxing.utils.CaptureActivityHandler

The following examples show how to use zxing.utils.CaptureActivityHandler. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Gizwits-SmartSocket_Android   Source File: CaptureActivity.java    License: MIT License 6 votes vote down vote up
/**
 * A valid barcode has been found, so give an indication of success and show
 * the results.
 * 
 * @param rawResult
 *            The contents of the barcode.
 * 
 * @param bundle
 *            The extras
 */
public void handleDecode(Result rawResult, Bundle bundle) {
	String text = rawResult.getText();
	Log.i("test", text);
	if (text.contains("product_key=") & text.contains("did=")
			&& text.contains("passcode=")) {

		inactivityTimer.onActivity();
		product_key = getParamFomeUrl(text, "product_key");
		did = getParamFomeUrl(text, "did");
		passcode = getParamFomeUrl(text, "passcode");
		Log.i("passcode product_key did", passcode + " " + product_key
				+ " " + did);
		ToastUtils.showShort(this, "扫码成功");
		mHandler.sendEmptyMessage(handler_key.START_BIND.ordinal());

	} else {
		handler = new CaptureActivityHandler(this, cameraManager,
				DecodeThread.ALL_MODE);
	}
}