Answer the question
In order to leave comments, you need to log in
VKResponse how to process on android?
Good afternoon.
A simple question, but for me, as a non-Java developer, it is very difficult.
I receive the list of groups. already prepared a list output for them and loading images.
But I can't parse the result of VKResponse in any way.
response.json.toString() shows me the desired json array.
But how to work with it in code?
I tried
response.json.response.count
response.json.get("response")
but it doesn't work, it just fires the actions and doesn't even let the app run.
I'm testing on my phone,
developing in Android Studio
I beg you to help.
How to actually process the response, go through it in a loop and pull out the necessary data?
below is what you want, but can not
for (int i=0; i< vkres.count; i++){
Object item = vkres.items[i]
}
Answer the question
In order to leave comments, you need to log in
You can't help yourself, no one will help you
VKApiCommunityArray groups = (VKApiCommunityArray) responses.parsedModel;
for(int i=0;i<groups.getCount();i++){
VKApiCommunity group = groups.get(i);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question