mNotifMan =(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
Calendar calendar = Calendar.getInstance();
Notification n = new Notification();
n.flags = Notification.FLAG_AUTO_CANCEL|Notification.DEFAULT_VIBRATE|Notification.FLAG_SHOW_LIGHTS;
n.icon = R.drawable.ic_launcher;
n.when = calendar.getTimeInMillis();
n.tickerText=alertTitle;
n.number++;
String nMsg="";
if (mMsg.length()<40)
{
 nMsg=mMsg;
}
else
{
 nMsg=mMsg.substring(0, 40)+"...";
}
n.setLatestEventInfo(getApplicationContext(), alertTitle,nMsg, pendingIntent());
mNotifMan.notify(NOTIF_CONNECTED, n);
  
 
 
private PendingIntent pendingIntent(){
 Intent i= new Intent(getApplicationContext(), IntroActivity.class);
 i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP);
 i.putExtra("type", mType);
 i.putExtra("key", mKey);
 i.putExtra("title", mTitle);
 i.putExtra("msg", mMsg);
 i.putExtra("expdate", mExpdate);
 i.putExtra("noti", Integer.toString(NOTIF_CONNECTED));
 PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0, i, PendingIntent.FLAG_UPDATE_CURRENT);
 return pi;   
}
 
FLAG_ONGOING_EVENT를 사용하지 않아도 진행중 리스트에 표기가 되고
상태바의 지우기 버튼을 클릭해도 해당 알림이 삭제가 안되는데
 
삭제가 안되는 이유가 진행중으로 표기가 돼서 그러는것 같은데
그냥 알림으로 띄우고 삭제가 되도록 하고 싶은데
아무리 연구를 해봐도 모르겠어요.
 
부탁드립니다.