Android 开发文档 程序基础 ——Broadcast receivers组件
来源:互联网 发布:广西财经学院网络 编辑:程序博客网 时间:2024/05/16 10:12
Broadcast receivers只接受广播通知并做出反应的组件。广播通知往往来自系统,比如时区改变,语言改变。extends自BroadcastReceiver基类。
一个程序可以有好几个Broadcast receivers来接受它认为重要的通知。
Broadcast receivers没有用户界面,但是可以打开一个activity来对接受到的信息做出反应,或者利用NotificationManager来警告用户。Notifications可以用很多方法来引起用户的注意,一般是在状态栏显示一个图标,以便用户打开信息。
转自我的android博客
原文
Broadcast receiversA broadcast receiver is a component that does nothing but receive and react to broadcast announcements. Many broadcasts originate in system code — for example, announcements that the timezone has changed, that the battery is low, that a picture has been taken, or that the user changed a language preference. Applications can also initiate broadcasts — for example, to let other applications know that some data has been downloaded to the device and is available for them to use.
An application can have any number of broadcast receivers to respond to any announcements it considers important. All receivers extend the BroadcastReceiver base class.
Broadcast receivers do not display a user interface. However, they may start an activity in response to the information they receive, or they may use the NotificationManager to alert the user. Notifications can get the user’s attention in various ways — flashing the backlight, vibrating the device, playing a sound, and so on. They typically place a persistent icon in the status bar, which users can open to get the message.
- Android 开发文档 程序基础 ——Broadcast receivers组件
- 安卓学习140501:组件——Broadcast Receivers
- Android 开发文档 程序基础 ——activity组件
- Android 开发文档 程序基础 ——Services组件
- Android 开发文档 程序基础 ——Content providers组件
- Android broadcast receivers详细介绍
- Android 广播接收器(Broadcast Receivers)
- android 62Android程序开发入门——组件生命周期之Broadcast receiver
- Android Broadcast Intents and Broadcast Receivers
- Android Broadcast Intents and Broadcast Receivers
- Android App开发基础篇—四大组件之Broadcast-01
- Android 开发文档 程序基础——Activating components: intents
- Android 开发文档 程序基础——Shutting down components
- Android 开发文档 程序基础——The manifest file
- Android 开发文档 程序基础——Intent filters
- Android 开发文档 程序基础——Activities and Tasks
- Android App开发从零开始之基础篇—四大组件(三)—组件间的通信方式Broadcast(广播)
- Android基础知识——组件Broadcast Receiver
- Android 开发文档 之程序基础Application Fundamentals
- Android 开发文档 程序基础 ——activity组件
- 经典SQl语句学习大全
- 数字转IP地址自定义函数(附:相互转换)
- Android 开发文档 程序基础 ——Services组件
- Android 开发文档 程序基础 ——Broadcast receivers组件
- Oracle学习笔记(4) 在PLSQL中更改数据和管理事务
- Android 开发文档 程序基础 ——Content providers组件
- Valgrind 相关
- Oracle学习笔记(5) 在PLSQL中使用游标获取数据
- JQuery学习日志三(横向纵向菜单)
- Android 开发文档 程序基础——Activating components: intents
- Android 开发文档 程序基础——Shutting down components
- Oracle学习笔记(6) 动态SQL