[英]How To Save Data In Android's Internal Storage On A Click Of A Button using C#(Xamarin)
I want to save some kind of data on a click of a button to the internal memory of the android. 我想单击一个按钮来保存某种数据到android的内部存储器。 Actually i want to create the backup of the data. 实际上,我想创建数据的备份。 Is there any such way? 有什么办法吗? Please help me with restoring of the backup as well. 请也帮助我还原备份。
Thanks in advance. 提前致谢。
If your data is Simple string then you need to create one Dependency Service in Xamarin Forms project and implement it into Android Project. 如果您的数据是简单字符串,则需要在Xamarin Forms项目中创建一个依赖服务,并将其实现到Android Project中。 In Android Project use shared preference for save and retrieve data. 在Android Project中,使用共享首选项保存和检索数据。
For Dependency service - https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/ 对于依赖性服务-https://developer.xamarin.com/guides/xamarin-forms/dependency-service/introduction/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.