So, I can actually access the database as a file copy and than restore
it by moving it to the same location where it was copied from?

Thanks!

On Sep 6, 3:30 pm, Mark Murphy <[email protected]> wrote:
> Moto wrote:
> > I need to somehow backup my applitcations database to a file so that
> > it can later be retored using that file.  Any suggestions to doing
> > this?
>
> One approach is to copy the database file.
>
> Tactically, new File(getFilesDir(), "../databases") is the directory
> where your database file resides. Copy it using ordinary Java I/O,
> though I recommend you not hold any open SQLiteDatabase objects on the
> database at the time.
>
> Now, the database path location may change in future Android releases,
> and I am not aware of a place in the API to get the path to a database
> in a more official fashion. Hence, you will need to double-check with
> each Android release to confirm they have not moved the databases
> someplace else.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Looking for Android opportunities?http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
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