Hello,
I am trying to make an appli on android which have to connect to a server ejabberd to first, whether it is needed, create en account or log into the server.
I am using smack here is my code:
try {
/**
* The abstract Connection class provides an interface for
* connections to a XMPP server and implements shared methods which
* are used by the different types of connections (e.g.
* XMPPConnection or BoshConnection).
* * To create a connection to a XMPP server a simple usage of this
* API might look like the following:
*/ // Connect to the server con.connect();
// Create a connection to the igniterealtime.org XMPP server.
ConnectionConfiguration connectionConfiguration = null;
connectionConfiguration = new ConnectionConfiguration("server.com", 5222);
//connectionConfiguration.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
con = new XMPPConnection(connectionConfiguration); con.getAccountManager().createAccount("log@server.com", "azer");
// Log.i(TAG, "support account creation : "
// + am.supportsAccountCreation() + "\n"
// + am.getAccountInstructions());
// am.createAccount("thomas", "azer");
} catch (Exception e) {
Log.e(TAG, e.getMessage());
}
The supportsAccountCreation() method return true and when I am creating an account from empathy it works fine.
However this code always return a 400 bas request error.
there is also a warning keystoreException: Keystore jks implementation not found.
If any one have any idea.