When you create the table in SQLite, just specify
create table <your_table_nam> (<key_id> integer primary key autoincrement
Then when you create a new record, for the insert statement you don't need to specify the <key_id> field. Android/SQLite will add the next available integer as the key automatically for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.