Four Components activity
Activity is an Android app interface, such as viewing contacts, calling, playing the game interface, etc.
An application typically contains multiple activity, that is, multiple interfaces
Activity manages various view components through layouts
The view can be rendered by the Setcontentview () method
Service
The service runs in the background, dealing with things that some users can't see and that have a duration. such as downloading data, playing music, etc.
Service does not generate UI, is invisible
All user-implemented service must inherit the service class of the system and be registered in the configuration file
Content Provider
Data is a private program in Android
Content Provider provides a mechanism for data interaction among multiple programs
Content provider exposes a number of standard APIs to manipulate data
Broadcast Receiver
Broadcast receiver is responsible for responding to external events
Broadcast receiver does not generate UI, is invisible
All user implementations broadcast receiver must inherit the Broadcastreceiver class and register
Applications can broadcast their own intent through sendbroadcast (), and other programs are intercepted by their own broadcast receiver for event handling
Summary
Simply put, the activity is the interface, service is the backend services, Content provider is the external data interface, broadcast receiver is broadcast and accept external broadcast
Important Object Intent
Intent can be seen as a reference, static or intent
Four components, three need intent support
传递Intent启动一个Activity,eg.StartActivity/StartActivityForResult传递Intent启动一个Service,eg.StartService/BindService通过Intent新加入一个广播,eg.SendBroadcast......
Other Launcher&widget
Launcher: System application, including main interface, application list two main activity
Widgets (Widgets): Different ways in which applications are programs on the desktop, such as the weather bar, billing shortcuts, music player widgets
Notification: Reminder (drop-down box message) example
Android Development four Big