Click here to Skip to main content
14,698,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I'm new to android and as the title says 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.
After I while I discovered that Google does not allow PLAIN authentication on the insecure connection so I added the line
connConfig.setSecurityMode(SecurityMode.required);
but I always get the same errror as before.
can anyone please help me? thanx a lot!
Posted
Updated 18-Dec-14 11:58am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900