Are you setting the SDCard permission properly in the manifest?
On Mon, Aug 24, 2009 at 7:22 AM, nitin <[email protected]> wrote: > > though I was using 'this' as context in onCreate event. I ran the same > code after removing 'Context' as parameter, still same result. At last > I uninstalled the application from Emulator and restarted > everything........it worked with the same code :) Thanks for your > valuable time....but I am still thinking does Emulator not refresh > things properly? > > On Aug 22, 2:46 pm, Mark Murphy <[email protected]> wrote: > > nitin wrote: > > > when i tried after changing the code like: > > > catch (IOException ioe) { > > > return ioe.toString(); > > > } > > > > > Giving error: > > > java.io.FileNotFoundException: > > > /data/data/hello.world/files/test.txt > > > > > online samples are giving the same code.......am i missing some > > > setting/permission? pls help > > > > Where are you getting the Context from? If it is your Activity instance, > > this code should work. If you are somehow creating your own Context > > object, then that might be the source of your problem -- use a Context > > given to you by Android, such as an Activity or Service object. > > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > Android App Developer Training:http://commonsware.com/training.html > > > -- Donn http://blog.donnfelker.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

