Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Its my code for Sending some data to Server database,I hope It will help You</p> <pre><code> private void validat_user(String stg1, String stg2,String stg3, String stg4,String stg5, String stg6,String stg7, String stg8,String stg9, String stg10,String stg11) { WebServiceTask wst = new WebServiceTask(WebServiceTask.POST_TASK, this, "Authentication in progress..."); wst.addNameValuePair("A_ID", stg1); wst.addNameValuePair("A_NAME", stg2); wst.addNameValuePair("A_PWD1", stg3); wst.addNameValuePair("A_JOIN", stg4); wst.addNameValuePair("A_END", stg5); wst.addNameValuePair("A_COURSE", stg6); wst.addNameValuePair("A_FACID", stg7); wst.addNameValuePair("A_SESSION", stg8); wst.addNameValuePair("A_BATCH", stg9); wst.addNameValuePair("A_BRANCH1", stg10); wst.addNameValuePair("A_GENDER", stg11); wst.execute(new String[] { SERVICE_URL }); } @SuppressWarnings("deprecation") public void no_net() { display( "No Network Connection"); final AlertDialog alertDialog = new AlertDialog.Builder(Staff.this).create(); alertDialog.setTitle("No Internet Connection"); alertDialog.setMessage("You don't have internet connection.\nElse please check the Internet Connection Settings."); //alertDialog.setIcon(R.drawable.error_info); alertDialog.setCancelable(false); alertDialog.setButton("Close", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { alertDialog.cancel(); Staff.this.finish(); System.exit(0); } }); alertDialog.setButton2("Use Local DataBase", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { display( "Accessing local DataBase....."); alertDialog.cancel(); } }); alertDialog.show(); } private class WebServiceTask extends AsyncTask&lt;String, Integer, String&gt; { public static final int POST_TASK = 1; private static final String TAG = "WebServiceTask"; // connection timeout, in milliseconds (waiting to connect) private static final int CONN_TIMEOUT = 3000; // socket timeout, in milliseconds (waiting for data) private static final int SOCKET_TIMEOUT = 5000; private int taskType = POST_TASK; private Context mContext = null; private String processMessage = "Processing..."; private ArrayList&lt;NameValuePair&gt; params = new ArrayList&lt;NameValuePair&gt;(); private ProgressDialog pDlg = null; public WebServiceTask(int taskType, Context mContext, String processMessage) { this.taskType = taskType; this.mContext = mContext; this.processMessage = processMessage; } public void addNameValuePair(String name, String value) { params.add(new BasicNameValuePair(name, value)); } </code></pre>
 

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