public void toggleCamera() {
   if (super.mValid && super.mStarted && !super.mPaused && mProducer != null) {
     final Camera camera = NgnCameraProducer.toggleCamera();
     try {
       startCameraPreview(camera);
     } catch (Exception exception) {
       Log.e(TAG, exception.toString());
     }
   }
 }
 @Override
 public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
   Log.d(TAG, "Surface Changed Callback");
   final Camera camera = NgnCameraProducer.getCamera();
   try {
     myProducer.startCameraPreview(camera);
   } catch (Exception exception) {
     Log.e(TAG, exception.toString());
   }
 }