title: How to bind ProgressDialog to RoboAsyncTask
body: <p>I'm following the example from here on how to work with background tasks in RoboAsyncTask: <a href="https://code.google.com/p/roboguice/wiki/RoboAsyncTask" rel="nofollow">https://code.google.com/p/roboguice/wiki/RoboAsyncTask</a></p>
  
  <p>However, in my code when I try to <code>@Inject ProgressDialog dialog</code> I get a runtime error:</p>
  
  <pre><code>Process: com.aerstone.mobile, PID: 5118
  com.google.inject.ConfigurationException: Guice configuration errors:
  1) Could not find a suitable constructor in android.app.ProgressDialog. Classes 
     must have either one (and only one) constructor annotated with @Inject or a
     zero-argument constructor that is not private.
  
     at android.app.ProgressDialog.class(Unknown Source)
  
     while locating android.app.ProgressDialog
     for field at com.aerstone.mobile.ui.task.SaveUserProfileTask.dialog(Unknown Source)
     while locating com.aerstone.mobile.ui.task.MyTask
  </code></pre>
  
  <p>My code is like so:</p>
  
  <pre><code>public class MyTask extends RoboAsyncTask&lt;String&gt; {
     @Inject protected ProgressDialog dialog;
      protected String name;
  
      public MyTask (Context context, String name) {
          super(context);
          this.name = name;
      }
    ....
  }
  </code></pre>
  
  <p>It gets called from an activity like this: <code>new MyTask(getApplicationContext(), "some name").execute();</code></p>