The Environment.getExternalFilesDir() does return /sdcard and although empty it still stalls on writing the file out. What package carries the getFilesDir()?
On Jul 14, 3:09 pm, kypriakos <demet...@ece.neu.edu> wrote: > That's what I figured - thanks Mark. I think it makes more sense now. > > Regarding the emulator's storage, if I wanted to manually add a file > let's say > into the sdcard dir, is this possible (in other words is this a real > file system > dir or a simulated entity?). > > Thanks again > > On Jul 14, 3:03 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > On Wed, Jul 14, 2010 at 2:59 PM, kypriakos <demet...@ece.neu.edu> wrote: > > > I noticed that using the standard Java to create the new file stalls: > > > > File UIDfile = new File("/data/local/tmp/myUID.txt"); > > > UIDfile.createNewFile(); > > > > Is this something that should not be used in Android? > > > You cannot write to arbitrary paths on hardware. Please use > > getFilesDir() to find a safe spot to write files on the on-board flash > > for your application, or Environment.getExternalFilesDir() for the > > root of the external storage (SD card). > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9 > > Available! -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en