什么是一个Android共享preference值的最大尺寸是多少? [英] What's the maximum size for an Android shared preference value?

查看:737
本文介绍了什么是一个Android共享preference值的最大尺寸是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全AP preciate倾倒大量的数据装入preferences是完全不恰当的,但我的要求是不是很大,但足够大(可能500-5000字节)的地方我不知道它是否是适当与否。该文档没有帮助。 <一href="http://developer.android.com/reference/android/content/Shared$p$pferences.Editor.html">http://developer.android.com/reference/android/content/Shared$p$pferences.Editor.html

I fully appreciate dumping lots of data into the preferences is totally inappropriate, but my requirement is not that great, but large enough (potentially 500-5000 bytes) where I've no idea whether it's appropriate or not. The docs do not help. http://developer.android.com/reference/android/content/SharedPreferences.Editor.html

我已经搜查了网,#1,不能找到一个明确的答案: 一)实际的限制是什么,基于底层架构上 B)的实际限制是什么,根据性能(我发现可能需要几秒钟甚至写短preF值,但我怀疑这只是一个闪存写入延迟)

I've searched the net and Stackoverflow and can't find a definitive answer on: a) what the actual limit is, based on the underlying architecture b) what the practical limit is, based on performance (I find writing even short pref values can take a few seconds, but I suspect that's just a flash write delay)

请问AP preciate澄清。

Would appreciate clarification.

推荐答案

所有共享preFS存储在/数据/数据​​/ [包名] / shared_ preFS / [应用程序名称]。 XML ,所以我觉得有没有基于架构的限制。

All shared prefs are stored in /data/data/[package name]/shared_prefs/[app name].xml, so i think there's no limit based on architecture.

我不知道实际的限制,但我认为这是够你。

I don't know practical limit but I think it's enough for you.

这篇关于什么是一个Android共享preference值的最大尺寸是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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