Android asmack solves the problem of connecting to ejabberd, asmackejabberd
It is found that android uses asmack to connect to ejabberd, and there will always be various problems
After multiple tests, the exception of the specific process is not written. The successful writing method is as follows:
ConnectionConfiguration connConfig =
NewConnectionConfiguration (ip, 5222, "servername ");
// Openfire only needs the address and port number. ejabberd must use the service name.
// ConnConfig. setSASLAuthenticationEnabled (false );
// This is used to connect to openfire. ejabberd is not required. Otherwise, an error is returned.
ConnConfig. setSecurityMode (ConnectionConfiguration. SecurityMode.Disabled);
// This must be disabled; otherwise, an error is returned.
Con=NewXMPPConnection (connConfig );
Con. Connect ();
Q: How can I log on to the server using asmack in android?
Try AndroidConnectionConfiguration
Android asmack + openfire: how to send offline files
Download the modified asmack package in the Forum and open a thread to send the file www.eoeandroid.com/..863576 to the eoeAndroid website to view the answer details>