title: Android file upload progress dialog error
body: <p>i got this AsyncTask file upload:</p>
  
  <pre><code>// ASync Task Begin to perform Billing information
  class performBackgroundTask extends AsyncTask&lt;Void, Void, Void&gt; {
      Context context;
      private ProgressDialog Dialog;
  
      protected void onPreExecute() {
          // here you have place code which you want to show in UI thread like
          // progressbar or dialog or any layout . here i am displaying a
          // progressDialog with test please wait while loading......
  
          Dialog.setMessage(" please wait while loading............");
          Dialog.show();
  
      }
  
  
  
      private Context getApplicationContext() {
          // TODO Auto-generated method stub
          return null;
      }
  
      protected Void doInBackground(Void... params) {
          // write here the code to download or any background task.
          goforIt(); // example call method which will download vedio .
          return null;
      }
  
      protected void onPostExecute(Void unused) {
          Dialog.dismiss();
          // the background task is completed .You can do the code here for next
          // things
  
      }
  
      public void goforIt() {
  
          FTPClient con = null;
  
          try {
              con = new FTPClient();
              con.connect(globalconstant.host);
  
              if (con.login(globalconstant.nev, globalconstant.jelszo)) {
  
                  con.enterLocalPassiveMode(); // important!
                  con.setFileType(FTP.BINARY_FILE_TYPE);
                  String substr = globalconstant.path.substring(4,
                          globalconstant.path.length());
                  String filename = substr + "/Festivale.db";
                  Log.e("TravellerLog :: ", substr + "/Festivale.db");
                  String data = filename;
  
                  FileInputStream in = new FileInputStream(new File(data));
                  boolean result = con.storeFile("/Festivale.db", in);
                  in.close();
                  if (result)
  //                  Toast.makeText(getApplicationContext(),
  //                          "A fájl feltöltve!", Toast.LENGTH_SHORT).show();
  
                  Log.v("upload result", "succeeded");
                  con.logout();
                  con.disconnect();
              }
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
  }
  </code></pre>
  
  <p>but always got error meassage, this:</p>
  
  <pre><code>09-26 11:30:30.538: E/AndroidRuntime(456): java.lang.NullPointerException
  09-26 11:30:30.538: E/AndroidRuntime(456):  at com.eyecom.festivale.performBackgroundTask.onPreExecute(performBackgroundTask.java:25)
  ...
  </code></pre>
  
  <p>the 25th line: <code>Dialog.setMessage(" please wait while loading............");</code></p>
  
  <p>please help me how to make a progress dialog which works with this.
  the original is like: </p>
  
  <blockquote>
    <p>private ProgressDialog Dialog = new ProgressDialog( this);</p>
  </blockquote>
  
  <p>but got error with this too, </p>
  
  <blockquote>
    <p>The constructor ProgressDialog(performBackgroundTask) is undefined</p>
  </blockquote>