Added code to get camera and release camera at the appropriate times. Also coded to display the preview on the surface when the surface has been created and release it when the surface is destroyed.