基本信息
源码名称:android消息栏通知消息
源码大小:0.91M
文件格式:.rar
开发语言:Java
更新时间:2016-12-07
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 1 元 
   源码介绍
android 多通知栏下载

public void createNotification() {
builder = new NotificationCompat.Builder(this); 
builder.setContentTitle(app_name)  
        .setContentText("下载完成")  
        .setSmallIcon(R.drawable.ic_launcher);//点击后让通知将消失;  
//notification = new Notification(R.drawable.dot_enable,app_name getString(R.string.is_downing) ,System.currentTimeMillis());
// notification = new Notification(
// //R.drawable.video_player,//应用的图标
// R.drawable.ic_launcher,//应用的图标
// app_name getString(R.string.is_downing),
// System.currentTimeMillis());
notification = builder.build();  
notification.flags |= Notification.FLAG_ONGOING_EVENT; 
notification.flags = Notification.FLAG_AUTO_CANCEL;

/*** 自定义  Notification 的显示****/  
contentView = new RemoteViews(getPackageName(),R.layout.notification_item);
contentView.setTextViewText(R.id.notificationTitle, app_name getString(R.string.is_downing));
contentView.setTextViewText(R.id.notificationPercent, "0%");
contentView.setProgressBar(R.id.notificationProgress, 100, 0, false);
notification.contentView = contentView;

// updateIntent = new Intent(this, AboutActivity.class);
// updateIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
// //updateIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
// pendingIntent = PendingIntent.getActivity(this, 0, updateIntent, 0);
// notification.contentIntent = pendingIntent;

notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(mId, notification);


}