Is there a way to save listArrays in roaming Settings? In js I would do it like that:
var test = [];
test.push({var1:'somevalue',var2:'someotherstuff'});
but how to save this in:
var appData = Windows.Storage.ApplicationData.current;
var roamingSettings = appData.roamingSettings;
when I try to set the variable like:
roamingSettings.values['myArrayList'] = test;
I get a typeconflict error. Any ideas how to fix this?
You apparently cannot store an object in the
localSettingsorroamingSettingsvalues field. However, you can always just stringify and parse your array into JSON to store it instead.and
Just remember that the array cannot exceed 8 KB in size for roaming settings. Since you have to stringify it, this includes all the JSON brackets and white space!