제가 알람어플을 만들고 있는데

 

알람이 울릴시 간단한 게임이 뜨고 그 게임을 클리어하면 다이얼로그창이 떠서

 

버튼을 누르면 게임과 알람벨이 종료되는걸 하고 있습니다.

 

알람 종료에 대한 메소드는 기본알람 소스를 기반으로 하고 있어서 이를 분석해보니

 

public void dismiss(boolean killed) {
        Log.i(killed ? "Alarm killed" : "Alarm dismissed by user");
        // The service told us that the alarm has been killed, do not modify
        // the notification or stop the service.
        if (!killed) {
            // Cancel the notification and stop playing the alarm
            NotificationManager nm = getNotificationManager();
            nm.cancel(mAlarm.id);
            stopService(new Intent(Alarms.ALARM_ALERT_ACTION));
        }
        finish();
    }

 

이 메소드인거 같습니다

 

그래서 이 해당 클래스를 게임클래스 내에서 bell로 인스턴스 받아서

 

public void onClick(DialogInterface dialog, int whichButton) {
              finish();
              bell.dismiss(false);

이런식으로 했는데 bell 종료부분에서 어플이 죽습니다.

 

마찬가지로 bell.finish();를 해도 죽습니다.

 

어떤 방법으로 해야 다른 클래스의 액티비티가 꺼지는지 궁금합니다.

 

도움 부탁드립니다.