Because bloggers have learned a bit about Android before, so the study notes are not the same as others.
Blogger's study reference book is crazy Android handout second edition. This series of blogs is a record of learning notes.
Because bloggers usually have to work, so also at night sometimes read, write blog.
The blogger insists on reading one hours a day and documenting his essays.
Hope to bring you help.
===========================================================================
Basic components of Android
===========================================================================
The basic components of Android are Activity,service,broadcastlistener,contentprovider and so on.
1. Activity && View
Activity is similar to JFrame, but more than jframe can do. Unlike JFrame, activity is just a form, and the content to display is done by view
View is the base class for all UI controls, and one activity may have many view, which can be specified by Setcontentview (r.layout.view name).
2. Service
Service and activity are similar, but I simply understand that there is no graphical interface to the activity. Mostly running in the background, with their own independent life cycle.
3. Broadcastlistener
As the name implies, it is a broadcast listener, similar to the concept of a listener in Java, but the listener in Java listens to an object, while an Android listener listens to
The major components in the application. Of course, it is not listening to all messages, just listening to the message types defined in Intentfilter.
4. ContentProvider
ContentProvider is primarily used for data communication between applications, and is a standard that Android provides for cross-application communication.
5. Intent && Intentfilter
Strictly speaking, intent is not a basic component, but a carrier of communication between components. Communication between the Activity,service,broadcastreceiver is
Take intent as the carrier.
Intent is also divided into display intent and implicit intent
Display Intent: Explicitly indicates the class name of the component that needs to be started or triggered
Implicit intent: Just specify what conditions should be met by the component that needs to be started or triggered
For the implicit intent,android system, it is necessary to parse it and parse out its conditions, which will be used intentfilter.
The above is a preliminary understanding of the basic components.
"Android Learning Note 1" Android Basic components Activity,service,boradcastreceiver,contentprovider Introduction