Skip to content

Instantly share code, notes, and snippets.

@lyaotian
Created June 14, 2013 05:50
Show Gist options
  • Select an option

  • Save lyaotian/5779738 to your computer and use it in GitHub Desktop.

Select an option

Save lyaotian/5779738 to your computer and use it in GitHub Desktop.
Smack VCard usage
VCard vCard = new VCard();
SmackConfiguration.setPacketReplyTimeout(300000);
ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new VCardProvider());
vCard.load(connection, user_mail_id);
Log.d("Vcard XML", vCard.toXML()); // complete VCard information
byte[] bs = vCard.getAvatar(); // Avtar in byte array convert it to Bitmap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment