List of usage examples for android.view SurfaceHolder removeCallback
public void removeCallback(Callback callback);
From source file:com.jwetherell.QRComm575.DecoderActivity.java
@Override protected void onPause() { super.onPause(); Log.v(TAG, "onPause()"); if (handler != null) { handler.quitSynchronously();/*from w ww .ja va2s . c o m*/ handler = null; } cameraManager.closeDriver(); if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } }
From source file:com.jwetherell.quick_response_code.DecoderActivity.java
@Override protected void onPause() { super.onPause(); if (handler != null) { handler.quitSynchronously();// w w w . j av a 2s . com handler = null; } cameraManager.closeDriver(); if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } }
From source file:com.kupay.decoder.DecoderActivity.java
@Override public void onPause() { super.onPause(); Log.v(TAG, "onPause() DA"); if (handler != null) { Log.v("app", "El handeler no es nulo"); handler.quitSynchronously();/*from w w w .j ava2 s.c om*/ handler = null; } cameraManager.closeDriver(); if (!hasSurface) { Log.v("app", "No hay superficie<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } }
From source file:com.kupay.decoder.DecoderActivity.java
public void reStartCamera() { if (cameraManager == null) { //cameraManager = new CameraManager(getActivity().getApplicationContext()); Log.v(TAG, "En reStart cameraManager es nullo"); } else {// w w w . j a va2 s .co m Log.v(TAG, "En reStart viewfinderView NO es nullo"); } if (viewfinderView == null) { Log.v(TAG, "En reStart viewfinderView es nullo"); // viewfinderView = (ViewfinderView) getView().findViewById(R.id.viewfinder_view); //viewfinderView.setCameraManager(cameraManager); } else { Log.v(TAG, "En reStart viewfinderView NO es nullo"); } if (handler != null) { handler.quitSynchronously(); handler = null; } Log.v(TAG, "SufaceView: " + surfaceView); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); initCamera(surfaceHolder); }
From source file:com.google.zxing.demo.CaptureActivity.java
@Override protected void onPause() { if (handler != null) { handler.quitSynchronously();//from w w w . jav a 2 s . co m handler = null; } inactivityTimer.onPause(); // ambientLightManager.stop(); beepManager.close(); cameraManager.closeDriver(); // historyManager = null; // Keep for onActivityResult if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } super.onPause(); }
From source file:com.abhi.barcode.fragment.BarCodeFragment.java
public void stopCameraCapture() { if (handler != null) { handler.quitSynchronously();// w w w . ja v a2 s . co m handler = null; } cameraManager.closeDriver(); if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) getView().findViewById(R.id.cameraView); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(BarCodeFragment.this); } cameraActive = false; }
From source file:com.abhi.barcode.frag.libv2.BarcodeFragment.java
@Override public void onPause() { if (handler != null) { handler.quitSynchronously();// w w w . ja v a 2 s .co m handler = null; } inactivityTimer.onPause(); ambientLightManager.stop(); cameraManager.closeDriver(); if (!hasSurface) { SurfaceView surfaceView = this.surfaceView; SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } super.onPause(); }
From source file:piuk.blockchain.android.ui.zxing.CaptureActivity.java
@Override protected void onPause() { if (handler != null) { handler.quitSynchronously();/* w ww .j a v a 2s. com*/ handler = null; } inactivityTimer.onPause(); cameraManager.closeDriver(); if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } // Close scanner when going to background finish(); super.onPause(); }
From source file:co.jlabs.cersei_retailer.zxingfragmentlib.BarCodeScannerFragment.java
public void stopScan() { if (cameraManager == null) { Log.e(TAG, "stopScan: scan already stopped"); return;/*from w w w . j a v a 2s.c o m*/ } if (handler != null) { handler.quitSynchronously(); handler = null; } inactivityTimer.onPause(); ambientLightManager.stop(); cameraManager.closeDriver(); cameraManager = null; if (!hasSurface) { SurfaceView surfaceView = (SurfaceView) getView().findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } }
From source file:com.github.barcodeeye.scan.CaptureActivity.java
@Override protected void onPause() { if (mHandler != null) { mHandler.quitSynchronously();//from w w w . jav a 2s . com mHandler = null; } mInactivityTimer.onPause(); mAmbientLightManager.stop(); mCameraManager.closeDriver(); if (!mHasSurface) { SurfaceView surfaceView = (SurfaceView) findViewById(R.id.preview_view); SurfaceHolder surfaceHolder = surfaceView.getHolder(); surfaceHolder.removeCallback(this); } super.onPause(); }