Reputation: 55227
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
.
Upvotes: 1
Views: 1310
Reputation: 60213
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.
Upvotes: 3