ConnectionConfiguration cc = new ConnectionConfiguration( "vietnam.agilemobile.com", 5222, vietnam.agilemobile.com"); XMPPConnection connection = new XMPPConnection(cc); try { SASLAuthentication.supportSASLMechanism("PLAIN", 0); connection.connect(); Log.e("LOGIN", "" + 111); // You have to put this code before you login Log.e("LOGIN", "" + 222); // You have to specify your gmail addres WITH @gmail.com at the end connection.login("nemodo", "123456", "resource"); Log.e("LOGIN", "" + 333); // See if you are authenticated System.out.println(connection.isAuthenticated()); } catch (XMPPException e1) { e1.printStackTrace(); }
I also get this error, but I cannot work.
source share