as the title says I'm new to android. I'm trying to build very simple chat with the following code.
//1. connection
ConnectionConfiguration connConfig = new ConnectionConfiguration("talk.google.com", 5222, "gmail.com");
try{ connection.connect();}
catch (XMPPException ex)
{
connection = null;
return;
}
//2. login
try{ connection.login(myGmailLogin,myGmailPwd); }
catch (XMPPException e)
{
report+="Login error " + e.toString() ;
return;
}
What i get Is: Login error SASL authentication failed using mechanism PLAIN. By googling i've found dozens of pages from people having the same problem but no solution worked. can anyone please help me? thanx a lot!
ConnectionConfiguration connConfig = new ConnectionConfiguration("gmail.com");
, all other params will be set automaticallyconnConfig.setSecurityMode(SecurityMode.required);