aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/services/XmppConnectionService.java
blob: 4477513d33e4a50c59077fa9e78ddb2fa96683a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
    }

}