I have an app in which I send server request and in response server gives me some data, At this point I want to store in SharedPreference
.
In next server request I again find the length of data coming in response from server, at this point of time I want this length to add with previous save value in preference and same process again and again.
Code for finding server response length:
JSONArray posts = response.optJSONArray("data");
int arrayCount = posts.length();