package es.shyri.longoperationservice;

import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.support.v7.app.NotificationCompat;

/**
 * Created by Shyri on 01/02/2016.
 */
public class LongOperationService extends Service {
    public static final int NOTIFICATION_ID = 1234;
    private NotificationManager nm;

    private final IBinder mBinder = new LocalBinder();

    public void onCreate() {
        super.onCreate();
        nm = (NotificationManager)  getSystemService(NOTIFICATION_SERVICE);

    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return mBinder;
    }
    }

    /**
     * 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 LocalBinder extends Binder {
        public LongOperationService getService() {
            // Return this instance of LocalService so clients can call public methods
            return LongOperationService.this;
        }
    }
}

@@ -516,24 +516,165 @@
 lBinder();%0A%0A
+    public enum STATUS%7B%0A        IDLE,%0A        STARTING,%0A        RUNNING,%0A        CANCELLING%0A    %7D%0A%0A    STATUS currentStatus =  STATUS.IDLE;%0A%0A
     public v
@@ -897,24 +897,93 @@
 nder;%0A    %7D%0A
+    public STATUS getCurrentStatus() %7B%0A        return currentStatus;%0A
     %7D%0A%0A    /

Add status to service