powered by Jive Software

I cannot obtain profile picture from GoogleTalk using smack API

I wannt to get my profile picture using VCards, but I cannot obtain any info, not only the avatar, I cannot obtain anything about my profile. My code is the fallowing:

VCard vCard = new VCard();


ProviderManager.getInstance().addIQProvider(“vCard”, “vcard-temp”,

new VCardProvider());

try {


} catch (XMPPException e) {



byte[] bs = vCard.getAvatar(); // Avatar in byte array convert it to Bitmap

Does someone know why or did someone encounted the same problem?

I found a solution. It seems that I cannot take the avatar picture only on the roster listener. This means that only when the presence changes you can see user’s Presence.Type and can get it’s avatar, but other data about his profile cannot be taken. If anyone knows why or has a solution I would be very happy to see what he has in mind.