简体   繁体   English

React-native:将数据保存在设备内存中

[英]React-native: save data in device memory

I know about asyncStorage . 我知道asyncStorage That's not what i need. 那不是我所需要的。 I want to save some data locally, so if app will be completely deleted and installed again, it should gain access to the stored data. 我想在本地保存一些数据,因此,如果应用将被完全删除并再次安装,则它应该可以访问存储的数据。 AsyncStorage data being removed along with app itself. AsyncStorage数据与应用程序本身一起被删除。

I think you must use a FileSystem to save files in phone storage. 我认为您必须使用FileSystem将文件保存在手机存储中。 Take a look at this library to handle files: https://github.com/johanneslumpe/react-native-fs . 看一下该库来处理文件: https : //github.com/johanneslumpe/react-native-fs Hope it helps. 希望能帮助到你。

I dont think anything an app creates can exist after app deletion. 我认为应用删除后不存在任何应用创建的内容。 If you think about it, why would you want disk space being used up by an app you deleted. 如果考虑一下,为什么要让删除的应用程序占用磁盘空间。 Only option I can think of is storing in the cloud: Google Drive, DropBox, etc. or a server you run and user data connected to an account system. 我能想到的唯一选择是存储在云中:Google Drive,DropBox等或您运行的服务器,以及将用户数据连接到帐户系统。 My experience is with iOS, maybe Android has some option for what you want. 我的经验是使用iOS,也许Android可以满足您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM