Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the android_metadata table?

Tags:

android

sqlite

I try to integrate an existing database file into my Android project. I follow the instructions on this blog. They write that I have to add a table android_metadata with a column called locale and put en_US into it.

I try to figure out what this table is used for. Because my database content is german. Maybe i then should not put en_US into it? Is this required for localisation of the database content or is the table not needed at all?

like image 277
Janusz Avatar asked Jun 17 '10 13:06

Janusz


3 Answers

the metadata table will be generated automatically. if you have content of german try updating the metadata table 'de_DE'.

like image 196
Rakhita Avatar answered Nov 13 '22 10:11

Rakhita


If you're okay opening the DB with read-write access then you can let the openDatabase(...) call automatically generate it. For example in Android:

SQLiteDatabase.openDatabase(m_szMainDBPath, null, SQLiteDatabase.OPEN_READWRITE);
like image 3
paiego Avatar answered Nov 13 '22 10:11

paiego


The metadata table is required to hold (as its name suggests) meta information about the application. This table is auto-generated in some cases (since api 4 if i remember correctly) but you may want to add it yourself.

like image 1
parser_failed Avatar answered Nov 13 '22 12:11

parser_failed