A view hierarchy is placed within an activity's window by the
method. The content view is the View object at the root of the hierarchy. (See the separate User Interface document for more information on views and the hierarchy.) Activity.setContentView()
The content view is the View object at the root of the hierarchy. 这句话如果是真的,比较重要。
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.
收到消息有可能会用NotificationManager
去通知、提示使用者,或者像之前用的toast也可以。NotificationManager
可以有很多提示使用者的方法,看上面可以知道。
ContentProvider
base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. However,applications do not call these methods directly. Rather they use a
ContentResolver
object and call its methods instead. A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved.
provider管理的数据不只是在sqlite里面的,文件系统里面的也。应用要使用数据,要用ContentResolver
object ,进程间的,也用它,比如访问其他应用的数据。