Projects tigase _server server-core Issues #101
Can't Loging from Android Device with last Revision 144 library (#101)
sandeep mali opened 1 decade ago

I Can't Loging from Android Device with last Revision 144 library, By using revision 61 it is possible to login, Here is my code

jaxmpp = new Jaxmpp();
// for BOSH connector
jaxmpp.getProperties().setUserProperty(AbstractBoshConnector.BOSH_SERVICE_URL_KEY, "http://192.168.4.15:5222");
// for Socket connector
jaxmpp.getProperties().setUserProperty(SocketConnector.SERVER_HOST, "192.168.4.15");
// port value is not necessary. Default is 5222
jaxmpp.getProperties().setUserProperty(SocketConnector.SERVER_PORT, 5222);
                       
// "bosh" and "socket" values available
 jaxmpp.getProperties().setUserProperty(Jaxmpp.CONNECTOR_TYPE, "socket");

                       
jaxmpp.getProperties().setUserProperty(SessionObject.RESOURCE, "jaxmpp");
jaxmpp.getProperties().setUserProperty(SessionObject.SERVER_NAME,"spotons-mac-mini.local");
jaxmpp.getProperties().setUserProperty(SessionObject.USER_JID, JID.jidInstance(Configuration.userName+"@spotons-mac-mini.local"));
jaxmpp.getProperties().setUserProperty(SessionObject.PASSWORD, Configuration.password);
displayProgressDialog("Please Wait ", "Login....");
                   
new Thread() {
  public void run() {   
    try {
      jaxmpp.login();                                   
      if(jaxmpp.isConnected()) {
        Log.e("Status","Connected Successfully");
      }
    } catch (JaxmppException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }   
  }
}.start();
Bartosz MaƂkowski commented 1 decade ago

Probably it is it. Use this code:

jaxmpp.getProperties().setUserProperty(SessionObject.USER_BARE_JID, BareJID.bareJIDInstance("user@server"));
jaxmpp.getProperties().setUserProperty(SessionObject.PASSWORD, "secretPassword");

Simple examples works fine. I just checked it.

issue 1 of 1
Type
Bug
Priority
Blocker
Assignee
RedmineID
487
Version
tigase-server-5.1.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#101
Please wait...
Page is in error, reload to recover