Service for starting and stopping Bote
This commit is contained in:
24
src/i2p/bote/android/service/BoteService.java
Normal file
24
src/i2p/bote/android/service/BoteService.java
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user