Skip to content
Permalink
Browse files
Merge pull request #588 from purplecabbage/AndroidCacheLocal
[Android] Cache images in device storage, devices have enough space now.
  • Loading branch information
purplecabbage committed Apr 30, 2020
2 parents 2a750f0 + df14414 commit e9aba07926072a069acefe614726e171c25004a6
Showing 1 changed file with 1 addition and 11 deletions.
@@ -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();

0 comments on commit e9aba07

Please sign in to comment.