How to handle registration exceptions with AccountManager in Smack 4.1

I want to connect anonymously to openfire server with android smack 4.1 client and create new account (username,password) on server with AccountManager.

How to get response information if the username is already used by another user, is there any hidden exception to catch?

How to get response information if the username is already used by another user, is there any hidden exception to catch?
The server should reply with an error IQ then, which will result in an XMPPErrorException. You just have to evaluate the error condition, see Example 6 in XEP-0077: In-Band Registration

1 Like