/**
*	NotificationService.java
*
*	@author Johan
*/

package se.chalmers.watchme.notifications;

import java.util.Calendar;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class NotificationService extends Service {
	
	private final IBinder binder = new ServiceBinder();

	public class ServiceBinder extends Binder {
		NotificationService getService() {
			return NotificationService.this;
		}
	}

	@Override
	public IBinder onBind(Intent arg0) {
		return this.binder;
	}
	
	public int startCommand(Intent intent, int flags, int startID) {

		// This service is sticky - it runs until it's stopped.
		return START_STICKY;
	}
	
	public void setAlarm(Calendar c) {
		// Start a new task for the alarm on another thread (separated from the UI thread)
		new AlarmTask(this, c).run();
	}
}

@@ -229,16 +229,41 @@
 IBinder;
+%0Aimport android.util.Log;
 %0A%0Apublic
@@ -561,24 +561,35 @@
 inder;%0A%09%7D%0A%09%0A
+%09@Override%0A
 %09public int 
@@ -584,25 +584,27 @@
 %09public int 
-s
+onS
 tartCommand(
@@ -644,16 +644,87 @@
 rtID) %7B%0A
+%09%09Log.i(%22Custom%22, %22Received start id %22 + startID + %22: %22 + intent);%0A%09%09%09%09
 %0A%09%09// Th
@@ -802,16 +802,16 @@
 Y;%0A%09%7D%0A%09%0A
-
 %09public 
@@ -838,16 +838,48 @@
 ar c) %7B%0A
+%09%09Log.i(%22Custom%22, %22Set alarm%22);%0A
 %09%09// Sta

Fix incorrect name of start command callback