I'm trying to create an account from Smack for Android on jabber.at. Here is my code :
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);
I got an error:
W/System.err﹕ org.jivesoftware.smack.packet.XMPPError@2beba168
W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:217)
W/System.err﹕ at org.jivesoftware.smack.PacketCollector.nextResultOrThrow(PacketCollector.java:198)
I have tried with and without the Map, same error. According to Mathias Ertl from jabber.at, it is possible to create accounts remotely, so I'm doing something wrong somewhere. Any idea ?
check if your server support remote account creation.
accountManager.supportsAccountCreation()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With