0

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

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

hey there check this this is the simplist p-xr.com/… '''''''''''''' but the problem is with ,,,JSONArray earthquakes = json.getJSONArray(“earthquakes”); ,,,,,,,,,,,,,, in my case as this link ,,,,,zigwheels.com/api/…,,,,,, it is not array so i will return the object directly so how will it be made how to loop or to get all info from page ???
0

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.

1 Comment

hey there check this this is the simplist p-xr.com/… '''''''''''''' but the problem is with ,,,JSONArray earthquakes = json.getJSONArray(“earthquakes”); ,,,,,,,,,,,,,, in my case as this link ,,,,,zigwheels.com/api/…,,,,,, it is not array so i will return the object directly so how will it be made how to loop or to get all info from page ???

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.