package com.selfservit.util;

import android.app.ActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class mInterfaceReceiver extends BroadcastReceiver {
    public mInterfaceReceiver() {
        //constructor
    }

    @ Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equalsIgnoreCase(Intent.ACTION_BOOT_COMPLETED)) {
            Intent serviceIntent = new Intent(context, mInterfaceService.class);
            context.startService(serviceIntent);
            Intent queueIntent = new Intent(context, mQueueService.class);
            context.startService(queueIntent);
            Intent LocationIntent = new Intent(context, mLocationService.class);
            context.startService(LocationIntent);
        }
        if (intent.getAction().equalsIgnoreCase("com.example.checkservice")) {
            if (!isServiceRunning(context) || !isProcessRunning(context)) {
                Intent queueIntent = new Intent(context, mQueueService.class);
                context.startService(queueIntent);
            }
        }
    }
    private boolean isServiceRunning(Context context) {
        ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
        for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
            if (mInterfaceService.class.getName().equals(service.service.getClassName())) {
                return true;
            }
        }

        return false;
    }
    private boolean isProcessRunning(Context context) {
        ActivityManager manager1 = (ActivityManager)context.getApplicationContext().getSystemService(Context.ACTIVITY_SERVICE);
        for (ActivityManager.RunningAppProcessInfo processInfo : manager1.getRunningAppProcesses()) {
            if (processInfo.processName.equals(context.getPackageName())) {
                return true;
            }
        }
        return false;
    }
}

@@ -514,26 +514,30 @@
 ontext, 
-mInterface
+Authentication
 Service.
@@ -640,33 +640,32 @@
 Intent(context, 
-m
 QueueService.cla
@@ -774,17 +774,16 @@
 ontext, 
-m
 Location
@@ -842,32 +842,287 @@
 cationIntent);%0D%0A
+            Intent timerIntent = new Intent(context, TimerService.class);%0D%0A            context.startService(timerIntent);%0D%0A            Intent checkSumIntent = new Intent(context, CheckSumService.class);%0D%0A            context.startService(checkSumIntent);%0D%0A
         %7D%0D%0A     
@@ -1330,17 +1330,16 @@
 ontext, 
-m
 QueueSer
@@ -1723,25 +1723,20 @@
     if (
-mInterfac
+Queu
 eService

Update mInterfaceReceiver.java