使用NotificationManager类
notify发送通知
cancel删除通知
//create notification
NotificationCompat.Builder alVar = new NotificationCompat.Builder(mService);
alVar.setOngoing(true);
alVar.setPriority(2);
alVar.setWhen(SystemClock.uptimeMillis());
RemoteViews remoteViews = new RemoteViews(mService.getPackageName(), R.layout.customized_remote);
alVar.setSmallIcon(R.drawable.about_logo);
alVar.setContent(remoteViews);
((NotificationManager) mService.getSystemService("notification")).notify(1, alVar.build());
// delete notification
((NotificationManager) mService.getSystemService("notification")).cancel(1);