I’ve started Android programming recently so bear with me 🙂
I develop an app which has all of its content stored in database.sql file.
I’ve implemented a subclass of SQLiteOpenHelper and added database.sql to my project assets.
public class DBHelper extends SQLiteOpenHelper
{
public DBHelper (Context ctx)
{
super(ctx, "database.sql", null, 1);
}
}
This thing doesn’t work. I just get an exception every time I try to do smth with DB 🙁
You need to override onCreate and onUpdate as well, have a look to google’s example here