NotificationManager

代码
NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
        Notification notification 
= new Notification(R.drawable.icon, "您有新消息了", System.currentTimeMillis());
        PendingIntent contentIntent 
= PendingIntent.getActivity(this0, getIntent(), 0);
        notification.setLatestEventInfo(
this"天气预报""晴转多云", contentIntent);
        notificationManager.notify(R.drawable.icon, notification);

 

posted @ 2011-01-25 15:38  Liren  阅读(557)  评论(0编辑  收藏  举报