I’ve seen the information about locating a SQLite database, but I have a different angle on the issue.
Can I create a SQLite database on my workstation, then move it to my phone and have my application use it?
I need to extract data from my SQL Server and put it into a SQLite format, then move it to my phone for use.
Thanks
Because of the variety of Android OS versions out there, you may or may not be successful in deploying a binary SQLite file. There is one way to be more version agnostic, and that is to deploy a dump of the SQLite database and let the device create the actual binary itself.
That way, you can make sure you don’t fall into any version differences.
Furthermore, Android requires some metadata in the SQLite DB, so you must take that into consideration as well.
This is the method that I’m using:
The only drawback is that it can take a while to create the DB from the .dmp file if the DB is several MB in size. On the other hand, a 3MB DB can be dumped and Zipped down to 400k, which means a lot smaller payload when people download from the Google Play store. It all depends on your needs.