title: Android: dialogbox according to logcat response for webservices
body: <p>I am accessing <code>.net</code> web services through my Android Application.  If the user is successfully registered then log cat will show 1 as the response. If not it will show 0  and If some field  is missing then it will show -1 as response. so is it possible to show a dialog box according to the log cat response? </p>
  
  <p>If response is 1 then <code>"successfully registered"</code></p>
  
  <p>If response is 0 then <code>"Try Again"</code></p>
  
  <p>How can we do this?</p>
  
  <p><code>Log.v("TAG", String.valueOf(resultsRequestSOAP));</code> with this I am getting the response in logcat</p>
  
  <p>Help is always appreciated....Thanks! </p>
  
  <p>In this piece of code,I want to add the required code to show the dialog box.</p>
  
  <pre><code>   Button signin = (Button) findViewById(R.id.regsubmitbtn);
  
      signin.setOnClickListener(new OnClickListener() {
          public void onClick(View v) {
              showDialog(0);
              t = new Thread() {
                  public void run() {
                      register();
                      try {
                          Thread.sleep(5000);
                          removeDialog(0);
  //   I want to show the dialog box like registered successfully after removing this dialog//
              } catch (InterruptedException e) {
                  e.printStackTrace();
              }
                  }
              };
              t.start();
          }
      });
         @Override
  protected Dialog onCreateDialog(int id) {
      switch (id) {
      case 0: {
          dialog = new ProgressDialog(this);
          dialog.setMessage("Registering...");
          dialog.setIndeterminate(true);
          dialog.setCancelable(true);
          return dialog;
      }
      }
      return null;
  } 
  </code></pre>