핸들러를 이용해 알람을 구현했습니다. 타이머가 0이 되면 울리구요



그런데 백그라운드에 있거나 다른 앱을 실행중일 때 카카오톡같이 대화상자를 뜨게 하고 싶은데 어떻게 하는지 모르겠습니다.



아니면 강제로 앱을 실행시켜서 알람화면을 보여주고 싶은데 그것도 어떻게 할지 감이 잘 안잡힙니다.



public class AlarmReceiver extends BroadcastReceiver {

TimerActivity tm = new TimerActivity();

public void onReceive(Context context, Intent intent) {

Intent intent2 = new Intent (context, TimerActivity.class);

intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

if(tm.checkAlarm == true) {

context.startActivity(intent2);

}

}


}


이렇게 했는데 알람이 울렸을때 자동으로 앱이 실행이 안되더라구요 ...