Browse Source

Merge pull request #92 from timsuchanek/0.10.0

Added SDCard for Android
wkh237 8 years ago
parent
commit
ed11738aba
2 changed files with 3 additions and 1 deletions
  1. 1
    0
      src/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java
  2. 2
    1
      src/fs.js

+ 1
- 0
src/android/src/main/java/com/RNFetchBlob/RNFetchBlobFS.java View File

192
         res.put("DownloadDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
192
         res.put("DownloadDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
193
         res.put("MovieDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getAbsolutePath());
193
         res.put("MovieDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getAbsolutePath());
194
         res.put("RingtoneDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES).getAbsolutePath());
194
         res.put("RingtoneDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES).getAbsolutePath());
195
+        res.put("SDCard", Environment.getExternalStorageDirectory().getAbsolutePath());
195
         return res;
196
         return res;
196
     }
197
     }
197
 
198
 

+ 2
- 1
src/fs.js View File

28
     MusicDir : RNFetchBlob.MusicDir,
28
     MusicDir : RNFetchBlob.MusicDir,
29
     MovieDir : RNFetchBlob.MovieDir,
29
     MovieDir : RNFetchBlob.MovieDir,
30
     DownloadDir : RNFetchBlob.DownloadDir,
30
     DownloadDir : RNFetchBlob.DownloadDir,
31
-    DCIMDir : RNFetchBlob.DCIMDir
31
+    DCIMDir : RNFetchBlob.DCIMDir,
32
+    SDCardDir : RNFetchBlob.SDCardDir
32
 }
33
 }
33
 
34
 
34
 /**
35
 /**