7

You can use RosterEntry to get the name of your contacts. But how I change my own name and it appears to my contacts when they do

RosterEntry entry = roster.getEntries("myuser");
entry.getName(); // It needs to show my updated name

Thanks in advance.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880

1 Answers1

2

As long as the other users haven't set a custom nickname for you, I think Spark will display your first and last name, which you may be able to change with:

VCard me = new VCard();
me.load(conn); // load own VCard
me.setFirstName("John");
me.setLastName("Doe");
me.save(conn);
Brad Mace
  • 27,194
  • 17
  • 102
  • 148
  • 2
    I put **ProviderManager.getInstance().addIQProvider("vCard", "vcard-temp", new VCardProvider());** before that above code and it is working now! – Marcellus Andrade Aug 26 '11 at 14:59