title: Android: onActivityResult in fragment not called
body: <p>Found numerous post regarding my issue but none of them worked out for me. I have a fragment from where I have to call <code>startActivityForResult()</code> on a textview click. From there, an activity will open up where user will fill some data and submit it to database. From there, I have to pass an intent containing the result code. But the onActivityResult() in fragment is not get called.</p>
  
  <p><strong>Code from my fragment</strong> </p>
  
  <pre><code>Intent in = new Intent(getActivity(), NetBarrelActivity.class);
          in.putExtra(AppUtility.ORDER_ID, orderDAO.getOrderNum());
          in.putExtra(AppUtility.TICKET_ID, 2);
          startActivityForResult(in, AppUtility.REQUEST_CODE);
  </code></pre>
  
  <p><strong>Code from my activity</strong></p>
  
  <pre><code>Double NetBarrels = crudeNetCalculator(GrossBarrels,
                          ProductObsTemp, ProductObsGravity, ProductBSW);
                  db.updateTank(OrderID, TicketTypeID, CarrierTicketNum,
                          TankNum, TankTypeID, ProductObsTemp,
                          ProductObsGravity, ProductBSW, GrossBarrels,
                          NetBarrels);
                  Intent in = new Intent();
                  setResult(RESULT_OK, in);
                  finish();
  </code></pre>
  
  <p>onActivityResult in Fragment:</p>
  
  <pre><code>    @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      Log.d(TAG, "onActivityReslt called");
      super.onActivityResult(requestCode, resultCode, data);
      switch (requestCode) {
      case AppUtility.REQUEST_CODE:
          if(resultCode == Activity.RESULT_OK){
              if (mOrdersDAO.getTicketType().equals(AppUtility.NET_BARREL)) {
                  ArrayList&lt;OrderTicketsDao&gt; mOrderTicketsDaos = dbHandler
                          .getOrderTicket(mOrdersDAO.getOrderNum());
                  if (mOrderTicketsDaos != null &amp;&amp; mOrderTicketsDaos.size() &gt; 0) {
                      TankAdapter mTankAdapter = new TankAdapter(getActivity(),
                              mOrderTicketsDaos);
                      listTank.setAdapter(mTankAdapter);
                      mTankAdapter.notifyDataSetChanged();
                  }
              }
          }
          break;
  
      default:
          break;
      }
  }
  </code></pre>
  
  <p>So, how do I send intent back to my fragment with result code?</p>