Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yes , its right . U can as many times as u want to call . But a small modification can be done , instend of call 4 AsyncTask , u can one AsyncTask by making its generic in flow .<br> `</p> <pre><code>public class GetDataFromNetwork extends AsyncTask&lt;Void,String,Object&gt; {private String ipAddress; private String webService; private String nameSpace; private String methodName; private Context context; private ProgressDialog progressDialog; private SoapObject request; private GetDataCallBack callBack; /** * Set default progress Bar properties. Internal function called from setConfig * * @param progressBarStyle : Progress Dialog style (spinner or horizontal) * @param message : Message to be displayed on progressBar */ protected void setProgresDialogProperties(int progressBarStyle, String message) { progressDialog = new ProgressDialog(context); progressDialog.setProgress(0); progressDialog.setMax(100); progressDialog.setProgressStyle(progressBarStyle); progressDialog.setMessage(message); } public GetDataFromNetwork(Context context,int progressBarStyle,String message ,GetDataCallBack callBack) { this.callBack=callBack; this.context=context; setProgresDialogProperties(progressBarStyle, message); } /** * Used for setting up the location and config of remote location/webservice * @param ipAddress : IP of webservice * @param webService : Name of webservice * @param nameSpace : NameSpace of webService * @param methodName :Name of function of the particular webservice */ public void setConfig(String ipAddress,String webService,String nameSpace,String methodName){ this.ipAddress=ipAddress; this.webService=webService; this.nameSpace=nameSpace; this.methodName=methodName; } /** * Set parameter in SoapObject * @param requestParamater : Map of request */ @SuppressWarnings("rawtypes") public void sendData(HashMap&lt;String, Object&gt; requestParamater) { } } @Override protected void onPreExecute() { super.onPreExecute(); progressDialog.show(); } @Override protected Object doInBackground(Void... params) { return result; } @Override protected void onPostExecute(Object result) { super.onPostExecute(result); progressDialog.dismiss(); }` </code></pre> <p>Now u can call this class when ever u want to interact with ur server.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload