Skip to content Skip to sidebar Skip to footer

How To Send Recyclerview List To Server Using Volley

I have created a Project in which i have acustom alertdialog box with 3 edit text and one button. On button Click it add my data to Recyclerview successfully and it's working fine.

Solution 1:

There are a few problems in your code I want to point out, maybe one of is fixing your problem. Identifying the real problem is hard, because you did not provide enough information:

  1. This loop for (int i = 0; i <= movieList.size(); i++) { iterates one time too often. Let's say your movieList has 3 elements, your loop will iterate for each i in (0,1,2,3) but your list only has the indices (0,1,2) as Arrays/Lists start with index 0. So you should use i < movieList.size() here.
  2. Are you sure you are adding the right items to your movieObject? movieObject.put("movie_name", "" + member_name); uses the variable member_name which is not updated within your loop, you probably need to use movieList.get(i).member_name or similar (please provide more information what exactly the movieList looks like). Same applies for the following two lines
  3. In your log you use movieList1 but in your loop you use movieList are you sure both lists are the same?

Post a Comment for "How To Send Recyclerview List To Server Using Volley"