zxing.decoding.DecodeThread Java Examples

The following examples show how to use zxing.decoding.DecodeThread. 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 File: CaptureActivity.java    From Gizwits-SmartSocket_Android with 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);
	}
}
 
Example #2
Source File: CaptureActivityHandler.java    From GOpenSource_AppKit_Android_AS with MIT License 5 votes vote down vote up
public CaptureActivityHandler(CaptureActivity activity, CameraManager cameraManager, int decodeMode) {
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeMode);
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}
 
Example #3
Source File: CaptureActivityHandler.java    From Gizwits-SmartBuld_Android with MIT License 5 votes vote down vote up
public CaptureActivityHandler(CaptureActivity activity, CameraManager cameraManager, int decodeMode) {
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeMode);
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}
 
Example #4
Source File: CaptureActivityHandler.java    From Gizwits-SmartSocket_Android with MIT License 5 votes vote down vote up
public CaptureActivityHandler(CaptureActivity activity, CameraManager cameraManager, int decodeMode) {
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeMode);
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}
 
Example #5
Source File: CaptureActivityHandler.java    From gokit-android with MIT License 5 votes vote down vote up
public CaptureActivityHandler(CaptureActivity activity, CameraManager cameraManager, int decodeMode) {
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeMode);
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}