title: Compensating for the shortcomings of AsyncTask with BetterAsyncTask (Droid-Fu)
body: <p>After a lengthy and unsuccessful search on google, it turns out that there is hardly any information about a handy library called <strong>Droid-Fu</strong> <a href="https://github.com/kaeppler/droid-fu" rel="nofollow">https://github.com/kaeppler/droid-fu</a></p>
  
  <p>After reading the introduction by the creator (<a href="http://brainflush.wordpress.com/2009/11/16/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask/" rel="nofollow">http://brainflush.wordpress.com/2009/11/16/introducing-droid-fu-for-android-betteractivity-betterservice-and-betterasynctask/</a>) or the API (<a href="http://kaeppler.github.com/droid-fu" rel="nofollow">http://kaeppler.github.com/droid-fu</a>), I could not figure out how to define a new betterasynctask (what methods hold what information etc). </p>
  
  <p>So if there is anyone out there that could provide me (and apperently others as well) with some useful source code or tutorials, I would greatly appreciate it!</p>
  
  <p>(If you need the jar file of the project, let me know, I can send you a copy)</p>
  
  <p><em>EDIT:</em></p>
  
  <p><strong><a href="http://code.google.com/p/edwardslab-android/source/browse/Mobile+Metagenomics/src/edwardslab/util/ResultView.java?spec=svn159&amp;r=159" rel="nofollow">A good example can be found here!</a> and <a href="http://code.google.com/p/edwardslab-android/source/browse/Mobile%20Metagenomics/src/edwardslab/util/MobileMetagenomics.java" rel="nofollow">here</a></strong></p>
  
  <p>Ok, here is some additional information I found in the source code:</p>
  
  <ol>
  <li>A progress dialog is automatically shown. See useCustomDialog(), disableDialog()</li>
  <li>If an Exception is thrown from inside doInBackground, this is now handled by the  handleError method.</li>
  <li>You should now longer override onPreExecute(), doInBackground() and onPostExecute(), instead you should use before(), doCheckedInBackground() and after() respectively.</li>
  </ol>
  
  <p>Let's see what I can achieve from here on then...still looking for a working example though!</p>
  
  <p><em>EDIT 2:</em></p>
  
  <p>A couple of examples can be found <a href="http://code.google.com/p/edwardslab-android/source/browse/Mobile%20Metagenomics/src/edwardslab/util/MobileMetagenomics.java" rel="nofollow">here</a> and <a href="http://code.google.com/p/edwardslab-android/source/browse/Mobile+Metagenomics/src/edwardslab/util/ResultView.java?spec=svn159&amp;r=159" rel="nofollow">here</a>. I stick to it but I get an error. Only difference is that my AsyncTask is not defined within the activity, but a class of its own. Stepping through the code reveals that the error happens upon creation of the (AsyncTask built-in) Dialog.  </p>
  
  <p>This is my stacktrace:</p>
  
  <p>coming in a minute</p>