I have a Hashtable, which, I need to pass to another activity. Since,
Hashtable is Serializable, I am doing the following:
Hashtable mHashTable = new Hashtable();
// load values
Intent intent = new Intent(this,SecondActivity.class);
intent.put("table",mHashTable);
startActivity(intent);
In the Second activity, I try to read the extras in OnCreate(..) as:
Hashtable table = (Hashtable)getIntent().getSerializableExtra
("table");
I get ClassCastException at this line in Logcat:
11-13 14:21:15.939: ERROR/AndroidRuntime(922): Caused by:
java.lang.ClassCastException: java.util.HashMap
What is that I am missing or doing wrong here?
Please help.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en