Android的持久化数据卸载后 [英] Android Persist Data After Uninstall

查看:173
本文介绍了Android的持久化数据卸载后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要坚持两个字符串我的应用程序卸载应用程序,甚至后。至于,最终用户没有SD卡为他们的设备,他们不具备互联网连接,我怎么能坚持这2串应用程序卸载,即使?

I have to persist 2 strings for my application even after the application is uninstalled. Regarding that the end users don't have SD cards for their devices and they don't have internet connection, how could I persist those 2 strings even after the app is uninstalled?

我会强烈AP preciate任何回应。 谢谢

I would highly appreciate any response. Thanks

推荐答案

除非你的目标很老的手机,你不必担心没有外部存储。只要你使用 Environment.getExternalStorageDirectory()作为您的参考,你应该不会有问题,但如果你是绝对在意这一点,你可以,如果外部检查存储不存在,然后选择去内部存储设备。 检查出从开发文档链接多一点洞察力

Unless you're targeting VERY old phones, you don't need to worry about not having external storage. As long as you use Environment.getExternalStorageDirectory() as your reference, you shouldn't have a problem, though if you're absolutely concerned about this you can check if the external storage doesn't exist and then opt to go to internal storage. Check out this link from the developer docs for a little more insight.

如果外部确实是不可用,然后你可以保存到内存,但你必须要声明一个新的许可的,这可能会挡住一些人。

If External truly isn't available, you could then save to Internal memory, but you will have to declare a new permission for that, which may ward off some people.

这篇关于Android的持久化数据卸载后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆