diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/camera/CameraUtils.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/camera/CameraUtils.java index 31a6c546e..e39025301 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/camera/CameraUtils.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/camera/CameraUtils.java @@ -27,6 +27,7 @@ public static File createImageFile(Activity activity, boolean saveToGallery) thr if(saveToGallery) { Log.d(getLogTag(), "Trying to save image to public external directory"); storageDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); + storageDir.mkdirs(); } else { storageDir = activity.getExternalFilesDir(Environment.DIRECTORY_PICTURES); }