Android Process One

Source: Internet
Author: User

Android Process One
1. Review the structure
Engine base class
-abstract operation () interface interface
Tire sub-Class
-operation ()
2. Process
class, module, app executes in an area of memory, there is a gap between each block, the principle cannot call each other
There are certain ways to access each other, so cross-process communication is called inter-process communication
In general, the components of an Android application are in the same process, which is called short-range communication
3. IPC
When you start the app, the Android system's Zygote service fork a new process
The address space of the different processes is independent and the communication is relatively slow
4. Android Process
There is a virtual machine VM object in the Android process that executes Java code and also directs the execution of the JNI local program, enabling communication between Java and C + +
Each process has: A VM object, the main thread, and the MQ used by the main thread, Looper
:
---Progress---------------------
|
|java
|
|------------JNI-------------VMS
|
|c/c++
|
|-------------------------------
The meaning of Looper is to keep the main thread running.
The most important task of the main thread is to handle UI events, and whenever a UI event occurs, the Android framework adds a message to MQ, the main thread executes a specific method based on the message, executes the Looper class, and observes the MQ dynamic

Android Process One

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.