hello sir,

thanks for quick response, I am new to android and self learner. how
to see the adb logcat or in Eclipse.
Is there something wrong in above code or some setting is required?
please help, sample code will be useful.

Thanks


On Aug 21, 3:09 pm, Mark Murphy <[email protected]> wrote:
> 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- Hide quoted 
> text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to