클릭하면 앱이 백그라운드에서 전면으로 이동합니다. 다음 코드를 사용하고 있습니다 :앱을 클릭하면 알림이 표시됩니다.
NotificationManager noma = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
PendingIntent pen = PendingIntent.getActivity(Timer.this, 0, intent, 0);
intent.putExtra("key", "trigerred");
String body = "This is a message";
String title = "This is title";
Notification no = new Notification(R.drawable.ic_launcher, body, System.currentTimeMillis());
no.defaults = Notification.DEFAULT_ALL;
no.setLatestEventInfo(this, title, body, pen);
noma.notify(uniqueID, no);
새로운 의도를 만드는 알림을 클릭했지만 맨 앞에 만든 의도를 원하는 경우. 내가 어떻게 할 수 있니?
가능한 중복 시도 [알림을 클릭 - 응용 프로그램으로 보내기] (http://stackoverflow.com/questions/3172966/click-notification-send-to-application) –
우편 번호 곳 당신은 당신의 의도 객체를 얻습니다. – Natali
http://stackoverflow.com/questions/6575730/notification-to-restore-a-task-rather-than-a-specific-activity –