title: How to make Intent expect (String, Serializable) instead of (String, boolean)?
body: <p>I want this line of code to expect (String, Serializable) but it expects (String, boolean) instead. </p>
  
  <pre><code>intent.putExtra(CheckoutActivity.ZOOZ_INVOICE, invoice);
  </code></pre>
  
  <p>The error is: </p>
  
  <p>The method putExtra(String, boolean) in the type intent is not applicable for the arguments (String, ZoozInvoice).</p>
  
  <p>I want these arguments to have a (String, Serializable) signature instead of (String, boolean). It should be like this.</p>
  
  <p>CheckoutActivity.ZOOZ_INVOICE = name</p>
  
  <p>invoice = value</p>
  
  <p>I have tried writing it like this: </p>
  
  <pre><code>intent.putExtra(CheckoutActivity.ZOOZ_INVOICE, invoice(CheckoutActivity.ZOOZ_INVOICE, invoice));
  </code></pre>
  
  <p>This is accepted by Eclipse with no errors, and no compiling errors. However, the code does not work or do what it is supposed to.</p>
  
  <p>In addition, I have tried to changing 'putExtra' to 'getIntExtra' instead and this error appears:</p>
  
  <p>The method getIntExtra(String, int) in the type intent is not applicable for the arguments (String, ZoozInvoice).</p>
  
  <p>I have also tried to change type of 'invoice' to 'boolean'. This results in:</p>
  
  <p>Type mismatch: cannot convert ZoozInvoice to boolean.</p>
  
  <p>And.</p>
  
  <p>Cannotinvoke addItem (String, int, double, int, String, String) on the primitive type boolean.</p>
  
  <p>How can I go about making the Intent expect (String, Serializable) instead of (String, boolean) ? </p>
  
  <p>Code for reference and context.</p>
  
  <pre><code>ZooZInvoice invoice = new ZooZInvoice();
          invoice.addItem("item1", 1, 0.5, 0, "1", "good choice!");
          invoice.addItem("item2", 1, 3, 0, "2", "additional details for item 2");
          invoice.addItem("item3", 1, 2, 0, "3", "additional details for item 3");
          invoice.addItem("item4", 1, 8, 0, "4", "additional details for item 4");
          invoice.setInvoiceNumber("5512-FA");
          invoice.setInvoiceAdditionalDetails("Power Ups for user 12345");
          intent.putExtra(CheckoutActivity.ZOOZ_INVOICE, invoice);
  
          startActivityForResult(intent, ZooZ_Activity_ID);
  </code></pre>