Edit Warning: Problem solved, it was a typo in the code, lol.
I tried to share objects by having a global hashmap in my first activity, Activity1:
public static HashMap<String, Object> sharedObjects;
then in my second activity I run for example:
But I get a nullpointerexception.
Following other discussions Im getting the idea that this should work and be the best way to share objects, see for example:
http://groups.google.com/group/android- ... c47cc5bbd8
Obviously I am doing something wrong. The strange thing is that I can access the static hashmap from Activity1, but not from Activity2.
edit: LOL, i forgot to create the static object. It should ofcourse be:
public static HashMap<String, Object> sharedObjects = new HashMap<String, Object>();
Maybe this thread can still help people who are trying to share objects between activities, thought. =)