Question

I do not understand what is going on here.

I get permission denied try trying to access External Storage on HTC Wildfire S although i set

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

in the manifest file.

String state = Environment.getExternalStorageState();
if (Environment.MEDIA_MOUNTED.equals(state))

return false.

File storage= new File(Environment.getExternalStorageDirectory(),FILENAME);

By calling storage.createNewFile(); i get permission denied.

Stacktrace: java.io.IOException: Permission denied

NOTE: The same application is working correctly on all Android Samsung devices. I have the problem only on HTC and Sony devices

Thanks for your help

Was it helpful?

Solution 2

I get the anwser by myself.

Quiet simple: i just use internal storage instead of External one.

OTHER TIPS

Is your device plugged in your PC (USB) ? Did you check the status of your SDCard (how it is mounted, USB options while plugged in) ?

For this error : java.io.IOException: Permission denied The destination file may aldready exist. Did you check that ?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top