Android's four-tier architecture is Linux2.6 kernel layer, core library layer, application framework layer, Application layer, respectively. The framework layer provides us with a number of APIs to develop our applications to meet our business needs. (Android is based on the Linux kernel and therefore belongs to the soft real-time operating system)
We can say that the framework layer is really a layer of Java language implementation, and the APIs defined in this layer are written in the Java language . But because it contains the Jni method,jni writes the interface in C/s + + , and invokes the underlying method in the core library layer based on the function table query, ultimately accessing the Linux kernel. Then there are 2 functions of the framework layer.
- In the Java language to write some standardized modules packaged into a framework for the application layer call to develop a special business of mobile phone applications.
- Using Java Native interface to invoke the local method of the core Lib layer, the JNI library is loaded when the Dalvik virtual machine is started, Dalvik will directly address the JNI method and then go to invoke.
6.3 Android Framework