11-21-2012 11:09 AM
Hi,
The WebWorks API states:
This API supports BlackBerry 6.0; however, some BlackBerry 6.0 dot revisions may not be fully supported.
Is there a definive list of which revisions support Local Storage fully?
11-22-2012 11:49 AM
There isn't a definitive list as far as I am aware. I believe this has to do with earlier release versions vs. newer release versions, but I'll check to see if I can get some specifics.
11-24-2012 06:49 PM
Start off checking if you have it at all
if(typeof localStorage == 'undefined') {
// Fallback to some other mechanism
} else {
if(typeof localStorage.getItem == 'undefined') {
// Fallback to some other mechanism
}
if(typeof localStorage.setItem == 'undefined') {
// Fallback to some other mechanism
}
if(typeof localStorage.removeItem == 'undefined') {
// Fallback to some other mechanism
}
}
Fallback mechanisms can be varied
If you only need to save small quantities of Data cookies are fine
JSON to a server allows pretty unlimited storage - but you need a server of course
There are several other fallbacks available - Nokia S60 (worst example I can think of) is really had for all fallbacks for example but can still handle a DB layer.
BB5 is a little better and has DB support (the browser is a nightmare though)
11-26-2012 11:10 AM
I'd agree with peardox's approach in verifying that the objects exist. I've tried to dig up specific dot revisions but can't seem to find documentation around it.
12-03-2012 03:57 AM
Thanks for the feedback. I have used the workarounds suggested on the MDN to save small amounts of data. This seems to work in most use cases, except after the battery is replaced in the device...
https://developer.mozilla.org/en-US/docs/DOM/Stora