Binary file libs/smack.jar has changed
Binary file libs/smackx-debug.jar has changed
Binary file libs/smackx-jingle.jar has changed
Binary file libs/smackx.jar has changed
--- a/src/com/beem/project/beem/BeemService.java Wed Mar 18 00:24:00 2009 +0100
+++ b/src/com/beem/project/beem/BeemService.java Wed Mar 18 21:37:12 2009 +0100
@@ -3,7 +3,12 @@
*/
package com.beem.project.beem;
+import java.util.List;
+
import org.jivesoftware.smack.XMPPConnection;
+import org.jivesoftware.smack.XMPPException;
+
+import com.beem.project.beem.service.IXMPPFacade;
import android.app.Notification;
import android.app.NotificationManager;
@@ -12,6 +17,7 @@
import android.content.Intent;
import android.content.res.Resources;
import android.os.IBinder;
+import android.os.RemoteException;
import android.widget.TextView;
import android.widget.Toast;
@@ -25,6 +31,15 @@
private XMPPConnection connection;
+ private IXMPPFacade.Stub bind = new IXMPPFacade.Stub() {
+
+ @Override
+ public List<String> getContactList() throws RemoteException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ };
+
/* (non-Javadoc)
* @see android.app.Service#onBind(android.content.Intent)
*/
@@ -47,9 +62,19 @@
public void onCreate(){
super.onCreate();
-// connection = new XMPPConnection("10.0.2.2"); // address du pc host de l'emulateur
- notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
- showBasicNotification(R.string.BeemServiceCreated);
+ connection = new XMPPConnection("10.224.13.6"); // address du pc host de l'emulateur
+ try {
+ connection.connect();
+ connection.login("bart", "bart");
+ notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
+ showBasicNotification(R.string.BeemServiceCreated);
+ } catch (XMPPException e) {
+ // TODO Auto-generated catch block
+ Toast toast = Toast.makeText(this, "ERREUR " + e.getMessage(), Toast.LENGTH_LONG);
+ toast.show();
+ e.printStackTrace();
+ }
+
}
public void onDestroy() {