# HG changeset patch # User Da Risk # Date 1237408632 -3600 # Node ID 1063d4bde1aa3acd575cdc4ab06c4f3c769cc4da # Parent afd3a080d3185076389174b1ef352563d0be4b6e commit pour test avec barbu diff -r afd3a080d318 -r 1063d4bde1aa libs/smack.jar Binary file libs/smack.jar has changed diff -r afd3a080d318 -r 1063d4bde1aa libs/smackx-debug.jar Binary file libs/smackx-debug.jar has changed diff -r afd3a080d318 -r 1063d4bde1aa libs/smackx-jingle.jar Binary file libs/smackx-jingle.jar has changed diff -r afd3a080d318 -r 1063d4bde1aa libs/smackx.jar Binary file libs/smackx.jar has changed diff -r afd3a080d318 -r 1063d4bde1aa src/com/beem/project/beem/BeemService.java --- 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 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() {