I am writing a widget which will obtain data from a web request and store this in the object store. Depending on how I use the widget, I could fill up the 8k space limit of the object store. I have options which will delete data, and others that request and save data. Therefore I was wanting to ensure that the data gets saved correctly. I had expected the setProperty to return something other than null when it was successful. But it appears to always return null.
Short of calling setProperty() followed by getProperty() and checking I get what I set, is there a way to ensure that the setProperty worked and that I am not out of space?
In fact, when testing this it seems that in the simulator at least, if you try to save something bigger than 8K you get a runtime out of memory error, if I save multiple objects smaller than this but totalling more than 8K it seems to work but then the whole object store gets wiped when the widget exits.
Short of attempting to manage the size of the data I am saving in the object store myself, what is the best way to use the object store when I could hit the 8K limit?