Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the most widely used feed-parsing library for Android

Tags:

java

android

I want to make an app which (amongst other things) can parse feeds loaded via the network. Given that the standard Android + Core Java libraries do not provide a feed parser service and I don't want to write a one myself, can you nominate a Java feed parser which will work on a low-spec Android device.

I'm just starting out learning Android, having completed the Hello World examples I'd like to move onto my first app. I want to make something which parses some ATOM or RSS feeds and displays some content in a GridView.

The UI stuff seems to be very well documented in Android, and Sun have plenty of examples of how to retrieve a URL, however I'm not so how to do the feed parsing.

Previously when I've done this sort of thing in Pythion I use a general purpose feed parser which can parse pretty much anything (e.g. RSS, ATOM). There are plenty of good Python implementations of this sort of thing, however I've not found anything like this as part of the standard Android library.

At work I've done (light) maintenance on corporate java apps. The general practice seems to be to take whatever classes you like (e.g. the Jakarta Commons feed-parser) and simply bundle them into the CLASSPATH. Desktop apps do not care how big the dependancies are, however I'm sure that's a big issue when compiling an APK bundle for use on a device with limited meory. Surely I have to be very picky about what kind of Jars I depend on, right? Can I just go ahead and use the same classes that I'd use for desktop apps?

Notes:

  • My background is in Python (with only light Java experience)
  • Ideally I'd like to use something popular (not neccecarily the best) so I can get support on it.
  • Even better, I'd like to use built in library functionality so I dont have to add any 3rd party Jars to bloat my app.
  • Currently targeting Android 1.5 (because that's what my device runs)
like image 306
Salim Fadhley Avatar asked Jan 05 '10 17:01

Salim Fadhley


People also ask

What do you mean by parsing in Android?

What is Parse? Parse is an open-source Android SDK and back-end solution that enables developers to build mobile apps with shared data quickly and without writing any back-end code or custom APIs. Parse is a Node.

What is universal feed parser?

Universal Feed Parser is a Python module for downloading and parsing syndicated feeds. It can handle RSS 0.90, Netscape RSS 0.91, Userland RSS 0.91, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, Atom 1.0, and CDF feeds.


2 Answers

Rome appears to be one of the most popular java RSS libraries. I guess it can be used on Android too.

like image 158
Bozho Avatar answered Oct 01 '22 19:10

Bozho


Since RSS/Atom feeds are essentially XML documents you can use SAXParser, which is part of the standard Java libraries included with Android.

like image 33
James Goodwin Avatar answered Oct 01 '22 19:10

James Goodwin