Cache images in device storage, devices have enough space now.

This commit is contained in:
Jesse MacFadyen 2020-04-28 13:57:00 -07:00
parent 2a750f0fa1
commit df14414203

View File

@ -220,17 +220,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
//--------------------------------------------------------------------------
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();