getFilesDir is declared in Context, so you don't necessarily need an Activity.

It's not likely to change during an application's run state, so call it once while you have an Activity, and save the path somewhere.

Or subclass Application, override onCreate and get the path from it

-- Kostya

15.12.2010 22:23, gato chlr ?????:
hi, please some ideas :)

I have a class who must save and load files (persistence), this class do that right now but i want to "decouple" my components , in other words, i don't want to call to an instance of Activity to use its getFilesDir() , there must be another way to do not depend of that, so i can build decoupled components. EG. an PersistenceUtil class that do not depends of an activity and saves files in internal and external storage.

Thanks for your replies.

--
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


--
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

Reply via email to