Skip to content

Commit

Permalink
Cache images in device storage, devices have enough space now.
Browse files Browse the repository at this point in the history
  • Loading branch information
purplecabbage committed Apr 28, 2020
1 parent 2a750f0 commit df14414
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/android/CameraLauncher.java
Expand Up @@ -220,17 +220,7 @@ else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM)) {
//--------------------------------------------------------------------------

private String getTempDirectoryPath() {
File cache = null;

// SD Card Mounted
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
cache = cordova.getActivity().getExternalCacheDir();
}
// Use internal storage
else {
cache = cordova.getActivity().getCacheDir();
}

File cache = cordova.getActivity().getCacheDir();
// Create the cache directory if it doesn't exist
cache.mkdirs();
return cache.getAbsolutePath();
Expand Down

0 comments on commit df14414

Please sign in to comment.