Android 开发文档 程序基础 ——Broadcast receivers组件
2010-06-19 10:46
615 查看
Broadcast receivers只接受广播通知并做出反应的组件。广播通知往往来自系统,比如时区改变,语言改变。extends自BroadcastReceiver基类。
一个程序可以有好几个
Broadcast
receivers来接受它认为重要的通知。
Broadcast receivers没有用户界面,但是可以打开一个activity来对接受到的信息做出反应,或者利用NotificationManager来警告用户。
Notifications
可以用很多方法来引起用户的注意,一般是在状态栏显示一个图标,以便用户打开信息。
转自我的android博客
原文
Broadcast receivers
A 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.
一个程序可以有好几个
Broadcast
receivers来接受它认为重要的通知。
Broadcast receivers没有用户界面,但是可以打开一个activity来对接受到的信息做出反应,或者利用NotificationManager来警告用户。
Notifications
可以用很多方法来引起用户的注意,一般是在状态栏显示一个图标,以便用户打开信息。
转自我的android博客
原文
Broadcast receivers
A 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 开发文档 之程序基础Application Fundamentals
- Android 开发文档 程序基础 ——activity组件
- Android 开发文档 程序基础——Activities and Tasks
- Android 开发文档 程序基础 ——Services组件
- Android 开发文档 程序基础 ——Content providers组件
- Android 开发文档 程序基础——Affinities and new tasks
- Android 开发文档 程序基础——Activating components: intents
- Android 开发文档 程序基础——Shutting down components
- Android 开发文档 程序基础——The manifest file
- Android 开发文档 程序基础——Intent filters
- Android核心基础-3. 开发一个Android程序-3.4. 了解工程目录结构
- Android开发基础——真机测试错误,ADB启动不了,程序安装不了,the connection to adb is down,INSTALL_CANCELED_BY_USER...
- Android 程序开发——百度地图的使用(二) 基础地图
- Android核心基础-3. 开发一个Android程序-3.3. 程序启动过程
- Android程序开发0基础教程(一)
- Android开发基础1-概述和SDK安装、文档 -
- Android程序开发基础之——页面传值
- Android开发的基础常识二之程序解读
- android activity开发文档翻译 - 1 - 基础篇
- Android开发之道(4)程序框架基础