This series is read "Pro Android4" Reading notes, also includes the collation of web reading materials, as well as personal experience.
Because smartphones are introduced into APS (application processors), Android is, in a sense, a personal computer with a full architecture of desktop computers, using linux-based OS stacks to manage devices, memory, and processes. Android's Java library covers many aspects of telephony, video, connectivity, graphics, UI programming, and more. The Android SDK supports almost all J2SE, removing the AWT and swing parts of the UI and replacing it with the Android UI framework.
Android optimizes Dalvik VMs for limited memory, processor speed, and battery power for handheld devices. The Dalvik VM encapsulates the generated Java CALSS file into one or more Dalvik execution files (. dex). The code that eventually executes on Android is not Java Byte code, but the. dex file. That is, you cannot run Java Byte code directly, you need to switch to a. dex file.
App Developer's Android architecture view
See the Android software stack from the app developer's perspective.
Linuxkernel handles device drivers, resource access, power management, and other OS work. (Wei: I don't think this is accurate because Android has changed, especially Hal, and the Linux community has not accepted Android's contributions.) )
On top of the kernel are C/s + + libraries, such as opengl,webkit,freetype (font processing), Ssl,libc,sqlit, Meida. Bionic is an Android BSD-based GLIBC, with an improved libc version of the embedded system, about half the size of the original. The Media Library is a packetvideo-based Opencore for recording and playing audio and video formats. The surface Manager handles the system display and supports 2D and 3D. Android uses Skia as a 2D graphics library, using OpenGL ES to support the.
The vast majority of application frameworks use DALVIKVM to access core libraries. Dalvik VMS Run multiple VM instances. When Java Apps access the core library, each app gets its own VM instance. (Wiki:dalvik virtual machines can have multiple instances, each Android application is executed with a self-owned Dalvik virtual machine, allowing the system to be optimized when executing the program.) Dalvik virtual machine does not execute Java bytecode, but instead executes a file called. dex format)
The Android Java library is the application framework layer in the Android Standard architecture diagram, including telephony, resources, location, UI, content provider, and package manager. Developers are developing applications on these APIs. Some applications have been integrated into the system, such as home, contacts, phones, and browsers.
Developing apps with the Android SDK
Android Simulator. Android Simulator can support 90% application development, but there are limitations on USB connection, photography and video capture, battery emulation, Bluetooth, headset, WI-FI,NFC and OpenGL es. Using Qemu, Android is an open source "processor simulator" that allows an OS emulator to run on another OS. (Wei:meego Simulator is also using QEMU, in addition to KVM, the biggest problem is that KVM virtualization requires hardware support, that is, the CPU must support VT, but not all desktop CPU can support, special portable CPU)
Android UI. the Android UI can be used to customize the window of the UI application with an XML script file, with the ID to get control in the Java code. The screen or window is called activity in Android. View is an Android-based UI unit that can be combined into view group. The view internally uses cavase,painting and user interaction for these familiar concepts. The introduction of the new UI concept fragment in Android 3.0 is designed to handle multiple panes on a large screen (flat panel), while fragment provides the abstraction of the panes. A key concept of the Android framework is the life cycle management of the Activity window.
The underlying component. the Android UI framework introduces the new concept intent. Intent is a mechanism for in-process and inter-process wake-up components. A component is a piece of code with a definite life cycle, such as activity, service, receiver, which is evoked by events, all components. To tune up a component, intent has a window message, action, publish and Order mode, and interprocess communication.
Android is intuitive for resource support and supports string,bitmaps and Xml-basedview definitions. Automatically generated file R.java is a description of the resource, each automatically generated ID corresponds to an element in an XML file or an entire XML file. These are the XML definitions that developers can use with these IDs. This is useful for dealing with native locales, device sizing, and so on.
Another new concept is content provider, the abstraction of a data source.
Advanced UI Concepts. Android introduces a lot of advanced UI concepts. This includes using XML to describe layout and menu, asynchronous dialog (note, not modal dialog, which is not the way MFC synchronizes in Windows), support for animations, including frame-by-frame animations, transitions of visual transformations (zoom in, zoom out, Displacement, rotation, angle). Android supports 3D graphics through OpenGL es. OpenGL es is the C library, and Android inherits the API defined for open es in J2ME, which can be referenced in Proandroid 3.
In terms of Homeui. Android supports live Floder (a small application layer plugin. It manifests itself as the icon that appears on the desktop, and by clicking on these icons a list box will appear with the data information displayed in the list box. Active Directory enables you to view data information in the desktop without opening the application. [1]). But with the support of the Home screen widget, Livefloder is becoming more and more useful. Android also offers integrated search, which can search for device and network information and provide SEARCHAPI.
There are also custom gestures, sensor controls, and dynamic configurations (such as typography based on the screen), Actionbar,drag-and-drop (available in Android 4.0 for phone and pad).
Some of the above-mentioned metropolis are described in detail later in the section "Pro Android 4".
other. There are also service components, media components, and telephony components that can be read in detail in the Android SDK reference for the package. Android uses the application's Androidmanifest.xml file to embody these concepts, including the definition of activities, the registration of service and ContentProvider, the license statement, and so on.
Currently, Andriod has more than 50 packages and thousands of classes. In addition to andriod.*, including java.*,javax.*, as well as others, such as Org.apache.http,org.json, Org.w3c.com,org.xml.sax, Org.xml.sax.ext, Org.xml.sax.helpers, Org.xmlpull.v1, and ORG.XMLPULL.V1.SAX2 start with the namespace package.
Benefit from Android Open source code
Android source code tutorial in http://source.android.com. Git is in https://android.googlesource.com/, but currently does not support online reading and must git down. Online reading is available at http://www.oschina.net/code/explore/android-4.0.1. Or more complete, easier to read, and accessible to http://www.grepcode.com/search/?query=google+android&entity=project.
RELATED Links: My Android development related articles
turn from http://blog.csdn.net/flowingflying/article/details/9020783
"Turn" Pro Android Learning Note (a): Android platform 2013.6.4