nitin wrote:
> hello,
>
> I want to create a simple text file in data/data/com.my.package/files/
> test.txt. My code is as follows:
>
> private String CreateFile(Context context){
> try{
> FileOutputStream fOut = context.openFileOutput
> ("test.txt",MODE_WORLD_WRITEABLE);
> fOut.close();
> return "1";
> }
> catch(Exception e){
> return e.getMessage();
> }
> }
>
> I tried MODE_WORLD_READABLE also, but still gives error like:
> data/data/com.my.package/files/test.txt
That is not an error.
Look at your Java stack trace to find the error. The Java stack trace
can be obtained through adb logcat, DDMS, or the DDMS perspective in
Eclipse.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Need Android talent? Ask on HADO! http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---