I did use getExteranlStorageDirectory() method but i realize Android always mount it to /sdcard I am starting to think why not hardcode. I guess Google team will not change it (maybe the source /mnt/sdacrd but not the mount path), then again I guess it is a good practise and I will change it. :) thank for the advice.
On Aug 4, 9:55 am, Mark Murphy <[email protected]> wrote: > On Tue, Aug 3, 2010 at 9:52 PM, Mystique <[email protected]> wrote: > > Thanks Mark, I have your books and use it here and there. > > Thanks! > > > I didnt use getExternalFilesDir(), I hardcore it directly. > > That is not a good idea, though I think you are confusing two methods. > Environment has a getExteranlStorageDirectory() method, which points > to the root of the external storage (e.g., /mnt/sdcard). I was > referring to the getExternalFilesDir() method on Context, new to > Android 2.2: > > http://developer.android.com/reference/android/content/Context.html#g...) > > > You mean a > > bug if I had getExternalFilesDir() in my code and it will delete the > > directory each time I call it? > > No, but a bug in getExternalFilesDir() will cause that directory to be > deleted on an upgrade, which I thought was your problem. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Development Wiki:http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en

