Code example for Camera.Parameters

Methods: getFlashMode, setFlashMode

0
	} 
	 
	public void setStateOn() { 
		if (started) {
			try { 
				params.setFlashMode(ON);
				camera.setParameters(params);
			}  
			catch (Exception e) {
				Log.e("Camera", "Could not set state " + ON);
			} 
		} 
	} 
 
	 
	public void setStateOff() { 
		if (started) {
			try { 
				params.setFlashMode(OFF);
				camera.setParameters(params);
			}  
			catch (Exception e) {
				Log.e("Camera", "Could not set state " + OFF);
			} 
		} 
	} 
	 
	public void toggleState(){ 
		if (getState().equals(ON)) {
			setStateOn(); 
		} else { 
			setStateOff(); 
		} 
	} 
	 
	protected String getState(){
		return params.getFlashMode();
	} 
	 
	protected void releaseCameraResource(){ 
		camera.release();
	}