public NotificationUtil(Context context){
//获取通知系统服务
mNotificaitionManager =(NotificationManager) context.getSystemService(context.NOTIFICATION_MANAGER);
//创建通知的集合
mNotifications = new HashMap<Integer, Notification>();
)
//获取通知系统服务
mNotificaitionManager =(NotificationManager) context.getSystemService(context.NOTIFICATION_MANAGER);
//创建通知的集合
mNotifications = new HashMap<Integer, Notification>();
)
2016-04-29
修改RemoteViews中的控件:
setOnClickPendingIntent(int viewId, PendingIntent pi);
setProgressBar(int viewId, int max, int progress, boolean indeteminate);
//
使用NotificationManager管理通知, notify(int id, Notification notification); cancel(int id)
//
1.修改通知栏中的进度条, 重新发出通知
setOnClickPendingIntent(int viewId, PendingIntent pi);
setProgressBar(int viewId, int max, int progress, boolean indeteminate);
//
使用NotificationManager管理通知, notify(int id, Notification notification); cancel(int id)
//
1.修改通知栏中的进度条, 重新发出通知
2016-04-29
Notification常用属性:
icon通知图标, tickerText通知显示的文字, when通知时间, flags通知的特性, contentView通知的视图, defaults默认效果, contentIntent点击通知栏的操作, sound播放的声音
icon通知图标, tickerText通知显示的文字, when通知时间, flags通知的特性, contentView通知的视图, defaults默认效果, contentIntent点击通知栏的操作, sound播放的声音
2016-04-29