My Android application stores all user data in a Sqlite database. What are my options to backup/export/import/copy this data? I know I can easily copy the database to the SD card. I would also like to send the data to a network server. Are there any packages/classes available to facilitate getting sqlite information to/from a network server? Thanks for the help...
-
Yes, it's a single file. I am looking for convenient ways to export/import this file to/from a network server.meg18019– meg180192009-10-23 01:28:15 +00:00Commented Oct 23, 2009 at 1:28
-
Ok, well then this is not really a SQLite question -- its a network file + android question.Paul Hsieh– Paul Hsieh2009-10-23 01:32:14 +00:00Commented Oct 23, 2009 at 1:32
3 Answers
SQLite data base files are just flat files, that I am pretty sure is platform portable. So the only issue about getting data two or from a network is exactly equal to your ability to access the file itself. The point being that you can run the SQLite demo program itself on whatever platform you like to access to data directly, or share the file over a network and use the SQLite C library directly on it, or copy the file then use the local copy as you like.
3 Comments
Your best bet is to store the db on the external storage. If you use the built in (automagic) databases you won't be able to directly access the file. Once it's on the SDCard (or future storage options) you can just upload the file to the server using one of the standard HTTP libraries.
One of the apps I've been working on does something similar, but in reverse. We're downloading a SQLite3 DB from a server then storing it to the external storage (SDCard).