views:

51

answers:

1

Hello, I have a Website, which is built upon a CMS, written in PHP. And now i'm trying to develop an App. I want the app to check for Updates on the website every time it starts, for example, if a new article is added to the website, a news about this publishment should be displayed on the app.

My knowledge in this area is very poor. Can somebody tell me, what i should do on the website and what should be done on the app?

A: 

1) You can check the database of your CMS for recent updates via a web service (as you cannot use mysql remotely/directly from Android; assuming your CMS DB is a mysql db). This would mean that your CMS / you must provide a web services API for such function.

2) Or you could provide RSS feeds from your CMS and retrieve the RSS feed via http request and parse it. Maybe the RSS approach is simpler, a java RSS parser if for example as used in http://www.ibm.com/developerworks/opensource/library/x-android/index.html#resources or http://code.google.com/p/android-rss/

Many CMS have RSS function built-in already by default. Which CMS are you using? Here's also an article how to parse rss (xml) feeds from i.e. a website: http://www.ibm.com/developerworks/opensource/library/x-android/index.html

(Edited reply: correction, Rome lib doesn't work on Android. Corrected lib and url above.)

Mathias Lin
Thank you very much! These Informations are very helpful for me! I will check out which CMS is used, cause i don't build the website myself and it is being building now.
TianDong
The links are very good. Many Thanks again.
TianDong