Service for starting and stopping Bote

This commit is contained in:
str4d
2014-05-17 02:56:29 +00:00
parent 5625bcc733
commit b648c1e369
5 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
package i2p.bote.android.service;
import i2p.bote.I2PBote;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
public class BoteService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
I2PBote.getInstance().startUp();
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
@Override
public void onDestroy() {
I2PBote.getInstance().shutDown();
}
}