Package org.jivesoftware.smackx.vcardtemp.packet

Examples of org.jivesoftware.smackx.vcardtemp.packet.VCard


 
  // Unfortunately the Smack API doesn't specify what concretely happens, if a vCard doesn't exist, yet.
  // It could be just an empty vCard or an XMPPException thrown.
  private boolean vCardExists() throws XMPPException {
      try {
            VCard vcard = new VCard();
            vcard.load(this.connection);
           
            // Best effort check to see if the vcard already exists.
            if (Util.fixEmpty(vcard.getNickName()) != null) {
                return true;
            }
            return false;
        } catch (XMPPException e) {
            if (e instanceof  XMPPException.XMPPErrorException){
View Full Code Here


  /**
   * Constructs a vCard for Mr Jenkins.
   */
  private void createVCard() throws XMPPException, SmackException.NotConnectedException, SmackException.NoResponseException {

    VCard vCard = new VCard();
    vCard.setFirstName("Mr.");
    vCard.setLastName("Jenkins");
    vCard.setNickName(this.nick);
    setAvatarImage(vCard);
    vCard.save(this.connection);
  }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smackx.vcardtemp.packet.VCard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.