我想在发布用户通知后在状态栏中显示通知。我该怎么办?
答案 0 :(得分:1)
状态栏中的通知......
final NotificationManager mgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification note = new Notification(R.drawable.msg,"New Message",System.currentTimeMillis());
PendingIntent i = PendingIntent.getActivity(this, 0, new Intent(this,notification.class), 0);
note.setLatestEventInfo(this,"NewMessage","You Receive "+count+" New Message", i);
mgr.notify(Notify,note);
答案 1 :(得分:0)