Understanding the communication principle between processes in Android (I) ---- proxy mode in RPC
In the Android system, inter-process communication is implemented through a lightweight RPC (Remote
Procedure Call remote process call) and aidl (Android interface definination
1. Introduction to Android Service
Android services include Android services and native services.
Android service, also known as Java service, is a server implemented in the framework layer. Android service is written in Java.
Native service, also known as system service, is
Address: http://blog.csdn.net/andy_android/article/details/7301814
1. Introduction to Android Service
Android services include Android services and native services.
Android service, also known as Java service, is a server implemented in the framework layer. Android service
();Intent. setAction (GlobalVarable. EXIT_ACTION); // exitThis. sendBroadcast (intent); // send BroadcastSuper. finish ();// Exit the background thread and destroy static variablesSystem. exit (0 );
How to listen for and process the user's press back
[Java]Package com. example. android_test01;Import android. app. Activity;Import
Android mobile guard-md5 encryption process, android-md5
In the previous article, we stored the user's password using SharedPreferences, and opened/data/com. wuyudong. the config. import the xml file to the local device to view the content:
The password is in plain text, which is very insecure. Md5 encryption is used
. The library is then generated and, as long as the specification operates, it can generate a library file that can make the Java layer successfully invoke.
Using NDK to compile the local language can refer to this blog post: http://blog.csdn.net/conowen/article/details/7522667
3. JNI Call Process
As we all know, Android application layer classes are written in Java, these Java classes are compiled into a
.2. Method 2--Add Hardware abstraction LayerSplit the driver into split, part open source in kernel, part not open source in Android frame:Second, for example led Android drive:From here we will see the direction of the entire application framework layer to the underlying drive. First, either way, we need to implement a Linux driver for the upper layer to access the LED resources.It is also the use of JNI t
Android fixes 2 places in the Add account code Bug,retme took cool names Launchanywhere, Broadanywhere (reference 1, 2). This article follows the ideas of predecessors to learn the principle of the bug and the use of ideas.Let's take a look at the code in the source setting to add an account, to understand how the bug produced./packages/apps/settings/src/com/android
makenewwindow of the policymanager class is used to create a specific application window by calling the member function makenewwindow of the Policy class instance.
Next, we will continue to analyze the implementation of the Policy class member function makenewwindow.
Step 3. Policy. makenewwindow
public class Policy implements IPolicy { ...... public PhoneWindow makeNewWindow(Context context) { return new PhoneWindow(context); } ......}
This function is defined in the file
start will not go application this step, but directly go mainactivity (including a series of measurement, Layout, drawing), So the hot-start process simply needs to create and initialize a mainactivity, without having to create and initialize the application,Because an application is created from the new process to the destruction of the process, application is
Android compiles and runs in-depth analysis of fonts: [Increase decrease] Type: Reprint first look at the Android application written in the Java language from the source to the installation package of the entire process, this process to understand the Android compile and ru
, pdu.length); } int result = MWAPPUSH.DISPATCHWAPPDU (Output.tobytearray (), resultreceiver, this); if (DBG) log ("DISPATCHWAPPDU () returned" + result); Result is ACtivity. RESULT_OK If an ordered broadcast is sent return (result = = ACTIVITY.RESULT_OK); } list In the method above, call Wappushoversms.java's DISPATCHWAPPDU to process MMS messages and continue to invoke Dispatchsmsdeliveryintent Handling SM
use mm for compilation.
First, let's give a general introduction to the entire process and then make a key analysis. The input event process involves the following files:
/Frameworks/base/services/Java/COM/Android/Server/windowmanagerservice. Java
/Frameworks/base/services/Java/C
ringtonemanager. getactualdefaultringtoneuri (getcontext (), getringtonetype ());}}Defaultringtonepreference is an alertdialog generated after a single machine, but the defaultringtonepreference does not see any information to construct the dialog. Apparently, the code of ringtonepreference is built on the father's end:Public class ringtonepreference extends preference implements preferencemanager. onactivityresultlistener {Private Static final string tag = "ringtonepreference ";Private int mri
mobiledatastatetracker. java.
4. mobiledatastatetracker. Java (/frameworks/base/CORE/Java/Android/NET/mobiledatastatetracker. Java)
This class includes multiple data connections, including MMS, supl, dun, etc,
The Calling process in mobiledatastatetracker. Java is as follows:
mPhoneService = ITelephony.Stub.asInterface(ServiceManager.getService("phone"));......Reconnect-> mphoneservice. enableapntype (apnt
starts the zygote service process, which is exactly like its name: incubator, which is the incubator for all Android applications.
Let's take a look at the app_process code:
Frameworks/base/cmds/app_process/app_main.cpp
The main () function has the following code:
If (0 = strcmp ("-- zygote", arg )){
Bool startSystemServer = (I
Strcmp (argv [I], "-- start-system-server") = 0: false;
SetArgv0 (argv0, "zyg
Android Application (APK) Compilation and packaging process, androidapkFlowchart: What do we focus on? (1) What is input in this process? (2) What is the output of this process? (3) what tools are used in this process? As for the parameters used, you can view the help files
Develop the Hal layer in android2.3.1. First, refer to the online Hello demo. First, check the location of the Hal layer in the Android system:
The hardware driver can be seen as in the keinel layer. Hal encapsulates the hardware driver and then encapsulates the JNI interface before calling the Java application.
The specific process of Hal interface encapsulation is as follows:
1) Add the hello. h header
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.