private async void TakePictureFromCamera() { try { UserProfileImagePath = await mediaPickerService.TakePictureFromCamera(); } catch (NotSupportedException) { await NavigationService.DisplayAlert("Error", "Not supported on this device.", "Ok"); } catch (Exception ex) { await NavigationService.DisplayAlert("Error", "Unable to open a photo.", "Ok"); } }
private async void TakePictureFromCamera() { try { UserModel.Photo = await mediaPickerService.TakePictureFromCamera(); } catch (NotSupportedException e) { await NavigationService.DisplayAlert("Error", "Not supported on this device.", "Ok"); } catch (ArgumentException ae) { //skip for this place } catch (Exception ex) { await NavigationService.DisplayAlert("Error", "Unable to open a photo.", "Ok"); } }