doinbackground func
<p>i need help in my graduation project
i make navigation system  use asynctask class to make the process that take long time to done in the background thread with the code:</p>

<pre><code>ImageButton s=(ImageButton)findViewById(R.id.imageButtonDriveto);       

    s.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {

            new VerySlowTask().execute();
        }
    });
</code></pre>

<p>and class asynctask:</p>

<pre><code>private class VerySlowTask extends AsyncTask&lt;Void, Long, Void&gt; {
      private final ProgressDialog dialog= new ProgressDialog(InformationActivity.this);
      // can use UI thread here
      protected void onPreExecute() {


      this.dialog.setMessage("Wait\n for map...");
      this.dialog.show();
      }
      // automatically done on worker thread (separate from UI thread)
      @Override
      protected Void doInBackground(final Void... args) {
      try{
      // simulate here the slow activity

          Thread.sleep(10000);
         Intent drivetomap=new Intent(InformationActivity.this,KmlActivity.class);
            startActivity(drivetomap);
      } catch(InterruptedException e) {
      Log.v("slow-job being done", e.getMessage());
      }
      return null;
      }
      //periodic updates -it is OK to change UI
      @Override
      protected void onProgressUpdate(Long... value) {
      super.onProgressUpdate(value);
      }
      //can use UI thread here
      @Override
      protected void onPostExecute(final Void unused) {

          if(this.dialog.isShowing()) {
      this.dialog.dismiss();
      }
</code></pre>

<p>the proplem is the progressbar not still loading it gave me black screen and then start the activity
as i understand that (doinbackground) do that</p>
