1. 程式人生 > 其它 >what is Android?

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作業系統的主要元件。每一個部分在後面都有詳細的描述
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.核心也扮演著其他軟體堆與硬體之間的抽象層角色
注:文章出自https://blog.51cto.com/objectiveman/81093