Ti7a
Ti7a

Reputation: 101

how to extract web text in android like rss to display it on android GUI?

how to extract some criteria from this page http://www.zigwheels.com/api/zigtvApi.php?method=data&module=News&section=News

and filter this ( content_id , thumbnail, summary , headline , image) to display them as rss feeds in my android GUI

Upvotes: 0

Views: 404

Answers (2)

Ovidiu Latcu
Ovidiu Latcu

Reputation: 72311

You are receiving a JSONArray from that page. You should create some objects from that JSONArray which will be later displayed in a ListView. For retrieving objects from that feed you could use Json or Gson as @Marvin Pinto suggested, or you could also have a look at my ObjectFactory project, which is a very simple and easy to use parser. It can simply create your objects from a json or xml feed, and you could also use it asynchronously.

After you fetch your objects, with your desired option, you can create a ListAdapter and use it to display your objects in your ListView.

Upvotes: 0

Marvin Pinto
Marvin Pinto

Reputation: 30980

The output from that URL looks like a JSON feed. You can easily parse JSON data in Android using the JsonObject - see this tutorial for a comprehensive example.

A better (and probably easier) solution would be to use Google Gson and extract the object that way. I've written a full (compilable) program you can use as an example here.

Upvotes: 1

Related Questions