Code example for Camera

Methods: releasestopPreview

0
  } 
 
  @Override 
  public void onPause() { 
    if (inPreview) {
      camera.stopPreview();
    } 
 
    camera.release();
    camera=null;
    inPreview=false;
 
    super.onPause(); 
  } 
 
  @Override 
  public boolean onCreateOptionsMenu(Menu menu) {
    new MenuInflater(this).inflate(R.menu.options, menu);
 
    return(super.onCreateOptionsMenu(menu));
  }