Say I want to create a database using the Android SDK's sqlite tool. What would the file extension have to be? I would think .db or .sqlite3 or .sqlite? How would I import it in my source code (Is there a method I should call?) and where in my source code? I was thinking in the onCreate method of a class that implements SqliteOpenHelper.
-
Similar to stackoverflow.com/questions/3123610/…ognian– ognian2010-07-02 07:05:50 +00:00Commented Jul 2, 2010 at 7:05
-
@ognian - No it's not...Avi Shukron– Avi Shukron2012-04-19 14:49:46 +00:00Commented Apr 19, 2012 at 14:49
Add a comment
|
1 Answer
My open source app does exactly this, so feel free to copy-and-paste the parts you need:
https://github.com/nicolas-raoul/Anki-Android/blob/master/src/com/ichi2/anki/AnkiDb.java
You can name the files the extension you want. I call my files "somefilename.anki" because Anki is the name of the associated desktop software, but feel free to use any filename extension.