mardi 24 février 2015

Android MD5 checksum of sqlite Db changes after copying

I am providing an SQLite Db packaged with the app which is copied to the /data/data/ folder on the first launch. The contents of this Db are meant for reading only and are never changed.


If the Db is modified, it is supposed to be provided with the next App Update. So, I want to implement a procedure where, I was thinking of comparing the MD5 checksum of the packaged Db with the checksum of the Db on the device and copy if found different.


But... after the Db is copied to the device the checksum changes immediately!


Could someone explain if this is the expected behavior, or am I missing something ?


If this is the expected behavior, then what would be the best method to compare the Dbs ?


Aucun commentaire:

Enregistrer un commentaire