0
我想有更多的屬性創建新用戶創建新用戶,但它不working.I正在使用此代碼asmack:更多的屬性在asmack
ConnectionConfiguration config = new ConnectionConfiguration("SERVER IP", 5222,"localhost");
config.setSecurityMode(SecurityMode.disabled);
XMPPConnection conn2 = new XMPPTCPConnection(config);
conn2.connect();
AccountManager manager =AccountManager.getInstance(conn2);
Map<String, String> attributes = new HashMap<String, String>();
attributes.put("username", "my_user_name");
attributes.put("password", "my_password");
attributes.put("email", "[email protected]");
attributes.put("name", "my_full_name");
manager.createAccount("my_user_name", "my_password", attributes);
conn2.login("my_user_name", "my_password");
ChatManager chatmanager = ChatManager.getInstanceFor(conn2);
Log.w("User Name:",""+manager.getAccountAttribute("name"));
但是當我嘗試登錄與getAccountAttribute
除用戶名和密碼外,所有字段都返回空值。
如何在asmack中設置姓名,電子郵件等字段?
您知道嗎我可以從ejanberd模塊訪問這些數據? (Erlang) – Okan
@Okan不,我很抱歉。 – Khaled
我需要保存android設備token.Which字段對我有好處? – Okan