I am trying to pass this ArrayList to another activity. So far my efforts have been a failure. I know that I am not understanding how to pass it correctly.
Here is the arrayList code that I have:
public static ArrayList<Movie> getMovieItems() {
if(mItems == null) {
mItems = new ArrayList<>();
Movie movie1 = new Movie();
movie1.setId(1);
movie1.setTitle("Title1");
movie1.setStudio("studio1");
movie1.setDescription("description1");
movie1.setCardImageUrl("http://3.bp.blogspot.com/-ZKjKucsPdzI/TudWC99CE_I/AAAAAAAAAD8/qvWdDtw5IW0/s1600/%2528393%2529.jpg");
//movie1.setVideoUrl("http://corochann.com/wp-content/uploads/2015/07/MVI_0949.mp4");
/* Google sample app's movie */
//movie1.setVideoUrl("http://www.youtube.com/embed/VopbGPJVkzM");
//movie1.setVideoUrl("http://live.gph.gov.sa/makkahlive/");
//movie1.setVideoUrl("http//livestreaming2.itworkscdn.net/squranlive/squran_7200p");
/// --- try this
//String url = "http://www.youtube.com/embed/VopbGPJVkzM";
//movie1.setVideoUrl("http://commondatastorage.googleapis.com/android-tv/Sample%20videos/Demo%20Slam/Google%20Demo%20Slam_%2020ft%20Search.mp4");
movie1.setVideoUrl("http//livestreaming2.itworkscdn.net/squranlive/squran_360p");
mItems.add(movie1);
Movie movie2 = new Movie();
movie2.setId(2);
movie2.setTitle("Title2");
movie2.setStudio("studio2");
movie2.setDescription("description2");
movie2.setCardImageUrl("http://www.questionsonislam.com/sites/default/files/mescid-i-nebevi.jpg");
//movie2.setVideoUrl("http://corochann.com/wp-content/uploads/2015/07/MVI_0962.mp4");
/* Google sample app's movie */
movie2.setVideoUrl("http://www.youtube.com/embed/4OoKpZWJASY");
mItems.add(movie2);
Movie movie3 = new Movie();
movie3.setId(3);
movie3.setTitle("Title3");
movie3.setStudio("studio3");
movie3.setDescription("description3");
movie3.setCardImageUrl("http://2.bp.blogspot.com/-ju9FXyjDFqI/TgY7uVabgxI/AAAAAAAAADw/-qSdxfyHosM/s1600/masjid+qiblatain+%25283%2529.gif");
//movie3.setVideoUrl("http://corochann.com/wp-content/uploads/2015/07/MVI_1112.mp4");
movie3.setVideoUrl("http://www.youtube.com/embed/4OoKpZWJASY");
mItems.add(movie3);
}
return mItems;
}
mItems is the ArrayList that I want to pass to another activity. I tried this "template"
ArrayList<Movie> chanList= new ArrayList<>();
Then I realized that I don't have it correct.
Can someone help me out with some insight tutelage and help me understand how to do this correctly?
Thanks!
ironmantis7x