This question is locked. New answers and comments are not allowed.
Hi
I'm creating a apps that connected to a web service. everything is fine. But I want to save the xml response to local? Im targeting iOS device.
Is there any suggestion? or any sample apps that saving xml response to local storage of iOS device?
I'm creating a apps that connected to a web service. everything is fine. But I want to save the xml response to local? Im targeting iOS device.
Is there any suggestion? or any sample apps that saving xml response to local storage of iOS device?
8 Answers, 1 is accepted
0
Hello Keen,
Take a look at this answer to a forum post about the same inquiry.
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
Take a look at this answer to a forum post about the same inquiry.
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Hristo
Top achievements
Rank 1
answered on 28 May 2013, 12:49 PM
Hi Keen,
The easiest way to save an xml response locally is by using "window.localStorage" (http://docs.phonegap.com/en/2.5.0/cordova_storage_storage.md.html#localStorage). It's a persistent key-value store.
E.g.
localStorage.setItem("webServiceResponse", webServiceResponse);
However, if you want to store the result as a file (and not as a string in a key-value store or a DB), you'd better use Cordova's local FileSystem API: http://docs.phonegap.com/en/2.5.0/cordova_file_file.md.html
Hope this information helps.
Chris
The easiest way to save an xml response locally is by using "window.localStorage" (http://docs.phonegap.com/en/2.5.0/cordova_storage_storage.md.html#localStorage). It's a persistent key-value store.
E.g.
localStorage.setItem("webServiceResponse", webServiceResponse);
However, if you want to store the result as a file (and not as a string in a key-value store or a DB), you'd better use Cordova's local FileSystem API: http://docs.phonegap.com/en/2.5.0/cordova_file_file.md.html
Hope this information helps.
Chris
0
Keen
Top achievements
Rank 1
answered on 30 May 2013, 01:05 AM
Hi chris,
I successfully get the xml response and see in the simulator that it was stored in Localstorage section. Thanks for the help. Im trying to parse it.
I hope jquery mobile will not be slow.
I successfully get the xml response and see in the simulator that it was stored in Localstorage section. Thanks for the help. Im trying to parse it.
I hope jquery mobile will not be slow.
0
Keen Mark
Top achievements
Rank 1
answered on 31 May 2013, 02:09 AM
hey guys i received this message
- Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22 XXXXXX.js:155
- GetRecipeDetailSuccess1CALCMENU.js:155
- st.Callbacks.fjquery-1.9.1.min.js:1
- st.Callbacks.p.fireWithjquery-1.9.1.min.js:1
- rjquery-1.9.1.min.js:3
- st.ajaxTransport.send.r
Does Local storage has a limit size of storage ?
0
Keen
Top achievements
Rank 1
answered on 31 May 2013, 02:11 AM
hey guys i received this message
Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22 XXXXXX.js:155
GetXXXXXXxXXXXXXXXXXXXX1XXXXXXx.js:155
st.Callbacks.fjquery-1.9.1.min.js:1
st.Callbacks.p.fireWithjquery-1.9.1.min.js:1
rjquery-1.9.1.min.js:3
st.ajaxTransport.send.r
Does Local storage has a limit ?
Uncaught Error: QUOTA_EXCEEDED_ERR: DOM Exception 22 XXXXXX.js:155
GetXXXXXXxXXXXXXXXXXXXX1XXXXXXx.js:155
st.Callbacks.fjquery-1.9.1.min.js:1
st.Callbacks.p.fireWithjquery-1.9.1.min.js:1
rjquery-1.9.1.min.js:3
st.ajaxTransport.send.r
Does Local storage has a limit ?
0
Hello Keen,
HTML5 WebStorage suffers from different implementation on different platforms. Mobile Platforms & Browsers combinations differs in size of memory (disk space) quota assigned to each website. As per the W3 documentation:
A mostly arbitrary limit of five megabytes per origin is recommended. Implementation feedback is welcome and will be used to update this suggestion in the future.
If you really need a large space in your application, you should consider using HTML Web SQL Database or SQLite via the support SQLite plugin (clone the sample demo here).
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
HTML5 WebStorage suffers from different implementation on different platforms. Mobile Platforms & Browsers combinations differs in size of memory (disk space) quota assigned to each website. As per the W3 documentation:
A mostly arbitrary limit of five megabytes per origin is recommended. Implementation feedback is welcome and will be used to update this suggestion in the future.
If you really need a large space in your application, you should consider using HTML Web SQL Database or SQLite via the support SQLite plugin (clone the sample demo here).
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Keen
Top achievements
Rank 1
answered on 03 Jun 2013, 01:46 AM
Hi Steve,
Using the HTML Web SQL Database what is the size limit ? and also using the SQLite?
Using the HTML Web SQL Database what is the size limit ? and also using the SQLite?
0
Hello Keen,
WebSQL limitation is around 5MB as well, so you're pretty much bound to use the SQLite plugin for more storage space. You can find more information about the plugin here and for working sample refer to the sample-sqlite.
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
WebSQL limitation is around 5MB as well, so you're pretty much bound to use the SQLite plugin for more storage space. You can find more information about the plugin here and for working sample refer to the sample-sqlite.
Regards,
Steve
Telerik
Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.