Nikunj Paradva Nikunj Paradva - 4 months ago 11
Android Question

How to implement this Webservice Url and how to Check First with post Method?

I have this web service Url: http://citechnology.in/tager/webservices/index.php

And I have two items

action = get_product_list
cat_id =2


Product will have image, title, price and condition i.e. old/new

How to implement in Gridview?

I need your help

This is the type of implementation I need. Please help me!!

Answer

Now, their are a number of ways, to accomplish this. But Ill be going through only one.

  1. Use HttpUrlConnection Class using suitable method and initiate a connection with the web service. Ref. https://developer.android.com/reference/java/net/HttpURLConnection.html
  2. Use InputStream and OutputStream to Manipulate the parameters for the request and Parse the Json.
  3. Add up the data to the gridView using Custom adapter (in your case). Ref. https://developer.android.com/guide/topics/ui/layout/gridview.html, http://www.tutorialspoint.com/android/android_grid_view.htm