当前位置: 首页>>代码示例>>Java>>正文


Java CameraManager.startPreview方法代码示例

本文整理汇总了Java中com.google.zxing.client.android.camera.CameraManager.startPreview方法的典型用法代码示例。如果您正苦于以下问题:Java CameraManager.startPreview方法的具体用法?Java CameraManager.startPreview怎么用?Java CameraManager.startPreview使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.zxing.client.android.camera.CameraManager的用法示例。


在下文中一共展示了CameraManager.startPreview方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       Map<DecodeHintType,?> baseHints,
                       String characterSet,
                       CameraManager cameraManager) {
  this.activity = activity;
  decodeThread = new DecodeThread(activity, decodeFormats, baseHints, characterSet,
      new ViewfinderResultPointCallback(activity.getViewfinderView()));
  decodeThread.start();
  state = State.SUCCESS;

  // Start ourselves capturing previews and decoding.
  this.cameraManager = cameraManager;
  cameraManager.startPreview();
  restartPreviewAndDecode();
}
 
开发者ID:PhilippC,项目名称:keepass2android,代码行数:17,代码来源:CaptureActivityHandler.java

示例2: BarcodeReaderHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
BarcodeReaderHandler(BarcodeReaderView barcodeReaderView,
                     Collection<BarcodeFormat> decodeFormats,
                     Map<DecodeHintType, ?> baseHints,
                     String characterSet,
                     ResultPointCallback resultPointCallback,
                     CameraManager cameraManager) {
    this.barcodeReaderView = barcodeReaderView;
    decodeThread = new DecodeThread(barcodeReaderView, decodeFormats, baseHints, characterSet, resultPointCallback);
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:CoderChoy,项目名称:BarcodeReaderView,代码行数:17,代码来源:BarcodeReaderHandler.java

示例3: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
        Collection<BarcodeFormat> decodeFormats,
        Map<DecodeHintType, ?> baseHints, String characterSet,
        CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, baseHints,
            characterSet, new ViewfinderView.ViewfinderResultPointCallback(
                    activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:chenkel,项目名称:Lokalisierung-mit-Wearables,代码行数:17,代码来源:CaptureActivityHandler.java

示例4: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       Map<DecodeHintType, ?> baseHints,
                       String characterSet,
                       CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, baseHints, characterSet,
            new ViewfinderResultPointCallback(activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:yingLanNull,项目名称:ZxingLite,代码行数:17,代码来源:CaptureActivityHandler.java

示例5: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                        Collection<BarcodeFormat> decodeFormats,
                        String characterSet,
                        CameraManager cameraManager) {
fakeR = new FakeR(activity);
   this.activity = activity;
   decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
       new ViewfinderResultPointCallback(activity.getViewfinderView()));
   decodeThread.start();
   state = State.SUCCESS;

   // Start ourselves capturing previews and decoding.
   this.cameraManager = cameraManager;
   cameraManager.startPreview();
   restartPreviewAndDecode();
 }
 
开发者ID:atomsheep,项目名称:sres-app,代码行数:17,代码来源:CaptureActivityHandler.java

示例6: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       Map<DecodeHintType, ?> baseHints, String characterSet,
                       CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, baseHints,
            characterSet, new ViewfinderResultPointCallback(
            activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:raahilshah,项目名称:ProjectKilo,代码行数:17,代码来源:CaptureActivityHandler.java

示例7: CaptureFragmentHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
public CaptureFragmentHandler(BarcodeFragment activity,
                              Collection<BarcodeFormat> decodeFormats,
                              Map<DecodeHintType, ?> baseHints,
                              String characterSet,
                              CameraManager cameraManager) {
  this.activity = activity;
  decodeThread = new DecodeThread(activity, decodeFormats, baseHints, characterSet,
      new ViewfinderResultPointCallback(activity.getViewfinderView()));
  decodeThread.start();
  state = State.SUCCESS;

  // Start ourselves capturing previews and decoding.
  this.cameraManager = cameraManager;
  cameraManager.startPreview();
  restartPreviewAndDecode();
}
 
开发者ID:bushidowallet,项目名称:bushido-android-app,代码行数:17,代码来源:CaptureFragmentHandler.java

示例8: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
        Collection<BarcodeFormat> decodeFormats,
        Map<DecodeHintType, ?> baseHints, String characterSet,
        CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, baseHints,
            characterSet, new ViewfinderResultPointCallback(
                    activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:corneliudascalu,项目名称:google-glass-share-barcode-bluetooth,代码行数:17,代码来源:CaptureActivityHandler.java

示例9: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
public CaptureActivityHandler(CaptureActivity activity,
        Collection<BarcodeFormat> decodeFormats,
        Map<DecodeHintType, ?> baseHints, String characterSet,
        CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, baseHints,
            characterSet, new ViewfinderResultPointCallback(
            activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:pt2121,项目名称:NYC-Glass-Challenge-Oct2014,代码行数:17,代码来源:CaptureActivityHandler.java

示例10: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       String characterSet,
                       CameraManager cameraManager)
{
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
			new ViewfinderResultPointCallback(activity.getViewfinderView()));
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}
 
开发者ID:Abolitionist-Project,项目名称:MediModo-Android,代码行数:17,代码来源:CaptureActivityHandler.java

示例11: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(AppInvCaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       String characterSet,
                       CameraManager cameraManager) {
  this.activity = activity;
  decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
      new ViewfinderResultPointCallback(activity.getViewfinderView()));
  decodeThread.start();
  state = State.SUCCESS;

  // Start ourselves capturing previews and decoding.
  this.cameraManager = cameraManager;
  cameraManager.startPreview();
  restartPreviewAndDecode();
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:16,代码来源:CaptureActivityHandler.java

示例12: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity, Collection<BarcodeFormat> decodeFormats,
		Map<DecodeHintType, ?> baseHints, String characterSet, CameraManager cameraManager) {
	this.activity = activity;
	decodeThread = new DecodeThread(activity, decodeFormats, baseHints, characterSet,
			new ViewfinderResultPointCallback(activity.getViewfinderView()));
	decodeThread.start();
	state = State.SUCCESS;

	// Start ourselves capturing previews and decoding.
	this.cameraManager = cameraManager;
	cameraManager.startPreview();
	restartPreviewAndDecode();
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:14,代码来源:CaptureActivityHandler.java

示例13: openDriver

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
private void openDriver(SurfaceHolder surfaceHolder) {
    notifyListenerPrepareOpen();
    if (surfaceHolder == null)
        return;// 已经销毁
    if (isOpen())
        return;// 摄像头已经打开
    if (Compat.checkSelfPermission(getContext(), Manifest.permission.CAMERA)
            == PackageManager.PERMISSION_DENIED) {
        mErrorCode = ERROR_CODE_1;
        notifyListenerError();
        return;
    }
    mCameraManager = new CameraManager(getContext());
    if (mCameraId != OpenCameraInterface.NO_REQUESTED_CAMERA)
        mCameraManager.setManualCameraId(mCameraId);
    final int width = mScanWidth == ViewGroup.LayoutParams.MATCH_PARENT ? getWidth() :
            (mScanWidth > getWidth() ? getWidth() : mScanWidth);
    final int height = mScanHeight == ViewGroup.LayoutParams.MATCH_PARENT ? getHeight() :
            (mScanHeight > getHeight() ? getHeight() : mScanHeight);
    mCameraManager.setManualFramingRect(width, height);
    try {
        mCameraManager.openDriver(surfaceHolder);
        mCameraManager.startPreview();
        mScanHandler = new ScanHandler(resultListener, mBarcodeType, mBaseHints,
                mCharacterSet, mCameraManager,
                resultPointCallback);
    } catch (Exception e) {
        mErrorCode = ERROR_CODE_0;
        notifyListenerError();
        return;
    }
    mAmbientLightManager.resume();
    notifyListenerOpened();
}
 
开发者ID:AlexMofer,项目名称:ProjectX,代码行数:35,代码来源:ZxingScanView.java

示例14: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity,
                       Collection<BarcodeFormat> decodeFormats,
                       String characterSet,
                       CameraManager cameraManager) {
  this.activity = activity;
  decodeThread = new DecodeThread(activity, decodeFormats, characterSet,
      new ViewfinderResultPointCallback(activity.getViewfinderView()));
  decodeThread.start();
  state = State.SUCCESS;

  // Start ourselves capturing previews and decoding.
  this.cameraManager = cameraManager;
  cameraManager.startPreview();
  restartPreviewAndDecode();
}
 
开发者ID:credentials,项目名称:zxing_android_qr,代码行数:16,代码来源:CaptureActivityHandler.java

示例15: CaptureActivityHandler

import com.google.zxing.client.android.camera.CameraManager; //导入方法依赖的package包/类
CaptureActivityHandler(CaptureActivity activity, Collection<BarcodeFormat> decodeFormats, String characterSet,
        CameraManager cameraManager) {
    this.activity = activity;
    decodeThread = new DecodeThread(activity, decodeFormats, characterSet, new ViewfinderResultPointCallback(
            activity.getViewfinderView()));
    decodeThread.start();
    state = State.SUCCESS;

    // Start ourselves capturing previews and decoding.
    this.cameraManager = cameraManager;
    cameraManager.startPreview();
    restartPreviewAndDecode();
}
 
开发者ID:thomas-bornschlegel,项目名称:AndroidMultiChannelMiddleware,代码行数:14,代码来源:CaptureActivityHandler.java


注:本文中的com.google.zxing.client.android.camera.CameraManager.startPreview方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。