Code example for Surface

0
            try { 
                m_camera.setPreviewTexture(m_DummyTexture);
            } catch (IOException io) {}
        } 
 
        m_DisplaySurface = new Surface(texture);
        SetPreviewSurfaceNative(m_DisplaySurface, m_width, m_height, 0x100); //NV12 format
 
        if (m_useNativeCamera)
        { 
            SelectCameraNative(0); 
            DumpCameraParametersNative(); 
 
            m_DummyTexture.setDefaultBufferSize(m_width, m_height);
            StartPreviewNative(m_DummyTexture);
        } 
    } 
 
    /** 
     * Initializes Android's camera. 
     *