I am using volley library for android networking. I have json response data. Firstly I have filtered “jsonArray” of JSONObjets that contain "publishtype" of "PUBLISHED". Then I have added filtered data to “filteredJSONArray” then from “filteredJSONArray” I got first and last JSONObjects, from these objects i got the “formatedLatestDate” and “formatedOldestDate”.
I also added all the JSONObjects that have "publishtype" of "PUBLISHED" to “risksArrayList”.
I am using Joda-Time library for working on dates. I have to iterate through the
“formatedOldestDate” to “formatedLatestDate”.
I want to fetch all the JSONObjects from “riskArrayList”that have date (“publishdate”) between the “formatedOldestDate” to “upDate” means for each month, and storing it to another ArrayList. So that I can show differently each month risks/news to UI interface.
The while loop should run until it reaches to the “formatedLastesDate”.
I am giving code file links because they are too lengthy.
Here is my MainActivity.java code.
MainActivity.java
Here is my Risks.java code.
Risks.Java
Here is full my full project
Full Project