title: Running a method works in BroadcastReceiver but then a looped method fails
body: <p>If I run my <code>onReceive()</code> method with just a simple toast, my app runs. But when I try to perform a loop and then show a toast, my program crashes. Is there something saying that I can't perform loops in an <code>onReceive()</code> method?</p>
  
  <pre><code>  @Override
          public void onReceive(Context ctx, Intent intent) {
              DBAdapter havetododb = new DBAdapter(ctx);
              Cursor cursor = havetododb.fetchAllItems();
              if (cursor.moveToFirst()) {
                  do {
                      String title = cursor.getString(cursor.getColumnIndex("item"));
                      Toast.makeText(ctx, title, Toast.LENGTH_LONG).show();
      } while (cursor.moveToNext());
      }
      cursor.close();
  }
  </code></pre>
  
  <p>I tried to search my logcat for errors, but it seems to come up empty.</p>