开发者

Easiest way to implement RSS reader on Google Android?

开发者 https://www.devze.com 2022-12-23 03:15 出处:网络
This is my first time on stack overflow, so I apologize if this question has been asked before, but is there an easy way to implement an RSS reader on the Google Android (API 1.5)?

This is my first time on stack overflow, so I apologize if this question has been asked before, but is there an easy way to implement an RSS reader on the Google Android (API 1.5)?

I'm searched far and wide with the code sources I know of, and I've only found one implementation which takes 6 different classes and doesn't seem to compile on the current Android SDK's.

If I end up having to write my own, I'll be开发者_JS百科 sure to post it here later on.

Thanks a lot.


You can find a great IBM article here that contains the full source code download (and explanation) for fetching, reading and parsing an RSS feed in android. It targets SDK version 3 and should be close to what you are looking for. I was able to upgrade it to 2.1 with almost zero modification, and kept a track of what I changed here.


You must be talking about NewsDroid? I found that too and had to do a lot of code modification to get it running on the 2.1 SDK. The part I dislike is that you get headlines, but have to navigate to the web page to get details. I prefer to download the story if at possible for off-line caching.

There is a nice open source on on GitHub called FeedDroid. (http://github.com/determinato/feeddroid). It leverages the Google Reader instead of direct RSS, and it is very well written. It downloads the stories to the local DB. Very helpful for learning as it makes use of a service implementation as well.


The rss format is a simple xml document which is easy to parse via DOM for example. You can use the HTTPClient build in to android to fetch the data from the network. Good luck. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消