Created
June 25, 2018 17:03
-
-
Save nesk/c64cf7c86614d66ca51400b3c62e8c90 to your computer and use it in GitHub Desktop.
Android pre-populated database (basic database helper)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.example | |
import android.content.Context | |
import android.database.sqlite.SQLiteDatabase | |
import android.database.sqlite.SQLiteOpenHelper | |
class ActsDbHelper(val context: Context) : SQLiteOpenHelper(context, DATABASE_NAME, null, DATABASE_VERSION) { | |
override fun onCreate(db: SQLiteDatabase?) { | |
// Nothing to do | |
} | |
override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) { | |
// Nothing to do | |
} | |
companion object { | |
const val DATABASE_NAME = "mydb" | |
const val DATABASE_VERSION = 1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment