Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您可以使用RosterEntry来获取联系人的姓名。但是我如何更改自己的名字,并且当他们这样做时它会出现在我的联系人面前
RosterEntry
RosterEntry entry = roster.getEntries("myuser"); entry.getName(); // It needs to show my updated name
提前致谢。
只要其他用户没有为您设置自定义昵称,我认为Spark 会显示您的名字和姓氏,您可以更改:
VCard me = new VCard(); me.load(conn); // load own VCard me.setFirstName("John"); me.setLastName("Doe"); me.save(conn);