简体   繁体   中英

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

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 .

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM