I have a map between string and a class object. I populate this map in Activity1 and i would like to pass it to activity2.
public class NEW extends Activity
Create a new java file which will be global for whole application.
Step1:
public class GlobalClass extends android.app.Application
{
public static Map data_map = new Map();
}
Step2:
After doing that, Register this "GlobalClass" in AndroidManifest.xml
Step3:
now you can use this Map anywhere in your application.
@Override
protected void onCreate(Bundle icicle)
{
GlobalClass global = (GlobalClass)getApplication();
Map my_map_data = global.data_map;
}
These steps maybe helpful for you...