The directory structure you are referring to is not guaranteed by
Android SDK.
While it's in line with your wish to avoid using a Context, be aware
that this code might break unexpectedly in a new Android release.
PS - In fact, it's already broken now in 2.2, if the application is
installed on the memory card.
PPS - APIs are there for a reason. Learn to love them.
-- Kostya
16.12.2010 0:41, gato chlr пишет:
the method getFilesDir() retrieves a FileOutputStream to the
/data/data/your.activity.package.name/files
directory, if this directory does not exists the method create it, so
it seems that it is nothing of other world. It can be done by using
doing:
File appDir = new File("/data/data/your.activity.package.name/files");
appDir.mkdir();
The good thing with this is that when you use (if you need to do or
just like to do it) getFilesDir() it fill work fine.
--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
--
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