Skip to content

Commit b06611c

Browse files
author
xaviermallat
committed
Chore(android): save media to plugin's cache folder
1 parent 07301f8 commit b06611c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/android/Capture.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,7 @@ private boolean isMissingCameraPermissions(Request req, String mediaPermission)
265265
}
266266

267267
private String getTempDirectoryPath() {
268-
File cache = null;
269-
270-
// Use internal storage
271-
cache = cordova.getActivity().getCacheDir();
268+
File cache = new File(cordova.getActivity().getCacheDir(), "org.apache.cordova.mediacapture");
272269

273270
// Create the cache directory if it doesn't exist
274271
cache.mkdirs();

src/android/res/xml/mediacapture_provider_paths.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
-->
1818

1919
<paths xmlns:android="http://schemas.android.com/apk/res/android">
20-
<cache-path name="cache_files" path="." />
20+
<cache-path name="cache_files" path="org.apache.cordova.mediacapture" />
2121
</paths>

0 commit comments

Comments
 (0)