title: How to pass array of custom type from one activity to other activity?
body: <blockquote>
    <p>This is how i am passing array of custom data type Items ** Items[]
    itemsArr ** to intent</p>
  </blockquote>
  
  <pre><code>Intent pruchadeDetails = new Intent(getApplicationContext(),PurchaseHistoryDetails.class);
  pruchadeDetails.putExtra("item",itemsArr[position].getShoppingItems());
  startActivityForResult(pruchadeDetails, 0);
  </code></pre>
  
  <blockquote>
    <p>unable to retrive it using both methods</p>
  </blockquote>
  
  <pre><code>Item[] itemArr = (Item[])getIntent().getSerializableExtra("item"); //method 1
  String json = pruchadeDetails.getStringExtra("item");//method 2
  </code></pre>
  
  <blockquote>
    <p>any help is highly appreciated thanks</p>
  </blockquote>