What is Android?

Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Android是一个包括了操作系统,中间件有关键应用的移动设备软件集.

The Android SDK provides the tools and APIs necessary to begin developing applications on the Android platform using the Java programming language.

Android SDK 提供了在Android平台使用java语言开发应用所必须的工具和APIs

Features特点
  • Application framework应用框架 enabling reuse and replacement of components 允许组件重用和替换
  • Dalvik virtual machine Dalvik 虚拟机 optimized for mobile devices 为移动设备进行了优化
  • Integrated browser 集成的浏览器based on the open source WebKit engine 基于开方源码的WebKit引擎
  • Optimized graphics优化的图形 powered by a custom 2D graphics library; 2D图形库 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional) 基于OpenGL ES 1.0 规范的3D图形(硬件加速可选)
  • SQLite for structured data storage 结构数据存储
  • Media support多毁体支持 for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF) 用于audio,video,和及图像格式(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  • GSM Telephony GSM电话技术 (hardware dependent) 依赖硬件
  • Bluetooth, EDGE, 3G, and WiFi蓝牙,EDGE,3G,及WiFi (hardware dependent) 依赖硬件 EDGE(Enhanced Data Rate for GSM Evolution 的缩写,即增强型数据速率GSM演进技术。EDGE是一种从GSM到3G的过渡技术)
  • Camera, GPS, compass, and accelerometer 照相,GPS,compass(指南针)(accelerometer )重力加速度传感器(hardware dependent) 依赖硬件
  • Rich development environment丰富的开发环境 including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE 包括硬件模拟器,调试工具,内存和性能分析,及一个Eclipse IDE插件.
Android Architecture架构

The following diagram shows the major components of the Android operating system. Each section is described in more detail below.下面这个图展示了Android操作系统的主要组件。每一个部分在后面都有详细的描述

what is Android?_Android

Applications应用

Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. Android将装载一套核心应用,包括email客户端,SMS(发短信)程序,日历,地图,浏览器,(contacts)联系人等等.

All applications are written using the Java programming language.所有的应用都用Java语言编写

Application Framework应用框架

By providing an open development platform, Android offers developers the ability to build extremely rich and innovative applications. 通过提供一个开放的开发平台,Android让开发者具备开发极为丰富有创意的应用程序的能力.

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 the 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 to security constraints enforced by the framework). This same mechanism 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
  • 一个丰富的可扩展的Views集,用来创建包括列表,网格,文本合,按钮,甚至是嵌入的网络浏览器的应用.
  • Content Providers that 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 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.更多详细及应用的全过程,请看Notepad Tutorial

Libraries库

Android includes a set of C/C++ libraries used by various components of the Android system. Android包括一套Android系统各种组件用到的C/C++库

These capabilities are exposed to developers through the Android application framework. Android应用框架向开发者展示了这些功能

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
  • 系统C库--一个从标准C库中实现的BSD-衍生库.专为基于linux的嵌入式设备进行了调整.
  • Media Libraries - based on PacketVideo's 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
  • 多媒体库----基于PacketVideo's  OpenCORE(轻便的视频开放核);这些库支持回放及录制多种流行的音视频格式和静态图像文件;包括了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 multiple applications
  • 表面管理器---管理访问显示子系统,并无缝合成来自多应用的2D和3D图层
  • LibWebCore - a modern web browser engine which powers both the Android browser and an embeddable web view
  • 网络核库--一个现代化的网络浏览器引擎,它全力支持Android浏览器及一个可嵌入的Web view.
  • SGL - the underlying 2D graphics engine
  • SGL --2D图形的引擎
  • 3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D acceleration (where available) or the included, highly optimized 3D software rasterizer
  • 3D库--一个基于OpenGL ES 1.0 APIs实现,这些库既可使用硬件3D加速(可用)或者也可用它包括的高优化的3D软件渲染器(rasterizer)
  • FreeType - bitmap and vector font rendering FreeType--位图和向量字体渲染引擎
  • SQLite - a powerful and lightweight relational database engine available to all applications SQLite --一个强大的,轻量级的关系数据库引擎,可用于所有的应用
Android Runtime Anroid运行时

Android includes a set of core libraries that provides most of the functionality available in the core libraries of the Java programming language.

Android包含了一套核心库,用Java语言编写的核心库中包括了大多数可用的函数功能

Every Android application runs in its own process, with its own instance of the Dalvik virtual machine. 每个一Android应用,运行在它自己的进程中,捅有自己的Dalvik虚拟机实例

Dalvik has been written so that a device can run multiple VMs efficiently. 为了一个设备能高效的运行多个VMs,Dalvik已被重写。

The Dalvik VM executes files in the Dalvik Executable (.dex) format which is optimized for minimal memory footprint. Dalvik执行.dex格式的Dalvik可执行文件,这种格式专为最小内优化

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.

VM是基于注册的,并且运行由Java语言编译器编译的类,再经dx工具转换成.dex格式的(文件)

The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.

Dalvik VM依赖于linux内核低层功能,比如线程和低级内存管理。

Linux Kernel  Linux内核 Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model. Android依赖linux 2.6版本的核心系统服务,比如安全机制,内存管理,进程管理,网络堆,和驱动模型. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.内核也扮演着其他软件堆与硬件之间的抽象层角色