I have an arraylist. I get this arraylist from another activity with using Bundle like that :
Bundle name = getIntent().getExtras();
ArrayList<String> namevalue = name.getStringArrayList("name");
I want to use same arraylist in a different class. But i can’t get with using getIntent() method becoz of my class is not an activity. Is there a way to pass this arraylist?
You could pass it to the class as a parameter (via constructor or through another method):