By Romain Guy From the Question Asked Here,
Whatever the maximum length of a Java string is. So something like
Integer.MAX_VALUE chars.
I suppose while SharedPreference is an XML file stored with One Tag if you store only One Pair/Object.
So there is no limit to write String in that if you think like you are writing in a file..(Theoretically)
But Actually what happens is that, while you are assigning value to SharedPreference using put/get
function at that time you Reading/Writting value in String Object..so the limit becomes to store value at one time equal to Size limit of String Object of Java.
So while writting the code: Limit of SharedPreference String Size = Java String Object Size Limit(Practically)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…