Notification.Builder PendingIntent
2013-10-11 16:06
411 查看
设置FullScreenIntent:
一个全屏状态下替代状态栏上的Notification的intent,仅适用于使用非常高的优先级通知,会引起用户的即时关注,如用户已显式设置为一个特定的时间,一个来电或闹钟。
设置FullScreenIntent后,会立即响应该Intent ,而不会等待用户去手动触发。参看源码 Phone app 下面的NotificationMgr.java 的updateInCallNotification() 方法的设置
/** * An intent to launch instead of posting the notification to the status bar. * Only for use with extremely high-priority notifications demanding the user's * <strong>immediate</strong> attention, such as an incoming phone call or * alarm clock that the user has explicitly set to a particular time. * If this facility is used for something else, please give the user an option * to turn it off and use a normal notification, as this can be extremely * disruptive. * * @param intent The pending intent to launch. * @param highPriority Passing true will cause this notification to be sent * even if other notifications are suppressed. */ public Builder setFullScreenIntent(PendingIntent intent, boolean highPriority) { mFullScreenIntent = intent; setFlag(FLAG_HIGH_PRIORITY, highPriority); return this; }
一个全屏状态下替代状态栏上的Notification的intent,仅适用于使用非常高的优先级通知,会引起用户的即时关注,如用户已显式设置为一个特定的时间,一个来电或闹钟。
builder.setFullScreenIntent(inCallPendingIntent, true);
设置FullScreenIntent后,会立即响应该Intent ,而不会等待用户去手动触发。参看源码 Phone app 下面的NotificationMgr.java 的updateInCallNotification() 方法的设置
相关文章推荐
- iOS-UIImage切圆角方法(UIImage make round corner image)
- Unique Binary Search Trees [LEETCODE]
- 对request.getSession(false)的理解(附程序员常疏忽的一个漏洞)
- Java自带的GUI性能监控工具Jconsole以及JisualVM简介
- IOS7 UITextView高度变换问题
- Android Handler Looper MessageQueue
- 树形dp-hdu-3721-Building Roads
- CloudFoundry bundle install 遇到 ExtensionBuildError问题时
- JAVA 如何把request请求的参数,快速放到model对象中
- java uuid 随机生成唯一序列号
- UVa 10301 - Rings and Glue
- 眼花缭乱的UI,蓝牙位于何方
- 介绍KeyTool GUI工具2款
- assigning to uiimagepickercontrollerdelegate from incompatible type
- 关于UITableView 不能回调 tableView: cellForRowAtIndexPath的问题
- request times
- ant build.xml compile 编译 指定 jar
- FragmentTabHost切换Fragment时避免重复加载UI
- ElasticSearch, Kibana, and Fluentd 的简单部署实例
- 1699Best Sequence