Code example for Camera

Methods: setPreviewCallbacksetPreviewDisplaystartPreview

0
     
    private void checkPreviewCallback() {  
        SurfaceHolder mSurfaceHolder;
        try { 
            mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
            mCamera.setPreviewDisplay(mSurfaceHolder);
            Log.v(TAG, "start preview");
            mCamera.startPreview();
            waitForPreviewDone(); 
            mCamera.setPreviewCallback(null);
        } catch (Exception e) {
            Log.v(TAG, e.toString());
        }       
    } 
     
    /* 
     * TODO(yslau): Need to setup the golden rawData and compare the  
     * the new captured rawData with the golden one.        
     *  
     * Test case 1: Take a picture and verify all the callback 
Stop searching for code, let great code find you!  Add Codota to your java IDE