Code example for SurfaceTexture

Methods: setOnFrameAvailableListener

0
    } 
     
    public void startPreview(SurfaceTexture surfaceTexture) throws IOException
    { 
        camera.setPreviewTexture(surfaceTexture);
        surfaceTexture.setOnFrameAvailableListener(this);
        camera.startPreview();
        Camera.Parameters params = camera.getParameters();
        android.util.Log.d("hikar","hfov=" + params.getHorizontalViewAngle() +
                                " vfov=" + params.getVerticalViewAngle());
    } 
     
    public void stopPreview() 
    { 
        camera.stopPreview();
        releaseCamera(); 
    } 
     
    public void releaseCamera() 
    { 
Connect your IDE to all the code out there  Get Codota for Java