@Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (data != null) {

      final Bundle extras = data.getExtras();

      switch (requestCode) {
        case 0:

          // Add category

          // Does the user want to continue, or did he press "dismiss"?
          if (extras.getString("continue").equals("TRUE")) {
            // Get name, slug and desc from Intent
            final String category_name = extras.getString("category_name");
            final String category_slug = extras.getString("category_slug");
            final String category_desc = extras.getString("category_desc");
            final int parent_id = extras.getInt("parent_id");

            if (loadTextArray.contains(category_name)) {
              // A category with the specified name already exists
            } else {
              // Add the category
              pd =
                  ProgressDialog.show(
                      SelectCategoriesActivity.this,
                      getResources().getText(R.string.cat_adding_category),
                      getResources().getText(R.string.cat_attempt_add_category),
                      true,
                      true);
              Thread th =
                  new Thread() {
                    public void run() {
                      finalResult =
                          addCategory(category_name, category_slug, category_desc, parent_id);

                      if (finalResult.equals("addCategory_success"))
                        loadTextArray.add(category_name);

                      mHandler.post(mUpdateResults);
                    }
                  };
              th.start();
            }
            break;
          }
      } // end null check
    }
  }
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   mObserverManager.fire(new OnActivityResultEvent(requestCode, resultCode, data));
 }