내 앱에서 알림을 설정했습니다. 잘 작동합니다. statusbar
에서 알림을 클릭하면 앱에 걸립니다.
알림을 클릭하면 설정해야합니다. 어디에서 설정할 수 있습니까? 알림을 클릭 할 때 암시 적으로 호출 된 메서드가 있습니까?
또한 클릭 한 경우 해당 알림을 제거하려면 어떻게해야합니까? 알림을위한 onclicklistener
이
당신은에서 onCreate와 onNewIntent 방법에 대한 귀하의 활동 모습에서 그 의도에 몇 가지 여분의 데이터를 추가 할 수 내 코드notifManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Intent inty=getIntent();
note = new Notification(R.drawable.icon, "New E-mail", System.currentTimeMillis());
PendingIntent intent = PendingIntent.getActivity(MainActivity.this, 0, inty, 0);
note.setLatestEventInfo(MainActivity.this, "New E-mail", "You have one unread message.", intent);
notifManager.notify(R.string.search_hint, note);