zoukankan      html  css  js  c++  java
  • Notification flag

    Notification notifyUnit = mBuilder.build();
    					
    					notifyUnit.defaults |= Notification.DEFAULT_SOUND;
    					notifyUnit.flags |= Notification.FLAG_AUTO_CANCEL;
    					notifyUnit.priority = Integer.MAX_VALUE;
    					notifyUnit.flags |= Notification.FLAG_HIGH_PRIORITY;
    					notifyUnit.tickerText = message.title;
    					if(notifyUnit.contentIntent==null){
    						notifyUnit.contentIntent = pendingIntent;
    					}
    //					int notifyId =pushMessage.limitFlag==0?MoboPushNotifyHelper.NOTIFY_ID_NORMAL:pushMessage.type;
    //					if(pushMessage.showAnyway){
    //						notifyId = new Random().nextInt(500);
    //					}
    					int notifyId =getNotifyId(message); 
    					getNotificationManager().notify(notifyId, notifyUnit);
    

      notification flag

    FLAG_SHOW_LIGHTS //LED闪

    FLAG_ONGOING_EVENT////将此通知放到通知栏的"Ongoing"即"正在运行"组中

    FLAG_INSISTENT// //重复发出声音,直到用户响应此通知

    FLAG_ONLY_ALERT_ONCE//声音 震动 等只发生一次

    FLAG_AUTO_CANCEL////在通知栏上点击此通知后自动清除此通知

    FLAG_NO_CLEAR//表明在点击了通知栏中的"清除通知"后,此通知不清除,

    FLAG_FOREGROUND_SERVICE//设置前台进程只用于Service startForeground(int id, Notification notification)

    FLAG_HIGH_PRIORITY//高优先级

  • 相关阅读:
    localhost/127.0.0.1:8080
    android要注意的小问题
    2016年度工作计划
    2016年度计划总结
    竞品分析的思路
    《竞品调研:抄也是一门学问》学习总结
    书籍名单
    2015年度计划-总结
    以前的博客
    和老板沟通学习记录
  • 原文地址:https://www.cnblogs.com/wjw334/p/4424864.html
Copyright © 2011-2022 走看看