08-05-2011 01:08 AM
I need a very basic example of caching on webworks for a BB app which will save a previously loaded (from the internet) string for use later on.
I looked at the "weather app" example but its too complicated for a beginner like me to just understand.
Its kinda urgent so I'd appriciate ant help anyone can offer.
08-05-2011 09:49 AM
The easiest way to persist one piece of data is HTML5 Local Storage. Check out the API - http://www.blackberry.com/developers/docs/webworks
08-07-2011 02:44 AM
If you are planning to save the data to device then you could use HTML5 database. See these links for details
You could also use File API to write data into file. http://www.blackberry.com/developers/docs/webworks
08-10-2011 01:02 AM
Thanks for all the help guys,
But I'm still quite stuck as I was when i fist asked you guys.
I used the structure of the sample app, but I have no way of testing it.
When I use chrome I get a error saying: " Origin file:// is not allowed by Access-Control-Allow-Origin."
And when I tried to run it on the simultor it said the browser does not suport databases. The simulator is a BB9700 using OS 184.108.40.2069
Can someone help me with a basic app that would merely access a URL and store the content of the destination in any form/location that can be accessed later when there is no interet connection.
08-12-2011 11:56 AM
If you want to get it running from chrome I believe you will have to run it with one or both of the following options "--allow-file-access-from-files", "--disable-web-security".
As per the 5.0 simulator not working, please check that you are building the app with the newest SDK and you are simulating an SD card by going Simulate>Change SD Card and making sure there is an entry there.