我目前正在开发一个聊天应用程序,我正在使用下面的Vcard来存储用户信息。如何将自定义字段添加到XMPP电子名片Android/SMACK
public void run() {
VCard vcard = new VCard();
vcard.setJabberId(xmppConnection.getUser());
vcard.setNickName(user.getChatId());
vcard.setFirstName(user.getUsername());
vcard.setPhoneHome("CELL", user.getMobileNo()); }
除了我想新的字段添加到虚拟卡像
vcard.setNotificationType(user.getNotType())
vcard.setAlerts(user.getAlerts())
上述值这可能吗?如果是这样,请帮助我如何做到这一点。 谢谢。
请注意,您似乎想要在Vcard中存储配置首选项。 VCard意图是公开的并且可以被其他人检索。 – 2015-01-25 20:41:27
只要我可以保存这些数据,这不是问题。可能吗? – Kishath 2015-01-26 06:14:17
是的,这是可能的,但是您使用的功能与需要的功能非常不同。你为什么不使用XMPP私人存储? http://xmpp.org/extensions/xep-0049.html – 2015-01-27 13:50:27