AnsweredAssumed Answered

smack 4.1.1 accountManager createAccont gets 400 error?

Question asked by hubo on Jun 15, 2015
Latest reply on May 25, 2016 by Inderjeet

Hi all,

     I'm newbie of samck,and try to use smack 4.1.1 in my android project,I've did a little bit test about login exist user and sending message,everything seems ok.

but when i tried to use accountManager to create a new account,the createAccount func thrown an error: "bad-request-modify" if no existed user login at the first place.

I don't know if i did something wrong.Can anyone help? thanks any way.

code likes this:


     XMPPTCPConnectionConfiguration config .....//


     mConnection = new XMPPTCPConnection(config);

     mConnection.connect();//mConnect.isConnected == true

     //mConnection.login("test1", "111111");  //test1 is exist,createAccount goes fine if uncomment this line otherwise createAccount  throws "bad-request-modify"

     AccountManager accountManager= AccountManager.getInstance(mConnection);
     accountManager.createAccount("test2", "111111",mp);