package com.example.crystalgame.communication;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

/**
 * The service responsible for the management of communication
 * @author Balazs Pete, Shen Chen
 *
 */
public class CommunicationService extends Service {

	public void onCreate() {
		super.onCreate();
	}
	
	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		startService(intent);
		
		// TODO: remove 
		Toast.makeText(this, "Service Started", Toast.LENGTH_SHORT).show();
		
		return START_NOT_STICKY;
	}
	
	@Override
	public void onDestroy() {
		super.onDestroy();
	}
	
	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}

}

@@ -41,16 +41,85 @@
 ation;%0A%0A
+import com.example.crystalgame.library.communication.Communication;%0A%0A
 import a
@@ -412,16 +412,56 @@
 vice %7B%0A%0A
+%09private Communication communication;%0A%09%0A
 %09public 
@@ -494,24 +494,162 @@
 onCreate();%0A
+%09%09ClientCommunicationManager manager = new ClientCommunicationManager(%22192.168.1.8%22, 3000);%0A%09%09communication = new Communication(manager);%0A
 %09%7D%0A%09%0A%09@Overr
@@ -748,103 +748,8 @@
 t);%0A
-%09%09%0A%09%09// TODO: remove %0A%09%09Toast.makeText(this, %22Service Started%22, Toast.LENGTH_SHORT).show();%0A%09%09%0A
 %09%09re
@@ -763,12 +763,8 @@
 ART_
-NOT_
 STIC

Move the service initialisation creation to onCreate