Android是什么?

来源:互联网 发布:淘宝五金冠店铺 编辑:程序博客网 时间:2024/05/16 13:40

译文

Android是什么?

Android 是一个移动设备上的软件栈,包括操作系统、中间件和关键应用。Android SDK 提供了在Android平台上使用Java程序语言开发应用所必须的工具包和API接口集。

 

特点

Ø  应用程序框架             重用和替换的组件

Ø  Dalvik 虚拟机            针对移动设备进行优化

Ø  集成浏览器                基于WebKit开源引擎

Ø  优化的图形显示         定制的2D图形库;基于OpenGLES 1.0规范的3D图形(可选的硬件加速)为基础

Ø  SQLite                        存储结构化数据

Ø  多媒体支持                通用的音频和视频,静态图像格式(MPEG4, H.264, MP3, AAC,AMR, JPG, PNG, GIF)

Ø  GSM电话                   (硬件依赖)

Ø  蓝牙 EDGE 3G WiFi  (硬件依赖)

Ø  照相机 GPS 指南针  速度感应装置 (硬件依赖)

Ø  丰富的开发环境      包括设备虚拟器,调试工具包,内存和性能分析, Eclipse开发环境插件

 

Android架构

Android操作系统的主要组件如下图所示。每个部分在下面详细描述。



应用 Applications

Android具备一套核心应用包括:邮件客户端,短信,日历,地图,浏览器,通讯录和其他一些应用。所有的应用都是使用Java程序语言编写。

 

应用框架ApplicationFramework

通过提供一个开放的开发平台,Android让开发人员有能力建立丰富多彩的应用。开发人员可以自由的使用硬件设备的优势,访问本地信息,执行后台服务,设置闹钟,添加状态栏提醒,并且还有更多,更多的功能。

开发人员和核心应用一样具有完全访问框架API集的权限。应用架构的设计旨在为了简化组件的重用;任何应用都可以发布它们的功能,任何其他启用都有可能使用到这些功能(遵守框架提供的安全约束)。该机制允许用户自由的替换组件。

所有应用都是基于一套服务和系统,包括:

Ø  丰富和可扩展的Views      应用程序中会使用到这些View,包括:列表、网格、文本框、按钮和嵌入式web浏览器

Ø  内容提供模块                   使应用程序可以访问其他应用的数据(比如通讯录),或者共享自己的数据

Ø  资源管理器                      提供对非代码资源的访问,比如本地字符串,图形和布局文件

Ø  通知管理器                      使所有的应用程序可以在状态栏上自定义提醒

Ø  活动管理器                        管理应用程序的生命周期和提供一个公共的后台导航栈

有关详细信息和创建示例程序,参见NotepadTutorial(http://developer.android.com/resources/tutorials/notepad/index.html)

 

库文件

Android包含一套C/C++库,被Android系统的各个组件所使用。这些功能通过Android应用框架开放给开发人员。以下是一些核心库:

Ø  系统C库    继承于BSD的标准C系统库(libc),为基于Linux的嵌入式设备进行过调整

Ø  多媒体库    基于PacketVideo的OpenCORE;支持很多流行音频和视频的播放和录制,以及静态图像文件,包括MPEG4、H.264、MP3、AAC、AMR,、JPG、PNG

Ø 显示管理    管理显示子系统的访问和无缝处理多个应用程序的二维和三维图层

Ø LibWebCore 一个现代的web浏览器引擎,支持Android浏览器和嵌入式Web视图

Ø SGL        底层的2D图形引擎

Ø 3D库      基于OpenGL ES 1.0 APIs实现;这些库使用3D硬件加速(如果可用)或自带的高度优化的3D软件光栅化

Ø FreeType    渲染位图和矢量字体

Ø  SQLite      提供给所有应用程序一个强大的和轻量级的关系数据库引擎

 

Android运行时

Android包含一套核心库,提供了Java核心库的大部分功能。

每一个Android应用程序以独享进程运行,并且独享一个Dalvik虚拟机的实例。Dalvik能使设备高效的运行多个虚拟机。Dalvik虚拟机执行文件的格式是(.dex),为最小内存使用而优化过。虚拟机是基于寄存器的,并且运行那些Java编程语言所编译的类,这些类被内置的dx工具转换为.dex格式。

Dalvik虚拟机依赖Linux内核来提供底层的功能,比如线程和低级内存管理。

 

Linux内核

Android依赖Linux 2.6来提供核心系统服务,比如安全、存储管理、进程管理、网络栈和驱动模型。该内核同时扮演着介于硬件和软件栈的其余部分之间的一个抽象层。


原文地址: http://developer.android.com/guide/basics/what-is-android.html

What is Android?

Android is a software 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 replacement 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 structured 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 including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the 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 System Architecture

Applications

Android 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 Framework

By providing an open development platform, Android offers developers the ability to build 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 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
  • 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
  • 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.

Libraries

Android includes a set of C/C++ libraries used by various components of the Android system. 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 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
  • Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D graphic layers from multiple 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 the 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 Runtime

Android includes a set of core libraries that provides most of the functionality 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 (.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 Kernel

Android 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.




原创粉丝点击