Reputation: 16818
I have a test case, and using there
Environment.getExternalStorageDirectory()
call, and it returns null.
I have the "write external storage" permission in app's manifest (and sd cards works fine in app), but it does not work in test case. Why and how to fix it?
Device is SGS3, os version is 4.4.
Upvotes: 3
Views: 877
Reputation: 1808
you have to add the below permission in the Manifest.xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Upvotes: 3