package com.funambol.omadmclient.android.service;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class DaemonControllerActivity extends Activity implements OnClickListener {
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        View startButton = findViewById(R.id.startservice_button);
        startButton.setOnClickListener(this);
        View stopButton = findViewById(R.id.stopservice_button);
        stopButton.setOnClickListener(this);
    }
    
    public void onClick(View v){
        switch (v.getId()){
            case R.id.startservice_button:
                startService(new Intent(DaemonControllerActivity.this,OmaDmClinetService.class));
                break;
            case R.id.stopservice_button:
                stopService(new Intent(DaemonControllerActivity.this,OmaDmClinetService.class));
                break;
            default:
                break;
        }
    }
}
