Skip to content

Commit

Permalink
chore(android): create pictures/movies dir if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jquick-axway committed Oct 12, 2020
1 parent c7f900c commit 137838d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -803,12 +803,14 @@ private static Uri createExternalMediaContentUri(boolean isVideo, boolean isPubl
// Create video file under app's private external storage folder.
// Note: This folder does not require "WRITE_EXTERNAL_STORAGE" permission.
File moviesDir = app.getExternalFilesDir(Environment.DIRECTORY_MOVIES);
moviesDir.mkdirs();
File videoFile = new File(moviesDir, fileName + ".mp4");
contentUri = TiFileProvider.createUriFrom(videoFile);
} else {
// Create image file under app's private external storage folder.
// Note: This folder does not require "WRITE_EXTERNAL_STORAGE" permission.
File picturesDir = app.getExternalFilesDir(Environment.DIRECTORY_PICTURES);
picturesDir.mkdirs();
File imageFile = new File(picturesDir, fileName + ".jpg");
contentUri = TiFileProvider.createUriFrom(imageFile);
}
Expand Down

0 comments on commit 137838d

Please sign in to comment.