Skip to content

Commit

Permalink
Merge pull request #588 from purplecabbage/AndroidCacheLocal
Browse files Browse the repository at this point in the history
[Android] Cache images in device storage, devices have enough space now.
  • Loading branch information
purplecabbage authored Apr 30, 2020
2 parents 2a750f0 + df14414 commit e9aba07
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
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 e9aba07

Please sign in to comment.