how to store list into sqlitedatabse?
I need to store list of contacts into sqlite database. I've displayed contacts in my project application using Contacts Content Provider. I just need to store the list from emulator into database. Anyone knows how? please help thanks.
Not a big deal.
Transfer your ContactModel into a ContentValue:
ContentValues values = new ContentValues(); values.put("name", name); values.put("number", number);
then insert it in database :
database.insertOrThrow(databaseTable.getTableName(), null, values)
But keep in mind that it will always be as fast to get a contact from SQLite database as from the ContentProvider since it's pretty the same tech.