title: problem is in ASyncTask class in Android
body: <p>basically i am reading image bytes from file i have a loop which has to read almost 20 images from file and in this loop i have making the object of my class which extends ASyncTask class and i am reading bytes and drawing on canvas in <code>doItBackground()</code> method and setting my image on <code>onPostExecute()</code> method. so basically Asynchronously 20 threads starts execution in background. now problem is it is not showing any image. </p>
  
  <p>anybody have any idea how to handle multiple AsyncTask class? here is my code.</p>
  
  <pre><code>    @Override
      protected Void doInBackground(Void... params) 
      {
  //      Log.i("start background thread", "start background thread");
          Set&lt;Integer&gt; keys;
          keys = iTileListOffsets.keySet();
          boolean found = false;
          Object key[] = keys.toArray();
          int k = 0;
  
          for (int i=0; i &lt; key.length &amp;&amp; found==false ; i++)
          {               
              k = (Integer) key[i];
              MapTileHeader tileHeader = iTileListOffsets.get(k);
              if (tileHeader.equalsWith(mapTile.getiMapTileHeader()) )
              {                   
                  found = true; 
              }
          }
  
          if(found)
          {           
              try 
              {   
                  synchronized (MapMaker.getSingletonObject()) 
                  {
                      fc.position(0);                     
                      input.skipBytes(k);                         
                      int tSizeOfTile = input.readInt();              
                      mapTile.loadTileWithFileHeader(input, tSizeOfTile, headerBytesArray);
                  }
  
                  mapMaker.getBufferedTilesDataList().add(mapTile);                       
              }
              catch (Exception e)
              {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  
              byte imageTile[] = mapTile.getImageTilesBytes();             //bufferedTile.getImageTilesBytes();                   
  
              if(mapTile.getImageTilesBytes() != null)
              {                       
                  try
                  {
                      Bitmap tileBitmap = BitmapFactory.decodeByteArray(imageTile, 0, imageTile.length);
                      canvas.drawBitmap(tileBitmap, rect.left, rect.top, null);
                      tileBitmap = null;
                  }
                  catch(Exception e)
                  {
                      e.printStackTrace();
                  }                   
              }
          }
  //      Log.i("ENDDDD background thread", "ENDDD background thread");
          return null;
      }
  
      @Override
      protected void onPostExecute(Void result)
      {
          // TODO Auto-generated method stub
          super.onPostExecute(result);        
          Log.i("start POSTECEXCUTE thread", "start POSTECEXCUTE thread");
  
          MyRect mapRect = aBufferArea.GetScreenRectangle(buffer, aScrnArea); 
          Bitmap smallBitmap = Bitmap.createBitmap(bitmap, mapRect.left, mapRect.top, mapRect.width, mapRect.height);         
          image.setImageBitmap(smallBitmap);
  
          Log.i("ENDDDDD POSTECEXCUTE thread", "ENDDDD POSTECEXCUTE thread");
      }
  </code></pre>
  
  <p>thanks </p>