I make requests in a cycle:
for (int j=0;j<=15;j++) { Log.d(mytag,"111111"); ... VKRequest request = VKApi.audio().search(VKParameters.from(VKApiConst.Q, artist, VKApiConst.OFFSET, 100, VKApiConst.COUNT, 100)); request.executeWithListener(new VKRequest.VKRequestListener() { @Override public void onComplete( VKResponse response ) { super.onComplete(response); Log.d(mytag,"222222"); ... } } }
First displayed 15 times.
111111
then several times
222222
That is, the for
loop first runs 15 times, and only after that the query is executed and worked with it, although it should occur during the for
loop.