In my current project's previous version we were using database for settings. but for now we think that database is overhead for simple key value pairs so we decided to use sharedpref for that. Now the problem is how to handle to update functionality. we are not using database so onUpgrade will not be work.
I am planing to do
ArrayList<String> databases = new ArrayList<String>(Arrays.asList(mContext.databaseList()));
if(databases.contains("dbname")){
copyDataToSharedPref();
mContext.deleteDatabase("dbname");
}
is there any simple way to handle this?