How to send HashMap
value from one Intent to second Intent?
Also, how to retrieve that HashMap
value in the second Activity?
I hope this must work too.
in the sending activity
Intent intent = new Intent(Banks.this, Cards.class);
intent.putExtra("selectedBanksAndAllCards", (Serializable) selectedBanksAndAllCards);
startActivityForResult(intent, 50000);
in the receiving activity
Intent intent = getIntent();
HashMap> hashMap = (HashMap>) intent.getSerializableExtra("selectedBanksAndAllCards");
when I am sending a HashMap like following,
Map> selectedBanksAndAllCards = new HashMap<>();
Hope it would help for someone.