开发者

How to store a value outside the application sandbox in android?

I have some values that needs to be stored outside the application sandBox? i.e even if the user uninstalls 开发者_运维问答the application and reinstalls the value stored before uninstall should be preserved. Is it possible to do so.


You can store data in file on sdcard. But this should not be your application directory (which, if I'm not mistaken, will be cleaned up on uninstall as well).

Just to test, you can write file to the root of sdcard: /mnt/sdcard/you-file.xml. Though I would not recommend to write your files to the root file in the real application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜