Kostya , you right, but then, my worry is about if i will be able to do an unit test of my PersistenceUtil, how to do it without an instance of an Activity?
On 15/12/2010, TreKing <[email protected]> wrote: > On Wed, Dec 15, 2010 at 3:41 PM, gato chlr <[email protected]> wrote: > >> thanks, >> the method getFilesDir() retrieves a FileOutputStream to the >> /data/data/your.activity.package.name/files >> directory >> > > Um, no, it returns a File object. > http://developer.android.com/reference/android/content/Context.html#getFilesDir() > you right, it is a File > >> if this directory does not exists the method create it, so it seems that >> it >> is nothing of other world. >> > > Huh? > > >> It can be done by using doing: >> >> File appDir = new File("/data/data/your.activity.package.name/files"); >> appDir.mkdir(); >> > > It can, but why would you? What if the path changes across platform > versions? > Yep, it seems i cannot scape form Activity.getFilesDir() , in some where you should use this method and save the result. But you can use your own directory format inside a directory with write permissions. well if any ideas to do the unit test without instantiating an Activity...it will be great > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices > > -- > 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 -- 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

