package es.shyri.longoperationservice;

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

/**
 * Created by Shyri on 01/02/2016.
 */
public class LongOperationService extends Service {

    private final IBinder mBinder = new LocalBinder();

    @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;
        }
    }
}

@@ -33,16 +33,56 @@
 rvice;%0A%0A
+import android.app.NotificationManager;%0A
 import a
@@ -228,16 +228,66 @@
 ullable;
+%0Aimport android.support.v7.app.NotificationCompat;
 %0A%0A/**%0A *
@@ -379,63 +379,290 @@
 e %7B%0A
-%0A    private final IBinder mBinder = new LocalBinder();
+    public static final int NOTIFICATION_ID = 1234;%0A    private NotificationManager nm;%0A%0A    private final IBinder mBinder = new LocalBinder();%0A%0A    public void onCreate() %7B%0A        super.onCreate();%0A        nm = (NotificationManager)  getSystemService(NOTIFICATION_SERVICE);%0A%0A    %7D
 %0A%0A  

Add notification manager to service