Code example for SurfaceTexture

0
     */ 
    @Override 
    public void setDummyTexture(Camera camera) {
        try { 
            if (dummySurfaceTexture == null) {
                dummySurfaceTexture = new SurfaceTexture(42);
            } 
            camera.setPreviewTexture(dummySurfaceTexture);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE