title: Android: Unable to Dismiss ProgressDialog
body: <p>This is how I am creating the PorgressDialog:</p>
  
  <pre><code>... progressBarDialog = new ProgressDialog( context );
                    progressBarDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  progressBarDialog.show(this, "Please Wait", "Updating your GPS coordinates",false,true);
  
  
  //Trigger GPS service to update coordinates
  fg.myOnresume(Name);
  fg.dontSendSMS();
  //Sets the timer at 30 secs
  timer= new Timer();
  timer.schedule(new startMapActivity());
  }
  class startMapActivity extends TimerTask 
      {
          @Override
          public void run() 
          {
              //handler.sendEmptyMessage(0);
              Log.d("", "StartMapActivty---&gt;&gt;&gt;run()");
              // Dismissing Dialog Box
              if(progressBarDialog.isShowing())
              {
                  progressBarDialog.dismiss();
              }
  
          }
      }
  </code></pre>
  
  <p>So Basically after the the timer finished after 30sec I want to dimiss the Dialog, but it is not working :( Please help.</p>