conversations-classic/src/de/gultsch/chat/services/XmppConnectionService.java

30 lines
810 B
Java
Raw Normal View History

2014-01-24 01:04:05 +00:00
package de.gultsch.chat.services;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
public class XmppConnectionService extends Service {
// Binder given to clients
private final IBinder mBinder = new XmppConnectionBinder();
/**
* Class used for the client Binder. Because we know this service always
* runs in the same process as its clients, we don't need to deal with IPC.
*/
public class XmppConnectionBinder extends Binder {
XmppConnectionService getService() {
// Return this instance of LocalService so clients can call public methods
return XmppConnectionService.this;
}
}
@Override
public IBinder onBind(Intent intent) {
return mBinder;
}
}