Android Learning Method 1: What is Android 2: Build a development environment 3: Read SDK Documentation 4: background Knowledge 1, Java 2, object-oriented 3, design pattern 4, J2EE, Brew, and Symbian first talk about What Android is; 1. Android is a Linux-based free and open-source operating system. It is mainly used for portable devices, such as smartphones and tablets. It includes an operating system, middleware, and some important applications. The Beta version of Android SDK provides essential tools and APIs for Android Application Development Using Java on the Android platform. 2. Features • Application Framework supports Component Reuse and replacement • Dalvik D alvik Virtual Machine optimized for mobile devices • integrated browser based on open source WebKit engine • optimized graphics library including custom 2D graphics library, 3D graphics library based on OpenGL ES 1.0 (optional for hardware acceleration) • SQLite is used for structured data storage • multimedia support includes common audio, video, and static image formats (such as MPEG4, H. 264, MP3, AAC, AMR, JPG, PNG, GIF) • GSM telephone technology (hardware-dependent) • Bluetooth, EDGE, EDGE, 3G, 3G, and WiFi W iFi (hardware-dependent) • Camera, GPS, compass, and accelerometer (accelerometer) (Dependent on hardware) • Rich development environments include device simulators, debugging tools, memory and performance analysis charts, and integrated development environment plug-ins with Eclipse. 3. The Android Application is released together with a series of core application packages, including the email client, SMS Short Message program, calendar, MAP, browser, and contact management program. All applications are written in JAVA. 4. Application Framework developers can also fully access the API framework used by core applications. The architecture design of this application simplifies Component reuse; any application can publish its functional blocks, and any other application can use the released functional blocks (but the security restrictions of the framework must be followed ). Similarly, this application reuse mechanism allows you to easily replace program components. A series of services and systems are hidden behind each application, including: • Rich and scalable Views (Views), which can be used to build applications, it includes lists, grids, text boxes, buttons, and even embedded web browsers. • Content Providers allow applications to access data from another application (such as a contact database) or share their own data • Resource Manager) provides access to non-code resources, such as local strings, graphics, and layoutfiles ). • Notification Manager allows applications to display custom prompts in the status bar. • Activity Manager is used to manage application lifecycles and provides common navigation rollback functions. 5. The library Android contains some C/C ++ libraries which can be used by different components in the Android system. They provide services to developers through the Android Application Framework. The following are some core libraries: • system C library-a standard C system function library (libc) inherited from BSD, which is specially tailored for embedded linux-based devices. • Media repository-Based on PacketVideo OpenCORE, which supports multiple common audio and video formats for playback and recording, and static image files. The encoding formats include MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. • Surface SurfaceManager Manager M anager-manages display subsystems and provides seamless integration of 2D and 3D layers for multiple applications. • LibWebCore-a new web browser engine that supports Android browsers and an embedded web View. • SGL-underlying 2D graphics engine • 3 Dlibraries libraries-implemented based on OpenGL ES 1.0APIs; this library can use hardware 3D acceleration (if available) or highly optimized 3D soft acceleration. • FreeType-bitmap and vector font display. • SQLite-a lightweight relational database engine available for all applications with powerful functionality. 6. the Android Runtime Library Android contains a core library which provides most of the functions of the core library of the JAVA programming language. Every Android application runs in its own process and has an independent Dalvik Virtual Machine instance. Dalvik is designed as a device to efficiently run multiple virtual systems at the same time. Dalvik executable files executed by the Dalvik Virtual Machine (. dex), which are optimized for small memory usage. At the same time, the virtual machine is register-based. All classes are compiled by the JAVA compiler, and then converted to the. dex format using the "dx" tool in the SDK is executed by the virtual machine. The Dalvik virtual machine depends on some features of the Linux kernel, such as the thread mechanism and the underlying memory management mechanism. 7. Linux kernel Android core system services depend on the Linux 2.6 kernel, such as security, memory management, process management, network protocol stack and driver model. The Linux kernel is also an abstraction layer between hardware and software stacks. 8. Android system architecture 8.1 and Android kernel Linux kernel version 2.6 are the core services at the abstraction layer between hardware and software heap: security mechanism, memory management, process management, network, and hardware driver. Android relies on Linux kernel 2.6 to provide core services, such as security, memory management, process management, network, and hardware drivers. Here, the Linux kernel acts as an abstract layer between the hardware layer and other layers of the system. This operating system is not like GNU/Linux, because its system library, system initialization and programming interfaces are different from standard Linux systems. According to Google's current release Linux system, there is no virtual memory file system. The system uses the yaffs2 file system, and the specific images are also located in the SDK installation directory. Through the emulator-console Command, we can get a simple shell that can control Android under host interruption. This system contains a Toolbox and provides some basic command tools, concentrated in/sbin,/system/sbin,/system/bin, but very simple, there are few command types. Currently, the Android program installation mode is automatically implemented by Eclipse. The underlying analysis shows that, the general step is to store the android underlying layer and common kernel under/data/app and data/data. We can use it as a Linux for development and hacking. 8.2. Lib and runtime environment lib C/C ++ libraries: these libraries are used by various Android components and can be used by application framework developers. Their functions include: Media Library: MPEG4 H. 264 MP3 jpg png ..... webKit/LibWebCore: Web browser engine SQLite Relational Database Engine 2D, 3D graphics library, rich engine class libraries support: 2D and 3D image libraries OpenGL ES, database SQLite, object database db4o class library, media library, and C library based on the underlying Linux system make application development simpler and more diverse. Google uses Apache's Harmony class library, which is faster than Sun's VM in some aspects. Runtime is on the Dalvik Java VM. Dalvik runs in a concise and efficient byte code format. It can execute multiple applications in parallel with low resource consumption and no mutual interference between applications. The Java function provided by the runtime environment core library Dalvik virtual machine depends on the Linux kernel. For example, a thread or underlying memory management device can run multiple Dalvik virtual machines, each Android Application runs the Dalvik executable file (. dex) Dx-tool converts compiled Java files to dex file 8.3 applications and framework core applications, such as contacts, emails, phones, browsers, calendars, maps ,... fully access all core application framework APIs, simplify Component reuse, and write applications in Java