title: AsynsTask and FragmentManager
body: <p>I want to add an Array of Fragment in an AsyncTask like this (the code is in the doInBackground method):</p>
  
  <pre><code>   for (int i = 0; i &lt; mNumberOfAlarm; i++) {
  
                      code = cursor.getInt(DATABASE_COLUMN_CODE);
                      id = cursor.getInt(DATABASE_COLUMN_ID);
                      Log.i("retrieve code databse", " " + code + " " + id);
                      arrayInstanceAlarmFragment.add(InstanceAlarmFragment.newInstance(code));
                      getChildFragmentManager().beginTransaction().add(R.id.instance_of_alarm, arrayInstanceAlarmFragment.get(i)).commit();
  
                      cursor.moveToNext();
  
                  }
  </code></pre>
  
  <p>But i have a problem at the line :</p>
  
  <pre><code>getChildFragmentManager().beginTransaction().add(R.id.instance_of_alarm, arrayInstanceAlarmFragment.get(i)).commit();
  </code></pre>
  
  <p>It works but not in background thread, so i have a choregrapher warning like this:</p>
  
  <p>I/Choreographer: Skipped 120 frames!  The application may be doing too much work on its main thread.</p>
  
  <p>I don't understand because the work is doing in the doInBakcground method of my AsyncTask ?</p>
  
  <p>thanks a lot for your help.</p>