android 5.1+ Notification

14 篇文章 0 订阅

user通过NotificationManager.notify发送通知请求,然后NotificationManger发送请求给NotificationManagerService,在这里对pendingIntent的信息进行提取以及过滤,然后将消息放进消息队列中去,enqueueNotificationInternal()方法负责将消息放入队列中,buzzBeepBlinkLocked()负责对消息进行处理.至此对于消息的第一步处理就到此结束 如图上半部分所示
notification

然后,当监听器监听到Notification的时候,通知BaseStatusBar,进行状态栏的通知更新,这里有一个问题,就是在android L版本之后,将所有的通知颜色都变成了白色,上网问了一下说是为了美观和整洁,的确有这个问题,但是当贴上非透明的图片的时候,原先的颜色会被涂白,因此,这里出现一些bug

因为原先的那种形式的图标不好看, 颜色太花, 在状态栏上一点也不好看.并且这也是 Material Design 的规范了 ( https://www.google.com/design/spec/patterns/notifications.html)实际上这样的改变在 Android 5.0 里好看了很多, 在 Android 6.0 里有个 android:windowLightStatusBar 把状态栏变成亮色的设定 (图标会变成灰色), 如果 Icon 是单色的, 系统 tint 成其他颜色选择的余地就大了.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. Introduction 1.1 Document Structure 1.1.1. Requirements by Device Type 1.1.2. Requirement ID 1.1.3. Requirement ID in Section 2 2. Device Types 2.1 Device Configurations 2.2. Handheld Requirements 2.2.1. Hardware 2.2.2. Multimedia 2.2.3. Software 2.2.4. Performance and Power 2.2.5. Security Model 2.3. Television Requirements 2.3.1. Hardware 2.3.2. Multimedia 2.3.3. Software 2.2.4. Performance and Power 2.4. Watch Requirements 2.4.1. Hardware 2.4.2. Multimedia 2.4.3. Software 2.5. Automotive Requirements 2.5.1. Hardware 2.5.2. Multimedia 2.5.3. Software 2.2.4. Performance and Power 2.2.5. Security Model 2.6. Tablet Requirements 2.4.1. Hardware 3. Software 3.1. Managed API Compatibility 3.1.1. Android Extensions 3.2. Soft API Compatibility 3.2.1. Permissions 3.2.2. Build Parameters 3.2.3. Intent Compatibility 3.2.3.1. Core Application Intents 3.2.3.2. Intent Resolution 3.2.3.3. Intent Namespaces 3.2.3.4. Broadcast Intents 3.2.3.5. Default App Settings 3.2.4. Activities on secondary displays 3.3. Native API Compatibility 3.3.1. Application Binary Interfaces 3.3.2. 32-bit ARM Native Code Compatibility 3.4. Web Compatibility 3.4.1. WebView Compatibility 3.4.2. Browser Compatibility 3.5. API Behavioral Compatibility 3.6. API Namespaces 3.7. Runtime Compatibility 3.8. User Interface Compatibility 3.8.1. Launcher (Home Screen) 3.8.2. Widgets 3.8.3. Notifications 3.8.3.1. Presentation of Notifications 3.8.3.2. Notification Listener Service 3.8.3.3. DND (Do not Disturb) 3.8.4. Search 3.8.5. Alerts and Toasts 3.8.6. Themes 3.8.7. Live Wallpapers 3.8.8. Activity Switching 3.8.9. Input Management 3.8.10. Lock Screen Media Control 3.8.11. Screen savers (previously Dreams) 3.8.12. Location 3.8.13. Unicode and Font 3.8.14. Multi-windows 3.9. Device Administration 3.9.1 Device Provisioning 3.9.1.1 Device owner provisioning 3.9.1.2 Managed profile provisioning 3.9.2 Managed Profile Support 3.10. Accessibility 3.11. Text-to-Speech 3.12. TV Input Framework 3.12.1. TV App 3.12.1.1. Electronic Program Guide 3.12.1.2. Navigation 3.12.1.3. TV input app linking 3.12.1.4. Time shifting 3.12.1.5. TV recording 3.13. Quick Settings 3.14. Media UI 3.15. Instant Apps 3.16. Companion Device Pairing 4. Application Packaging Compatibility 5. Multimedia Compatibility 5.1. Media Codecs 5.1.1. Audio Encoding 5.1.2. Audio Decoding 5.1.3. Audio Codecs Details 5.1.4. Image Encoding 5.1.5. Image Decoding 5.1.6. Image Codecs Details 5.1.7. Video Codecs 5.1.8. Video Codecs List 5.2. Video Encoding 5.2.1. H.263 5.2.2. H-264 5.2.3. VP8 5.2.4. VP9 5.3. Video Decoding 5.3.1. MPEG-2 5.3.2. H.263 5.3.3. MPEG-4 5.3.4. H.264 5.3.5. H.265 (HEVC) 5.3.6. VP8 5.3.7. VP9 5.4. Audio Recording 5.4.1. Raw Audio Capture 5.4.2. Capture for Voice Recognition 5.4.3. Capture for Rerouting of Playback 5.5. Audio Playback 5.5.1. Raw Audio Playback 5.5.2. Audio Effects 5.5.3. Audio Output Volume 5.6. Audio Latency 5.7. Network Protocols 5.8. Secure Media 5.9. Musical Instrument Digital Interface (MIDI) 5.10. Professional Audio 5.11. Capture for Unprocessed 6. Developer Tools and Options Compatibility 6.1. Developer Tools 6.2. Developer Options 7. Hardware Compatibility 7.1. Display and Graphics 7.1.1. Screen Configuration 7.1.1.1. Screen Size 7.1.1.2. Screen Aspect Ratio 7.1.1.3. Screen Density 7.1.2. Display Metrics 7.1.3. Screen Orientation 7.1.4. 2D and 3D Graphics Acceleration 7.1.4.1 OpenGL ES 7.1.4.2 Vulkan 7.1.4.3 RenderScript 7.1.4.4 2D Graphics Acceleration 7.1.4.5 Wide-gamut Displays 7.1.5. Legacy Application Compatibility Mode 7.1.6. Screen Technology 7.1.7. Secondary Displays 7.2. Input Devices 7.2.1. Keyboard 7.2.2. Non-touch Navigation 7.2.3. Navigation Keys 7.2.4. Touchscreen Input 7.2.5. Fake Touch Input 7.2.6. Game Controller Support 7.2.6.1. Button Mappings 7.2.7. Remote Control 7.3. Sensors 7.3.1. Accelerometer 7.3.2. Magnetometer 7.3.3. GPS 7.3.4. Gyroscope 7.3.5. Barometer 7.3.6. Thermometer 7.3.7. Photometer 7.3.8. Proximity Sensor 7.3.9. High Fidelity Sensors 7.3.10. Fingerprint Sensor 7.3.11. Android Automotive-only sensors 7.3.11.1. Current Gear 7.3.11.2. Day Night Mode 7.3.11.3. Driving Status 7.3.11.4. Wheel Speed 7.3.12. Pose Sensor 7.4. Data Connectivity 7.4.1. Telephony 7.4.1.1. Number Blocking Compatibility 7.4.2. IEEE 802.11 (Wi-Fi) 7.4.2.1. Wi-Fi Direct 7.4.2.2. Wi-Fi Tunneled Direct Link Setup 7.4.2.3. Wi-Fi Aware 7.4.2.4. Wi-Fi Passpoint 7.4.3. Bluetooth 7.4.4. Near-Field Communications 7.4.5. Minimum Network Capability 7.4.6. Sync Settings 7.4.7. Data Saver 7.5. Cameras 7.5.1. Rear-Facing Camera 7.5.2. Front-Facing Camera 7.5.3. External Camera 7.5.4. Camera API Behavior 7.5.5. Camera Orientation 7.6. Memory and Storage 7.6.1. Minimum Memory and Storage 7.6.2. Application Shared Storage 7.6.3. Adoptable Storage 7.7. USB 7.7.1. USB peripheral mode 7.7.2. USB host mode 7.8. Audio 7.8.1. Microphone 7.8.2. Audio Output 7.8.2.1. Analog Audio Ports 7.8.3. Near-Ultrasound 7.9. Virtual Reality 7.9.1. Virtual Reality Mode 7.9.2. Virtual Reality High Performance 8. Performance and Power 8.1. User Experience Consistency 8.2. File I/O Access Performance 8.3. Power-Saving Modes 8.4. Power Consumption Accounting 8.5. Consistent Performance 9. Security Model Compatibility 9.1. Permissions 9.2. UID and Process Isolation 9.3. Filesystem Permissions 9.4. Alternate Execution Environments 9.5. Multi-User Support 9.6. Premium SMS Warning 9.7. Kernel Security Features 9.8. Privacy 9.8.1. Usage History 9.8.2. Recording 9.8.3. Connectivity 9.8.4. Network Traffic 9.9. Data Storage Encryption 9.9.1. Direct Boot 9.9.2. File Based Encryption 9.9.3. Full Disk Encryption 9.10. Device Integrity 9.11. Keys and Credentials 9.11.1. Secure Lock Screen 9.12. Data Deletion 9.13. Safe Boot Mode 9.14. Automotive Vehicle System Isolation 10. Software Compatibility Testing 10.1. Compatibility Test Suite 10.2. CTS Verifier 11. Updatable Software 12. Document Changelog 12.1. Changelog Viewing Tips 13. Contact Us

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值