Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/193.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何从Smack 4.1创建帐户_Android_Xmpp_Smack - Fatal编程技术网

Android 如何从Smack 4.1创建帐户

Android 如何从Smack 4.1创建帐户,android,xmpp,smack,Android,Xmpp,Smack,我正试图在jabber.at上从Smack为Android创建一个帐户。 这是我的密码: XMPPTCPConnectionConfiguration conf= XMPPTCPConnectionConfiguration.builder() .setServiceName("jabber.at") .build(); XMPPTCPConnection connec

我正试图在jabber.at上从Smack为Android创建一个帐户。 这是我的密码:

XMPPTCPConnectionConfiguration conf= XMPPTCPConnectionConfiguration.builder()
                                .setServiceName("jabber.at")
                                .build();
XMPPTCPConnection connection = new XMPPTCPConnection(conf);

connection.addConnectionListener(xmppConnectionListener);
connection.connect();

AccountManager accountManager = AccountManager.getInstance(connection);
Map<String, String> map = new HashMap<String, String>();
map.put("username", usr);
map.put("password", pwd);
map.put("email", email);
accountManager.createAccount(usr, pwd, map);
我试过使用和不使用地图,同样的错误。
根据jabber.at的Mathias Ertl,远程创建帐户是可能的,所以我在某个地方做错了什么。有什么想法吗?

检查您的服务器是否支持远程帐户创建

accountManager.supportsAccountCreation()

请尝试Smack 4.1.0-beta2-SNAPSHOT。很抱歉回答得太晚,但是Smack 4.1.0和Openfire 3.10.0可以解决这个问题。谢谢。如果你得到了答案,你可以写下答案并把它标记为正确,这样其他人就可以得到帮助。就像我需要:)它返回org.jivesoftware.smack.XMPPException$XMPPErrorException:XMPPError:bad request-modify
accountManager.supportsAccountCreation()