Home >Java >javaTutorial >Why Isn\'t My Serializable List of Thumbnails Passing Through Intents?
Passing Data through Intent using Serializable: Troubleshooting
Your implementation of the Thumbnail class with Serializable does not appear to be the issue. Here are some potential reasons why it might still not be working:
Using putExtra Incorrectly
Instead of using putExtra with a List
Bundle bundle = new Bundle(); bundle.putSerializable("value", all_thumbs); intent.putExtras(bundle);
Retrieving Data Incorrectly
In your SomeClass Activity, ensure that you are retrieving the list as a Serializable using getSerializable from the Bundle object.
Intent intent = this.getIntent(); Bundle bundle = intent.getExtras(); List<Thumbnail> thumbs = (List<Thumbnail>)bundle.getSerializable("value");
Other Issues
If you have followed these steps and the issue persists, please provide more details about your implementation and error messages (if any) for further assistance.
The above is the detailed content of Why Isn\'t My Serializable List of Thumbnails Passing Through Intents?. For more information, please follow other related articles on the PHP Chinese website!