Customize Database
You can change any string value from file string.xml
here example for Database string attribute :
<string name="db_name">database.sqlite</string>
<string name="db_user_name">database_user.sqlite</string>
<integer name="db_version">1</integer>
<string name="table1_ind_en">table_ind_en</string>
<string name="table2_en_ind">table_en_ind</string>
<string name="column1_edited">edited</string>
<string name="column2_favorites">favorites</string>
<string name="column3_id">_id</string>
<string name="column4_word">word</string>
<string name="column5_result">result</string>
Edit database with query sqlite browser : download here : http://sqlitebrowser.org/
Prepare Database
If you want to clear current database value you just need to execute this query to clear all table value :
#clear first table :
DELETE FROM table_en_ind; VACUUM;
#clear second table :
DELETE FROM table_ind_en; VACUUM;
Insert Data
You just need to execute this query to add more record:
#This insert one row for first table :
INSERT INTO table_ind_en (edited, favorites, word, result)
VALUES ( '-', '-', 'your word1', 'your word translate1' );
#This insert one row for second table :
INSERT INTO table_en_ind (edited, favorites, word, result)
VALUES ( '-', '-', 'your word1', ' your word translate1' );
If you done with this step save database.sqlite and copy it into asset project folder.
Last updated