|
@@ -197,7 +197,11 @@ public class RNFetchBlobFS {
|
197
|
197
|
res.put("DownloadDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
|
198
|
198
|
res.put("MovieDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getAbsolutePath());
|
199
|
199
|
res.put("RingtoneDir", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES).getAbsolutePath());
|
200
|
|
-// res.put("SDCard", Environment.getExternalStorageDirectory().getAbsolutePath());
|
|
200
|
+ String state;
|
|
201
|
+ state = Environment.getExternalStorageState();
|
|
202
|
+ if (state.equals(Environment.MEDIA_MOUNTED)) {
|
|
203
|
+ res.put("SDCard", Environment.getExternalStorageDirectory().getAbsolutePath());
|
|
204
|
+ }
|
201
|
205
|
res.put("MainBundleDir", ctx.getApplicationInfo().dataDir);
|
202
|
206
|
return res;
|
203
|
207
|
}
|