From 3d125462e469661382daef8c9b749df2e11c12db Mon Sep 17 00:00:00 2001 From: hushicai Date: Mon, 17 Jun 2019 19:44:14 +0800 Subject: [PATCH] android should use internal storage, and avoid permissions Closes #34 --- .../src/main/java/me/hauvo/thumbnail/RNThumbnailModule.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/src/main/java/me/hauvo/thumbnail/RNThumbnailModule.java b/android/src/main/java/me/hauvo/thumbnail/RNThumbnailModule.java index 33264a7..a261d59 100644 --- a/android/src/main/java/me/hauvo/thumbnail/RNThumbnailModule.java +++ b/android/src/main/java/me/hauvo/thumbnail/RNThumbnailModule.java @@ -43,8 +43,7 @@ public void get(String filePath, Promise promise) { MediaMetadataRetriever retriever = new MediaMetadataRetriever(); retriever.setDataSource(filePath); Bitmap image = retriever.getFrameAtTime(1000000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC); - - String fullPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/thumb"; + String fullPath = reactContext.getFilesDir().getAbsolutePath() + "/thumb"; try { File dir = new File(fullPath);