I want to pass a ArrayList from one activity to other.
I have found this link for pass arraylist from one activity to other useful.
But when I am using
ArrayList<String> hyperlinks = new ArrayList<String>();
...
Intent myIntent=new Intent(Player.this,VideoActivity.class);
Bundle mBundle = new Bundle();
mBundle.putStringArrayListExtra("hyperlinks", hyperlinks);
//mBundle.putString("filePath", hyperlinks.get(0));
myIntent.putExtras(mBundle);
Player.this.startActivity(myIntent);
Then I am getting error at mBundle.putStringArrayListExtra ,
Saying that The method putStringArrayListExtra(String, ArrayList) is undefined for the type Bundle
Please guide me how to do this??
Thanks
There’s lots of ways to do it, but have you tried:
Also, the Bundle object has