thanks,
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.
By this way i can decouple my PersistenceUtil.
thanks for the answers were very useful.
On 15/12/2010, TreKing <[email protected]> wrote:
> On Wed, Dec 15, 2010 at 1:23 PM, gato chlr <[email protected]> wrote:
>
>> EG. an PersistenceUtil class that do not depends of an activity and saves
>> files in internal and external storage.
>
>
> Your class can simply take a generic File argument in it's constructor for
> where it stores data. At a higher level, at some point in your
> initialization phase, you construct your object with the File that points to
> getFilesDir().
>
> -------------------------------------------------------------------------------------------------
> 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