Activity:html
An Activity
is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. Each activity is given a window in which to draw its user interface. The window typically fills the screen, but may be smaller than the screen and float on top of other windows.java
Services:android
A Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. Additionally, a component can bind to a service to interact with it and even perform interprocess communication (IPC). For example, a service might handle network transactions, play music, perform file I/O, or interact with a content provider, all from the background.windows
Content Providers:app
Content providers manage access to a structured set of data. They encapsulate the data, and provide mechanisms for defining data security. Content providers are the standard interface that connects data in one process with code running in another process.ide
BroadCast Recevicer:spa
extends Object
code
java.lang.Object | |
↳ | android.content.BroadcastReceiver |
![]() AppWidgetProvider , DeviceAdminReceiver component
|
BroadCast Recevicer:接受一种或者多种Intent做触发事件,接受相关消息,作一些简单处理,转换成一条Notification,统一了Android的事件广播模型。可使用BroadcastReceiver来让应用对外一个外部的事件做出响应。Broadcast Receiver经过NotificationManager来通知用户这些事情发生了,BroadcastReceiver注册的有两种方式,一种是能够在AndroidManifest.xml中注册,另外一种能够在运行时的代码中使用Context.registerReceiver()进行注册。用户还能够经过Context.sendBroadcast()将他们本身的intent broadcasts广播给其余的应用程序。orm