mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:35:10 +08:00
Cache images in device storage, devices have enough space now.
This commit is contained in:
parent
2a750f0fa1
commit
df14414203
@ -220,17 +220,7 @@ public class CameraLauncher extends CordovaPlugin implements MediaScannerConnect
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
||||||
private String getTempDirectoryPath() {
|
private String getTempDirectoryPath() {
|
||||||
File cache = null;
|
File cache = cordova.getActivity().getCacheDir();
|
||||||
|
|
||||||
// SD Card Mounted
|
|
||||||
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
|
|
||||||
cache = cordova.getActivity().getExternalCacheDir();
|
|
||||||
}
|
|
||||||
// Use internal storage
|
|
||||||
else {
|
|
||||||
cache = cordova.getActivity().getCacheDir();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the cache directory if it doesn't exist
|
// Create the cache directory if it doesn't exist
|
||||||
cache.mkdirs();
|
cache.mkdirs();
|
||||||
return cache.getAbsolutePath();
|
return cache.getAbsolutePath();
|
||||||
|
Loading…
Reference in New Issue
Block a user