我目前正在开发一个聊天应用程序,我正在使用以下 Vcard 来存储用户信息。
public void run() {
VCard vcard = new VCard();
vcard.setJabberId(xmppConnection.getUser());
vcard.setNickName(user.getChatId());
vcard.setFirstName(user.getUsername());
vcard.setPhoneHome("CELL", user.getMobileNo()); }
Run Code Online (Sandbox Code Playgroud)
除了上述值,我想向 Vcard 添加新字段,例如
vcard.setNotificationType(user.getNotType())
vcard.setAlerts(user.getAlerts())
Run Code Online (Sandbox Code Playgroud)
这可能吗?如果是这样,请帮助我如何做。谢谢。