/// <summary> /// Takes the picture. /// </summary> /// <param name="options">The storage options.</param> /// <returns>Task with a return type of MediaFile.</returns> /// <exception cref="System.NotSupportedException">Throws an exception if feature is not supported.</exception> public Task<MediaFile> TakePhotoAsync(CameraMediaStorageOptions options) { if (!IsCameraAvailable) { throw new NotSupportedException(); } options.VerifyOptions(); return TakeMediaAsync("image/*", MediaStore.ActionImageCapture, options); }
/// <summary> /// Select a picture from library. /// </summary> /// <param name="options">The storage options.</param> /// <returns>Task with a return type of MediaFile.</returns> /// <exception cref="System.NotSupportedException">Throws an exception if feature is not supported.</exception> public Task<MediaFile> SelectPhotoAsync(CameraMediaStorageOptions options) { if (!IsCameraAvailable) { throw new NotSupportedException(); } options.VerifyOptions(); return TakeMediaAsync("image/*", Intent.ActionPick, options); }