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.
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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With