[code=java]
public void startNotification(View v){
Editable userInput = editUserInput.getText();
Notification noti = new Notification.Builder(this)
.setContentTitle("You have a msg")
.setContentText("Tom and Jerry married!"+"_id:"+userInput.toString())
.setSmallIcon(R.drawable.ic_launcher)
.build();

NotificationManager notiManage = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notiManage.notify(Integer.parseInt(userInput.toString()),noti);
}

[/code]
NotificationManager 的方法notify(id,noti),其中id是通知的唯一标示,如果通知栏中有未处理的的同id通知,则会覆盖。