Rajesh Karunakaran
Programmer
Hi Friends,
First of all, thank you all of you in advance!
I am not an expert in Android and this is my first query in this forum.
I am trying to write a bitmap to any of the usual internal folders like 'Pictures, Documents, Download' etc. Below is the file creation I am doing
At the last line, it throws as exception and says 'No such File/Directory'.
When I checked, fl.canWrite(), is says false!, i.e. fl is not writable.
I even tried to give 'Unrestricted Access' in my testing mobile for this App.
What could be the problem? What kind of additional things I need to do?
Can anyone help please ?
Rajesh
First of all, thank you all of you in advance!
I am not an expert in Android and this is my first query in this forum.
I am trying to write a bitmap to any of the usual internal folders like 'Pictures, Documents, Download' etc. Below is the file creation I am doing
Java:
String root = Environment.getRootDirectory().toString();
File myDir = new File(root + File.separator + Environment.DIRECTORY_PICTURES);
String Filename = "pic.png";
File fl = new File(myDir + File.separator + Filename);
FileOutputStream out = new FileOutputStream(fl);
At the last line, it throws as exception and says 'No such File/Directory'.
When I checked, fl.canWrite(), is says false!, i.e. fl is not writable.
I even tried to give 'Unrestricted Access' in my testing mobile for this App.
What could be the problem? What kind of additional things I need to do?
Can anyone help please ?
Rajesh