samedi 26 septembre 2015

Empty sqlite database when app send on another device

I am developing Android app and I have SQLite database in it. I have inserted records in database. Now when I am sending my app into another device there is empty database!. Please help me

public void createPrincipal(CollegePrincipal principal){ SQLiteDatabase db = getWritableDatabase();

    ContentValues values = new ContentValues();

    values.put(PRINCI_NAME, principal.getName());
    values.put(PRINCI_QUALI, principal.getQalification());
    values.put(PRINCI_INTRO, principal.getIntro());

    // insert row
    long princi_id = db.insert(TABLE_PRINCI, null, values);

    Log.e("princi id", String.valueOf(princi_id));
}

Aucun commentaire:

Enregistrer un commentaire