C Carcas Member Licensed User Longtime User Feb 26, 2015 #1 Hello everyone I published an application on Google Play. When I uninstall the app all the SQL data files are reset. I dont' want this. When I try with b4bridge this does not happen. There needs to be some special code in the manifest? Thank You
Hello everyone I published an application on Google Play. When I uninstall the app all the SQL data files are reset. I dont' want this. When I try with b4bridge this does not happen. There needs to be some special code in the manifest? Thank You
C Carcas Member Licensed User Longtime User Feb 26, 2015 #2 Sorry I'll explain, if I uninstall and then reinstall the application SQL data is lost. With b4bridge not happen Upvote 0
Sorry I'll explain, if I uninstall and then reinstall the application SQL data is lost. With b4bridge not happen
eps Expert Licensed User Longtime User Feb 26, 2015 #3 You can either write 'all' the data out to a file and then re-import it or store it in a List or similar and re-build... It really depends on how the data is structured and how many records have been created / modified that you want to store (some of the data must be static or standard...). I think if someone uninstalled and reinstalled then they wouldn't expect their data to still be there. If they upgraded to a new version then they would expect the data to remain. I used to use a file, but then found that grabbing the data and storing and then restoring was the best solution for this. Be careful if the database structure has altered this can also lead to issues.. Upvote 0
You can either write 'all' the data out to a file and then re-import it or store it in a List or similar and re-build... It really depends on how the data is structured and how many records have been created / modified that you want to store (some of the data must be static or standard...). I think if someone uninstalled and reinstalled then they wouldn't expect their data to still be there. If they upgraded to a new version then they would expect the data to remain. I used to use a file, but then found that grabbing the data and storing and then restoring was the best solution for this. Be careful if the database structure has altered this can also lead to issues..
C Carcas Member Licensed User Longtime User Feb 26, 2015 #4 Thanks for the answer but I do not think I understood. I know of other ways to save data to a file could you tell me how? Upvote 0
Thanks for the answer but I do not think I understood. I know of other ways to save data to a file could you tell me how?
P parijs Active Member Licensed User Longtime User Feb 26, 2015 #5 Do you use If File.Exists(File.DirRootExternal, "Dir/data.db") = False Then In your code? Upvote 0
C Carcas Member Licensed User Longtime User Feb 26, 2015 #6 I was using file.dirinternal but now I'm using salva.Initialize(File.DirDefaultExternal, "Salvataggio.db" ,True) I'm waiting for the update is published to try Upvote 0
I was using file.dirinternal but now I'm using salva.Initialize(File.DirDefaultExternal, "Salvataggio.db" ,True) I'm waiting for the update is published to try
P parijs Active Member Licensed User Longtime User Feb 26, 2015 #7 If I uninstall the app the dbase wil stay. and us this code for not overriding the db Code: If File.Exists(File.DirRootExternal, "Transmis/trasmis.db") = False Then File.MakeDir(File.DirRootExternal,"Transmis") File.Copy(File.DirAssets,"trasmis.db", File.DirRootExternal, "Transmis/trasmis.db") End If Upvote 0
If I uninstall the app the dbase wil stay. and us this code for not overriding the db Code: If File.Exists(File.DirRootExternal, "Transmis/trasmis.db") = False Then File.MakeDir(File.DirRootExternal,"Transmis") File.Copy(File.DirAssets,"trasmis.db", File.DirRootExternal, "Transmis/trasmis.db") End If