안드로이드 개발 질문/답변
(글 수 45,052)
notification로 알림메시지를 클릭해서
메시지 클릭하면 해당 페이지로 인텐트까지는 했는데
인텐트후에 알림 목록 봐도 안지워지고 그대로있는데
한번 클릭해서 인텐트되면 notification에 있는 알림메시지를 삭제할려면 어떻게해야되나요 ?
Intent p_intent = new Intent(context,ParentDetail.class);
p_intent.putExtra("PARENTNAME", who);
p_intent.putExtra("CHILDID", id);
p_intent.putExtra("FLAG", "1");
PendingIntent contentIntent = PendingIntent.getActivity(context,0,
p_intent, PendingIntent.FLAG_NO_CREATE);
Notification notification = new Notification(R.drawable.isarang,id+"로부터 메시지가 도착했습니다.",System.currentTimeMillis());
notification.setLatestEventInfo(context,"I_Sarang", msg, contentIntent);
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager notmager = (NotificationManager)context.getSystemService(ns);
notmager.notify(1,notification);
이런식으로사용했습니다 .
메시지 클릭하면 해당 페이지로 인텐트까지는 했는데
인텐트후에 알림 목록 봐도 안지워지고 그대로있는데
한번 클릭해서 인텐트되면 notification에 있는 알림메시지를 삭제할려면 어떻게해야되나요 ?
Intent p_intent = new Intent(context,ParentDetail.class);
p_intent.putExtra("PARENTNAME", who);
p_intent.putExtra("CHILDID", id);
p_intent.putExtra("FLAG", "1");
PendingIntent contentIntent = PendingIntent.getActivity(context,0,
p_intent, PendingIntent.FLAG_NO_CREATE);
Notification notification = new Notification(R.drawable.isarang,id+"로부터 메시지가 도착했습니다.",System.currentTimeMillis());
notification.setLatestEventInfo(context,"I_Sarang", msg, contentIntent);
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager notmager = (NotificationManager)context.getSystemService(ns);
notmager.notify(1,notification);
이런식으로사용했습니다 .



