Android Question max length of string > map > file?

Dave O

Well-Known Member
Licensed User
Longtime User
Hi all,

I'm adding the ability to attach notes to objects in one of my apps, so it would be an EditText view receiving the typed input, a string saving it temporarily, then saving the string in a Map object that is saved to a file using File.WriteMap.

My main question is: Should I be enforcing a max length? That is, if I don't, is something likely to blow up beyond NNN characters?

Related question: Do I need to make sure that delimiter characters like double quotes in the text don't screw things up? (e.g. replace a double quote with %20 like HTML does, and then restore it later on load)?

Thanks!
 

thedesolatesoul

Expert
Licensed User
Longtime User
It shouldnt be a problem. There are no known issues related to this.
The length of the string is probably just limited by the memory.
I havent tried with double quotes inside the string, but im sure it is automatically escaped otherwise things like JSON wouldnt work.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Limiting things is always a good option to prevent issues.

%20 is space, double quote should be %22 but I don't see a reason to replace that?
 
Upvote 0
Top