I want to ask if there is a maximum length/size of the data stored in preferences library, i want to save some things in there, i succesfully saved short String (in my case wifi SSID and PASSWORD), but i wanted to save some other authentification credentials, for example some tokens of firebase that are pretty long (for example: fMyxcL2tQh6D7wkVW9d6vC:APA91bEK4SOoCgyWFr85pM7w-UHJ6ZU-IIgJFhUiVhsjiJg3KOtZgMtEdv7jqxXpcfhO-x3N_PeOIcpGlmj5tTnATnHXbU87bAYp2aqLHpxq1M48KRwPbKigyuJVIcusLgqH-F2BdCC4), so how can i store that kind of data? (my last option is to save that directly in the server, but i really want to have them stored locally )
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/storage/nvs_flash.html
String values are currently limited to 4000 bytes. This includes the null terminator. Blob values are limited to 508,000 bytes or 97.6% of the partition size - 4000 bytes, whichever is lower.
Yeah! was my fault, the problem wasn't the string, was the key! i put a key with 17 characters and just 15 are allowed in preferences. Thanks for the clarification
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.