Note that there are some explanatory texts on larger screens.

plurals
  1. POasync process dialog not showing in application in android
    text
    copied!<p>async process dialog is not showing in application in android. Can anybody tell me what the problem is?</p> <p>My code</p> <pre><code>public void onClick(View v) { new FetchTask(getBaseContext()).execute(null); } public class FetchTask extends AsyncTask&lt;Object, ArrayList,ArrayList&gt; { private ProgressDialog dlg; private Context ctx; public FetchTask(Context context) { ctx = context; } @Override protected void onPreExecute() { dlg = new ProgressDialog(ctx); dlg.setMessage("Loading...."); dlg.show(); super.onPreExecute(); } @Override protected void onPostExecute(ArrayList parserValue) { dlg.dismiss(); for(int i=0;i&lt;parservalue.size();i++) { DomParserDataSet dataset=(DomParserDataSet)parservalue.get(i); if(dataset.getToken_string().length()&gt;1) { Intent homeIntent=new Intent(ctx,HelloTabWidget.class); homeIntent.putExtra("strUserName", username); homeIntent.putExtra("strPassword",password ); homeIntent.putExtra("questGroupId",dataset.getQuest_group_id()); homeIntent.putExtra("userid",dataset.getUser_id()); homeIntent.putExtra("systemuserid", dataset.getSystem_user_id()); homeIntent.putExtra("providerid",dataset.getIndex_provider_id()); startActivity(homeIntent); //startActivity(new Intent(this,HelloTabWidget.class)); } else { DomParserDataSet dataset1=(DomParserDataSet)parservalue.get(i); AlertDialog.Builder alertbox = new AlertDialog.Builder(ctx); alertbox.setMessage(dataset1.getError_value()); alertbox.setNeutralButton("Ok", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int arg1) { // the button was clicked dialog.cancel(); } }); // show it alertbox.show(); } } // display data } @Override protected ArrayList doInBackground(Object... arg0) { try { username=edtUserName.getText().toString(); password=edtPassword.getText().toString(); WebService service=new WebService(); String webservicevalue=service.callServer(SOAP_ACTION,"", username,password,URL); webservicevalue=decodeXMLData(webservicevalue); DomParser xmlParser=new DomParser(); parservalue=xmlParser.parseXmlFile(webservicevalue); String parservalue1=Integer.toString(parservalue.size()); Log.d("parser value size is",parservalue1); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return parservalue; } } </code></pre> <p>Can anybody tell me what I have to change?</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