Get a user's avatar VK SDK

android, eclipse, java, vk

Solution

In your request you need to specify one of the following fields: photo_50 or photo_100 or photo_200:

VKRequest yourRequest = VKApi.users().get(VKParameters.from(VKApiConst.FIELDS,"photo_50"))

After that when you will retrieve users data you can get photo_50:

yourRequest.executeWithListener(new VKRequest.VKRequestListener() {
@Override
public void onComplete(VKResponse response) {
    super.onComplete(response);

    VKUsersArray usersArray = (VKUsersArray) response.parsedModel;

    for (VKApiUserFull userFull : usersArray) {
          Log.i(TAG, "Avatar image URL: " + userFull.photo_50);            
        }
    }
}

Problem

Good day. The question on the use of library VK. How to get a profile picture, using VKSDK\ Can not find the right information on the Internet.

Original source