如何存储卸载后剩余的数据 [英] How to store data that remains after uninstall
问题描述
我想存储一些数据,这些数据在应用程序卸载后也应该保留,并且可以由该应用程序的新版本访问. 共享首选项/文件不是解决方案,因为在卸载程序时会删除共享首选项/文件,而且写入内部存储器也不是解决方案(也可以在卸载时删除). 写入外部公用文件夹时,我看到它并未被删除,但这需要外部SD卡,并且不希望受到此限制. 我不知道如何使用SQLite数据库,它是如何工作的?这可能是我想要的解决方案吗? 或任何其他解决方案将不胜感激.
I want to store some data that should remain also after application uninstall and to be accessible by a new version of this application. Share preferences/files are not a solution as they are removed when program is uninstalled, also writing to internal memory is not a solution (also removed with uninstall). Writing to external public folders I see that is not removed but this would require an external SD Card and don't want to be constrained by this. I don't know about using the SQLite database, how it works? It could be a solution for what I want ? Or any other solutions would be appreciated.
推荐答案
您的应用程序创建的数据库将存储在/data/data/your.package.name/databases/
中,并且在卸载应用程序时将被删除.
The databases made by your app will be stored in /data/data/your.package.name/databases/
and will be deleted on uninstallation of the app.
所以,这不是解决方案.我认为唯一的方法是使用SD卡.
So, that's not a solution. I think the only way would be using the SD-card.
这篇关于如何存储卸载后剩余的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!