Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 517017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:47:27+00:00 2026-05-13T07:47:27+00:00

I am working on a XMPP client on Android, using the Smack library. The

  • 0

I am working on a XMPP client on Android, using the Smack library. The roster/messaging/presence stuff is running very well. However, I didn’t find a way to store additional profile information (userpicture, the dogs name, …).

The only way I see from googling is using VCards. But it simply did not work. I tried the following:

        VCard vCard = new VCard();
        vCard.load(connection);
        vCard.setEmailHome("meine_home@email.de");
        vCard.setLastName("Scheller");
        vCard.setField("blafasel", "asdf");
        vCard.save(connection);

Then I was looking for a way to see that VCard information. It did neither show up in iChat nor in this System.out:

        vCard.load(connection, user);
        System.out.println(user + " has this vCard: " + vCard.toXML());

So anything went wrong, but theres no indication what it was. I tried this with the google talk server and my own copy of openfire with the same result. Btw, I am using this version of Smack: http://davanum.wordpress.com/2007/12/31/android-just-use-smack-api-for-xmpp/

What am I doing wrong here? What is the correct way of storing profile related information with Smack?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:47:27+00:00Added an answer on May 13, 2026 at 7:47 am

    I have checked out the source of Smack and went through the important parts with a debugger, as well as using the Smack Debug Window. The problem is inside the VCard implementation of the Smack API. Saving a VCard does work as described, however the loading is broken.

    parseIQ(XmlPullParser parser) is part of the PacketReader.java class and handles different types of packages. It only handles tags with the following namespaces:

    “jabber:iq:auth”,
    “jabber:iq:roster”,
    “jabber:iq:register”,
    “urn:ietf:params:xml:ns:xmpp-bind”

    It also looks if there is any registered IQProvider in the ProviderManager. And this is the root of my problem. There is no IQProvider for VCards registered. So whatever information is inside of the vCard tag simply gets dropped.

    It is not too hard to register this IQProvider though:

        ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new VCardProvider());
    

    This solved my little example above for saving my own vCard and downloading it again. I am still having trouble with downloading other users vcards… Gonna have a closer look into this and maybe open up another thread for that issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 284k
  • Answers 284k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer One possibility is the little-used pure virtual function with implementation:… May 13, 2026 at 4:25 pm
  • Editorial Team
    Editorial Team added an answer Setting the CommandTimeout property on your MySqlCommand instead of the… May 13, 2026 at 4:25 pm
  • Editorial Team
    Editorial Team added an answer The problem I am having is when the context goes… May 13, 2026 at 4:25 pm

Related Questions

I am working on a private messasing functionality for my site, is there a
In the project I am currently working on, we have the need to develop
I'm developing a website that incorporates an XMPP bot and a custom SMTP server
I am working on a web application using Python (Django) and would like to
I am working on a Office Word add-in for Word 2003. When I reopen

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.