iPhone类似的钥匙扣在Android中? [英] iPhone-like Keychain in Android?
问题描述
我正在寻找像iPhone上的钥匙圈,但对于Android的发展。
东西给我的可能性,以节省小键 - 值对,这是持久的,不变的,即使用户安装该应用程序。
I'm looking for something like the keychain on the iPhone, but for Android development.
Something that gives me the possibility to save small key-value pairs, that are persistent and unchanged even if the user reinstalls the application.
有没有类似的东西?我可以使用标准的preferences呀?
Is there something like that? Can I use the standard preferences that way?
我想实现它的工作原理与PC上的游戏编写游戏保存到另一个文件夹,以便以后删除并重新安装后,他们不会丢失的方式行为。
I would like to achieve a behavior in a way it works with games on a PC writing the save games to another folder so that after delete and later reinstall they are not lost.
修改
赏金运行而不会有人提的AccountManager。我只是绊了它。那不是一个方法来实现我所描述的行为?
The bounty run out without somebody mentioning the accountManager. I just stumbled over it. Wouldn't that be a method to achieve the behaviour described by me?
推荐答案
您你的SD卡就像迈克尔·克拉默上使用的存储陈述(让用户知道你存储数据:-))。当应用程序被移除SD卡上的数据不会被删除。
You you use storage on the SD card like Michael Cramer stated ( Let the user know you are storing data :-) ). The data on the SD card is not deleted when the app is removed.
您可以在另一方面使用存储所有可下载,而不是使用用户名使用哪个是唯一的电话的IMEI在需要时和细节的服务器。即使用户重新安装操作系统,他将仍然能够读取该设置方式。
You could on the other hand use a server which stores all the details which can be downloaded as and when required and instead of using a user name use the IMEI of the phone which is unique. That way even if the user reinstalls the OS he will still be able to refetch the settings.
获取IMEI号码,你可以参考:<一href="http://stackoverflow.com/questions/1972381/how-to-programmatically-get-the-devices-imei-esn-in-android">http://stackoverflow.com/questions/1972381/how-to-programmatically-get-the-devices-imei-esn-in-android
for getting the IMEI you may refer : http://stackoverflow.com/questions/1972381/how-to-programmatically-get-the-devices-imei-esn-in-android
这篇关于iPhone类似的钥匙扣在Android中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!