我目前正在開發一個聊天應用程序,我正在使用下面的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