# HG changeset patch # User Vincent Veronis # Date 1254569541 -7200 # Node ID 1b04c885f87dc18bd179910dc7be8d32590e5c23 # Parent 051fa95b54f7d65739db66ce52c199f4b4655c1b Jingle Session diff -r 051fa95b54f7 -r 1b04c885f87d .classpath --- a/.classpath Fri Oct 02 17:45:24 2009 +0200 +++ b/.classpath Sat Oct 03 13:32:21 2009 +0200 @@ -13,7 +13,7 @@ - + diff -r 051fa95b54f7 -r 1b04c885f87d src/com/beem/project/beem/jingle/demo/JingleCallActivity.java --- a/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Fri Oct 02 17:45:24 2009 +0200 +++ b/src/com/beem/project/beem/jingle/demo/JingleCallActivity.java Sat Oct 03 13:32:21 2009 +0200 @@ -3,6 +3,7 @@ import org.jivesoftware.smack.ConnectionConfiguration; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.ConnectionConfiguration.SecurityMode; import org.jivesoftware.smack.util.StringUtils; import android.app.Activity; @@ -40,11 +41,12 @@ @Override protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub + java.security.Security.addProvider(new com.sun.security.sasl.Provider()); super.onCreate(savedInstanceState); setContentView(R.layout.jingle_call_activity); - // localhost - mConf = new ConnectionConfiguration("10.0.2.2", 5222); + // localhost mConf = new ConnectionConfiguration("10.0.2.2", 5222); + mConf = new ConnectionConfiguration("elyzion.net", 5222); + mConf.setSecurityMode(SecurityMode.required); mEdJID = (EditText) findViewById(R.id.jingledemocalljid); mEdPassword = (EditText) findViewById(R.id.jingledemocallpassword); mEdReceiver = (EditText) findViewById(R.id.jingledemocallreceiver); @@ -59,6 +61,7 @@ String password = mEdPassword.getText().toString(); try { mConnection.connect(); + Thread.sleep(3000); mConnection.login(login, password); mJingle = new JingleService(mConnection); mJingle.initWhenConntected(mConnection); @@ -67,7 +70,10 @@ } catch (XMPPException e) { // TODO Auto-generated catch block e.printStackTrace(); - } + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } });