package com.spaceout;

import android.app.Activity;

import android.content.Intent;

import android.os.Bundle;

import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        startService(new Intent(this, NeuralAlertnessService.class));
    }

    public void setNetwork(View view) {
        startActivity(new Intent(this, NetworkActivity.class));
    }

}

@@ -521,10 +521,158 @@
 %0A    %7D%0A%0A
+    @Override%0A    public void onDestroy() %7B%0A        stopService(new Intent(this, NeuralAlertnessService.class));%0A%0A        super.onDestroy();%0A    %7D%0A%0A
 %7D%0A

Stop the neural alertness service when the app is closed