manager = (NotificationManager) this .getSystemService(Context.NOTIFICATION_SERVICE); notification = new Notification(); notification.icon = R.drawable.app_icon; notification.tickerText = "天天动听,美好音质。"; notification.flags = Notification.FLAG_NO_CLEAR; rm=new RemoteViews(this .getPackageName(), R.layout.notification); Intent pre=new Intent(); pre.setAction("com.exmple.ttplayer.ntf_pre"); //pre.putExtra("ntf_pre", 2); PendingIntent prePen=PendingIntent.getBroadcast(this, 0, pre, 0); rm.setOnClickPendingIntent(R.id.ntf_pre, prePen); Intent play=new Intent(); play.setAction("com.exmple.ttplayer.ntf_play"); //play.putExtra("ntf_play", 1); PendingIntent playPen=PendingIntent.getBroadcast(this, 0, play, 0); rm.setOnClickPendingIntent(R.id.ntf_ply, playPen); Intent next=new Intent(); next.setAction("com.exmple.ttplayer.ntf_next"); //next.putExtra("ntf_next", 3); PendingIntent nextPen=PendingIntent.getBroadcast(this, 0, next, 0); rm.setOnClickPendingIntent(R.id.ntf_next, nextPen); notification.contentView = rm; it = new Intent(First.this, TabHo.class); PendingIntent pintent = PendingIntent.getActivity(this, 1, it, 1); notification.contentIntent = pintent; manager.notify(1, notification);