private static MediaPickerController SetupController(MediaPickerDelegate mpDelegate, UIImagePickerControllerSourceType sourceType, string mediaType, StoreCameraMediaOptions options = null)
    {
      var picker = new MediaPickerController(mpDelegate);
      picker.MediaTypes = new[] { mediaType };
      picker.SourceType = sourceType;

      if (sourceType == UIImagePickerControllerSourceType.Camera)
      {
        picker.CameraDevice = GetUICameraDevice(options.DefaultCamera);

        if (mediaType == TypeImage)
          picker.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Photo;
        else if (mediaType == TypeMovie)
        {
          StoreVideoOptions voptions = (StoreVideoOptions)options;

          picker.CameraCaptureMode = UIImagePickerControllerCameraCaptureMode.Video;
          picker.VideoQuality = GetQuailty(voptions.Quality);
          picker.VideoMaximumDuration = voptions.DesiredLength.TotalSeconds;
        }
      }

      return picker;
    }