1、 What is AndroidWhat is Android作者:岗版本:1.0版本历史: 2011.07.15 1.0 创建文档What is Android目录 编写目的 .3 定义 .3 参考资料 .31 Android 是什么(翻译版) 41.1 特性(Features ): .41.2 架构(Architecture) .41.3 应用程序(Applications) .51.4 应用程序框架(Application Framework) .51.5 库( Library) .61.6 Android Runtime.61.7 Linux 内核( Linux Kernel) 62
2、What is Android (原文) .7Features 7Android Architecture.7Applications.8Application Framework.8Libraries9Android Runtime 9Linux Kernel.10What is Android引言 编写目的本文档是 android 官方文档What is Android的中文翻译版。 定义详见正文 参考资料android 官方文档What is Android1 Android 是什么(翻译版)Android 是一个适用于移动设备的软件栈,包括操作系统,中间件和核心应用程序。Android
3、 SDK 提供了在 Android 平台上用 Java 编程语言开发应用程序所必需的工具和 API。1.1 特性(Features): 应用程序框架 提供了可重用和可替换的组件; Dalvik 虚拟机 一个专门为移动设备优化的虚拟机; 继承的 web 浏览器 基于开源 WebKit 引擎; 优化过的图形库 包括一个自定义的 2D 图形库以及基于 OpenGL ES 1.0 spec(可使用硬件加速)的 3D 图像库; SQLite 用于结构化地数据存储; 多媒体支持 包括常见的音频、视频和图片格式(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM
4、电话(依赖于硬件) ; 蓝牙,EDGE,3G,和 WiFi(依赖于硬件) ; 照相,GPS,指南针,加速器(依赖于硬件) ; 丰富的开发环境 包括一个设备模拟器,多个用于调试、检测内存和性能的工具,以及一个Eclipse 插件; 1.2 架构(Architecture )下图显示了 android 操作系统的主要组件,下面的小节将会详细说明每一个组成部分。What is Android图 1-1 android 系统的架构图1.3 应用程序(Applications)android 系统本身搭载了一系列的核心应用程序,包括邮件客户端,短信应用,日历,地图,浏览器,联系人等。所有这些应用都是用
5、Java 程序语言编写的。1.4 应用程序框架(Application Framework)通过提供一个开放的开发平台,android 使得开发者能够构建极其丰富的、创新的应用程序。开发者可以自由的发挥硬件设备的能力,访问位置信息,运行后台服务,设置闹钟(警报?set alarms) ,向状态栏添加提醒消息,等等。开发者可以使用核心应用程序用到的所有框架 API。android 系统架构的设计使得组件的重用变得很简单,任何应用可以公开自己,从而使得其他的应用能够复用这些应用的功能(框架会对此施加一定的安全限制) 。同样,该机制可以使得用户更换某些组件,以实现相同的功能或者更强的功能。实际上,所
6、有的应用程序都是一组服务(Services)和系统( systems)的集合。包括: 一组丰富的可扩展的视图(View)集合: 这些视图用来搭建一个应用,包括 list, grids, text boxes, buttons , 甚至是内嵌的网页浏览器; Content Provider(内容提供者):能够使应用访问其他应用的数据(比如联系人信息) ,或者分享What is Android它们自己的数据供其他应用使用; Resource Manager(资源管理器):提供访问非代码资源的能力,这些资源包括本地化的字符串,图片,以及布局文件等; Notification Manager(通知管理
7、器):使得应用能够在状态栏显示自己的提醒(alert)消息; Activity Manager(活动管理器): 管理着应用程序的生命周期,提供了一个通用的 navigation backstack。 (就是当前活动的 activity 在栈顶,返回时并不退栈,当资源紧张时,按照优先级,系统自动关闭应用,等等) ; 1.5 库( Library)android 包含了一组被 android 系统中各个组件调用的 c/c+库。这些库的功能通过应用程序框架(application framework)提供给开发者使用。这里列出了一些核心的库: C 库:系统 C 语言库,标准 c 语言系统库(libc
8、)的 BSD-delivered 实现,并且针对移动设备做了调整; 多媒体库:基于 PacketVideo 的 OpenCORE,这些库可以支持多种流行的音频和视频格式的播放和录制,同时支持常见的静态图片文件,包括 MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG 格式; Surface Manager:提供对显示子系统的访问,以及对 2D 和 3D 应用的无缝支持; LibWebCore 库:一个现代的 web 浏览器引擎,包括 android 浏览器和可嵌入的 web 浏览视图(web view); SGL 库: 2D 图像引擎; 3D library:O
9、penGL ES 1.0 APIs 的一个实现,这个库使用 3D 加速(硬件允许的话)或者采用高度优化的 3D 软件光栅器(software rasterizer) ; FreeType 库:位图和矢量字库的渲染引擎; SQLite :一个强大而又轻量级的关系型数据库引擎,适用于所有应用程序1.6 Android Runtimeandroid 包含一组核心库用来提供 Java 编程语言的核心库中的绝大部分功能。每一个 android 应用都运行在自己的进程中,并且独自占有 Dalvik 虚拟机的一个实例。一个设备能够同时高效运行多个虚拟机,Dalvik 虚拟机执行 .dex 格式的文件,这种文
10、件被优化过以便使用最少的内存。Dalvik 虚拟机是基于寄存器的,能够运行被 java 编译器编译的类,不过需要先用自带的 dx 工具将其转化成.dex 格式。Dalvik 虚拟机需要依赖于 Linux 内核来实现某些底层功能,譬如线程和内存管理。1.7 Linux 内核( Linux Kernel)android 系统依赖于 Linux 2.6 版本来实现一些核心的系统服务,譬如安全、内存管理、进程管理、网络协议栈以及驱动模型。同时,内核也扮演了底层硬件和软件栈的其余部分之间抽象层的角色。 What is Android2 What is Android (原文)Android is a s
11、oftware stack for mobile devices that includes an operating system, middleware and key applications. The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.Features Application framework enabling reuse and re
12、placement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open source WebKit engine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) SQLite for structure
13、d data storage Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment i
14、ncluding a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE Android ArchitectureThe following diagram shows the major components of the Android operating system. Each section is described in more detail below.What is AndroidApplicationsAndroid
15、will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language.Application FrameworkBy providing an open development platform, Android offers developers the ability to b
16、uild extremely rich and innovative applications. Developers are free to take advantage of the device hardware, access location information, run background services, set alarms, add notifications to the status bar, and much, much more. Developers have full access to the same framework APIs used by th
17、e core applications. The application architecture is designed to simplify the reuse of components; any application can publish its capabilities and any other application may then make use of those capabilities (subject What is Androidto security constraints enforced by the framework). This same mech
18、anism allows components to be replaced by the user.Underlying all applications is a set of services and systems, including: A rich and extensible set of Views that can be used to build an application, including lists, grids, text boxes, buttons, and even an embeddable web browser Content Providers t
19、hat enable applications to access data from other applications (such as Contacts), or to share their own data A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files A Notification Manager that enables all applications to display custom alerts
20、 in the status bar An Activity Manager that manages the lifecycle of applications and provides a common navigation backstack For more details and a walkthrough of an application, see the Notepad Tutorial.LibrariesAndroid includes a set of C/C+ libraries used by various components of the Android syst
21、em. These capabilities are exposed to developers through the Android application framework. Some of the core libraries are listed below: System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries - based on PacketVi
22、deos OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from mu
23、ltiple applications LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view SGL - the underlying 2D graphics engine 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or t
24、he included, highly optimized 3D software rasterizer FreeType - bitmap and vector font rendering SQLite - a powerful and lightweight relational database engine available to all applications Android RuntimeWhat is AndroidAndroid includes a set of core libraries that provides most of the functionality
25、 available in the core libraries of the Java programming language.Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. Dalvik has been written so that a device can run multiple VMs efficiently. The Dalvik VM executes files in the Dalvik Executable (
26、.dex) format which is optimized for minimal memory footprint. The VM is register-based, and runs classes compiled by a Java language compiler that have been transformed into the .dex format by the included “dx“ tool.The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.Linux KernelAndroid relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack