public static CameraDialog newInstance(/* add parameters here if you need */ ) {
   final CameraDialog dialog = new CameraDialog();
   final Bundle args = new Bundle();
   // add parameters here if you need
   dialog.setArguments(args);
   return dialog;
 }
 /**
  * Helper method
  *
  * @param parent FragmentActivity
  * @return
  */
 public static CameraDialog showDialog(Activity parent /* add parameters here if you need */) {
   CameraDialog dialog = newInstance(/* add parameters here if you need */ );
   try {
     dialog.show(parent.getFragmentManager(), TAG);
   } catch (IllegalStateException e) {
     dialog = null;
   }
   return dialog;
 }