Hello,
I have been working on a part of my code to notify the user when the password is incorrect by catching the exception thrown from connection.login(). It works however if I try to login again with the correct password then the exception is still thrown. The exception is "“SASL authentication failed using mechanism DIGEST-MD5”.
I am using the following code :
try {
Log.i(“service”,“Attempting to log in…”);
connection.login(global.$username, global.$password);
}
catch (XMPPException ex) {
login.error(ex.getMessage());
break;
}
I can log in with the correct username and password so I know everything works. It’s only after a failed attempt that the correct password will not work.
The message is sent to the log every time so connection.login() is definately being run.
I am using asmack. My question is do I have to reset something before attempting to log in again?
Any help would be greatly appreciated.
Thankyou,
Harry