Im sorry if this is in the documentation or already has been answered but when i searched in both the site and in the documentation i couldn't find anything...
Well i wonder if its possible to fetch a database with news information from example http://www.exampel.com so the app always is fetching and updated with the latest news from our website.
Exampel code commented would be really appreciated :)
i think you should try to create webservice which returns the data as you expect...
I'd recommend looking at two methods for this:
- Create the syncing mechanism manually in your web service. Maybe use XML documents to transfer the information.
The deciding factors will be the amount of information needing to be transferred, what your current web service is and the remote database type.
From your question I'd imagine that there won't be too much data being transferred, and therefore would probably be easier just requesting and caching an xml file generated by your web service.
Thank you all for the fast reply & help! As with webservice & Alloy/XML do you have some example code more on the docs on Titanium website i could look at?
For Alloy, read the Readme on the Github, it has an installation guide and code examples.
For the web service, I'd need to know what web service you have got currently or plan to use and what database you have or plan to use.
But for the sake of showing you it can be done, here's a PHP tutorial.
You will request the file from your app using an xhr object. Here is the tutorial.
So it can be done, you will just need to adapt to your project. Hope that helps!
Think you can help? Login to answer this question!