zxing.camera.CameraManager Java Examples
The following examples show how to use
zxing.camera.CameraManager.
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 qrcode_android with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); Log.e("camera", "instance~~~~~~~~"); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); Log.e("camera", "2~~~~~~~~"); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); }
Example #2
Source File: CaptureActivityHandler.java From qrcode_android with GNU Lesser General Public License v3.0 | 5 votes |
public CaptureActivityHandler(IZXingActivity ivew ,CameraManager cameraManager, int decodeMode ) { this.activity = ivew.getActivity(); this.ivew = ivew; decodeThread = new CameraDecodeThread(ivew, decodeMode); decodeThread.start(); state = State.SUCCESS; // Start ourselves capturing previews and decoding. this.cameraManager = cameraManager; cameraManager.startPreview(); restartPreviewAndDecode(); }
Example #3
Source File: CaptureActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 5 votes |
@Override public void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); }
Example #4
Source File: CaptureActivityHandler.java From GOpenSource_AppKit_Android_AS with MIT License | 5 votes |
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: CaptureActivity.java From Gizwits-SmartBuld_Android with MIT License | 5 votes |
@Override public void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); }
Example #6
Source File: CaptureActivityHandler.java From Gizwits-SmartBuld_Android with MIT License | 5 votes |
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 #7
Source File: CaptureActivity.java From Gizwits-SmartSocket_Android with MIT License | 5 votes |
@Override public void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); }
Example #8
Source File: CaptureActivityHandler.java From Gizwits-SmartSocket_Android with MIT License | 5 votes |
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 #9
Source File: CaptureActivity.java From gokit-android with MIT License | 5 votes |
@Override public void onResume() { super.onResume(); // CameraManager must be initialized here, not in onCreate(). This is // necessary because we don't // want to open the camera driver and measure the screen size if we're // going to show the help on // first launch. That led to bugs where the scanning rectangle was the // wrong size and partially // off screen. cameraManager = new CameraManager(getApplication()); handler = null; if (isHasSurface) { // The activity was paused but not stopped, so the surface still // exists. Therefore // surfaceCreated() won't be called, so init the camera here. initCamera(scanPreview.getHolder()); } else { // Install the callback and wait for surfaceCreated() to init the // camera. scanPreview.getHolder().addCallback(this); } inactivityTimer.onResume(); }
Example #10
Source File: CaptureActivityHandler.java From gokit-android with MIT License | 5 votes |
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 #11
Source File: CaptureActivity.java From qrcode_android with GNU Lesser General Public License v3.0 | 4 votes |
@Override public CameraManager getCameraManager() { return cameraManager; }
Example #12
Source File: CaptureActivity.java From GOpenSource_AppKit_Android_AS with MIT License | 4 votes |
public CameraManager getCameraManager() { return cameraManager; }
Example #13
Source File: CaptureActivity.java From Gizwits-SmartBuld_Android with MIT License | 4 votes |
public CameraManager getCameraManager() { return cameraManager; }
Example #14
Source File: CaptureActivity.java From Gizwits-SmartSocket_Android with MIT License | 4 votes |
public CameraManager getCameraManager() { return cameraManager; }
Example #15
Source File: CaptureActivity.java From gokit-android with MIT License | 4 votes |
public CameraManager getCameraManager() { return cameraManager; }
Example #16
Source File: IZXingActivity.java From qrcode_android with GNU Lesser General Public License v3.0 | votes |
CameraManager getCameraManager();