title: When onActivityResult is ran resultCode is 0 and data is null
body: <p>I have an activity that sends a boolean array from my inventory class back to my mainGame activity. But when onAcivityResult runs resultCode is 0 and my data is null.</p>
  
  <p>starting the Inventory activity:</p>
  
  <pre><code>@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
      public void openInventory(View V) {
          Intent bag = new Intent(MainGame.this, Inventory.class);
          bag.putExtra(booInventory, inventory);
          startActivityForResult(bag, requestItem);
      }
  </code></pre>
  
  <p>ending the Inventory activity:</p>
  
  <pre><code>public void onPause(){
          Intent Item = new Intent(Inventory.this, MainGame.class);//data sent to MainGame activity
          Item.putExtra(tools, itemUsed);
          setResult(RESULT_OK, Item);
          super.onPause();
      }
  </code></pre>
  
  <p>onActivityResult: (toaster is a method that creates toast)</p>
  
  <pre><code>@Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          if(requestCode == 2){
              if(resultCode == RESULT_OK){
                  toaster("result is ok", 500);
              }
  
              if(data != null){
                  toaster("it worked", 1500);
              }else{
                  toaster("FAIL!", 1500);
              }
  }
  </code></pre>