I have this bit of code :
protected String doInBackground(String... params) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
FileInputStream fis;
try {
File F = new File(FilePath);
fis = new FileInputStream(F);
du.Upload(fis,Fname);
} catch (Exception e) {
e.printStackTrace();
}
}
fis
is generating the following error :
`java.io.FileNotFoundException: /storage/emulated/0/When We Are Young(AnyMaza.Com).mp3: open failed: EACCES (Permission denied)`
FilePath
is like this :
/storage/emulated/0/When We Are Young(AnyMaza.Com).mp3
And I have added in my application manifest the read and write permissions :
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
.....
<application
.....
What may be the problem ?
Any help appreciated.