Android Question Error reading Boolean value from map.

U

unba1300

Guest
Hi. I have a key dimmed as Boolean and a value of False in a text file that I read as a map when my app starts. This approach has worked well for saving and getting settings that are strings and numbers, but when I do it with a Boolean key and value, I get the error message java.lang.RuntimeException: Cannot parse: False as boolean. Do I need to use an INT or String instead for the storage and then do some conversion with IF THEN when reading?
 

DonManfred

Expert
Licensed User
Longtime User
See here. You have to use false and true to reread the boolean from a string. (Lowercase)
 
Upvote 0
Top