Details about Android Configuration

Source: Internet
Author: User

There are a bunch of Interface Standard encapsulated complete components where to put, when you want to use a few match, the entire program is built, but the premise is to have a deep understanding of what is Android configuration information, and how the information is completed.

This configuration file not only describes application-related information, but also contains information about all components of an application. If you derive Activity or Service to implement a related class. This is only the first step in componentization. You need to write the information about this class to the Android configuration information before it can be applied as a component, otherwise, you will have to spend the rest of your life in obscurity.

I made a picture. This is not a stolen image. It is an original image, so it is ugly without an accident, but it can basically reflect some meanings. In Others. Here is a model of communication and interaction between platform applications. Each application has a strong application boundary, which is often expressed as a process boundary ...), app 1 is still App 2, which is clearly identified.

Each application has its own logic to split functional components. Such splitting usually has no standards, but is more efficient. The interaction logic between applications is also scattered. When App 1 interacts with App 2, it is often necessary to clearly know the specific information of the application of the other party, such as the process ID and process name, which makes the connection between the application and the application very stiff.

However, the communication between upper-layer applications and system applications often involves many specific modes. This mode may not be directly applied between common applications. In other words, system applications have some special characteristics. Focus: the lower part of the figure describes the application of Android. In Android, the application boundary is extremely vague at the component level. No process or application can be perceived.

For example, App 1 implements the components A and B, and App 2 implements the component C. Both components A and C want to use the B component, so they are used in the same way. They all need to be identified and communicated through the core components of the system.

Find and use component B. A. Although B and B are coming out of the family, I am very sorry. There is no special backend or shortcut, but we still need to use it in A proper way. A Harmonious Society is born. In Android, the identification and message passing logic of all components must depend on the underlying core for communication, so that the underlying core does not participate. For example, once the Service is found, it can generate persistent communication with it ...).

There is no bridge between the underlying core and no two components can be connected. For example, if an Activity jumps to another Activity, it must initiate an Intent to the underlying core. After the underlying parsing and approval, another Activity will be found.

Send related messages and data to it. To use the data in the Content Provider, an Activity must parse the relevant uri through the underlying core, locate the Content Provider, and pass the parameter. Then return the Cursor required by the Activity. This design ensures the absolute control and cognitive right of all components at the underlying core, making development like building blocks possible.

To enable the core system to fully grasp the information of each component, the Android configuration file is required. The configuration file is the plug that inserts the component into the underlying core. You can only use this plug to plug in the underlying core of the socket. Do not worry about it ...).

Components can shine and shine. In my opinion, the Android configuration information of components mainly includes two aspects: one is to describe how to recognize them. For example, Activity, Service, and Broadcast referers all have name information. And Intent information that you want to grasp ...).

Content Provider has a uri describing its identity. When other components use such a name or Intent, they can be found. The other part is the running information. This component is expected to run in a separate process, a process with the caller, or other related components in the same process.

Through the previous content, you may be able to have a preliminary understanding of the Android components. However, all these understandings are still at the static level, and the program is a dynamic concept. How are the components associated with each other and how can they work hand in hand to complete a function, this is the end.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.