Android基礎:什麼是Android?

來源:互聯網
上載者:User

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.

Android是針對行動裝置的一個軟體棧,android包括一個作業系統,一個中介軟體以及一系列關鍵的應用。Android SDK提供了用Java程式設計語言在android平台上開發應用所需的工具和API。

Features 特性
  • Application framework enabling reuse and replacement of components
    應用程式框架:使能重用和可替換的組件
  • Dalvik virtual machine optimized for mobile devices
    Dalvik虛擬機器:為行動裝置而最佳化
  • Integrated browser based on the open source WebKit engine
    整合瀏覽器:基於開源的WebKit引擎。
  • Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
    最佳化的圖形:自訂的2D圖形庫;基於OpenGL ES 1.0規範的3D圖形(可選的硬體加速)
  • SQLite for structured data storage
    SQLite:結構化的資料存放區
  • Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
    媒體支援:通用音頻、視頻,還有映像格式(MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
  • GSM Telephony (hardware dependent)
    GSM電話:(依賴硬體)
  • Bluetooth, EDGE, 3G, and WiFi (hardware dependent)
  • Camera, GPS, compass, and accelerometer (hardware dependent)
    照相機,GPS,指南針和加速度計:(依賴硬體)
  • 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

Android架構

The following diagram shows the major components of the Android operating system. Each section is described in more detail below.
展示了Android作業系統的主要組件。每個組件在下面有更詳細的描述。

================================================

應用程式

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.
Android內有一系列的核心應用,包括email用戶端,SMS程式,日曆,地圖,瀏覽器,電話本及其他。所有的應用都是用Java程式設計語言寫的。

================================================

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.
通過提供一個開放的開發平台,Android提供給開發人員建立極其豐富和創新應用的能力。開發人員自由地享有硬體裝置的優勢,訪問本地資訊,運行後台服務,設定警示,向狀態列添加通知,還有更多……

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.
開發人員能完全訪問與核心應用所用的同一個架構APIs。應用架構被設計得能夠簡化組件的重用;任何應用都發行就緒其功能,而其他的應用也就可以使用這些功能(安全限制主題由架構增強)。同樣的機制允許使用者替換組件。

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,可用於建立應用;包括:lists,grids,text boxs, buttons,以及一個嵌入式的web瀏覽器。
  • 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
    Active Manager,管理應用的生命週期,並提供了一個通用的導航後台。

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:
Android包括了一個c/c++庫的集合,她們被Android系統的眾多組件所使用。通過Android的應用程式框架,這些功能被開放給開發人員。其中的一些核心庫如下:

  • System C library - a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices
    系統C庫——一個繼承自BSD的標準C系統實現(libc),被調整成面向基於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
    LibWebCore——一個流行的web瀏覽器引擎,她同時支援Android瀏覽器和嵌入式的web視圖。
  • 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 libraries——基於OpenGL ES 1.0 APIs的一個實現;該庫或是使用硬體的3D加速,或是使用內建的高度最佳化的3D軟體光柵。
  • FreeType - bitmap and vector font rendering
    FreeType —— 位元影像和向量字型渲染
  • SQLite - a powerful and lightweight relational database engine available to all applications
    SQLite —— 一個強大而輕量的關聯式資料庫引擎,對所有應用可用。

===============================================

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.
Android包括一個核心庫的集合,她們提供了Java程式設計語言的核心庫中的絕大多數功能。

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.
每一個Android應用都在她自己的進程中運行,該進程也屬於某個Dalvik虛擬機器的執行個體。Dalvik被設計成能讓裝置高效地運行多個虛擬機器。Dalvik虛擬機器執行的是.dex結尾的Dalvik可執行檔格式,該格式被最佳化為最小記憶體使用量。虛擬機器是基於寄存器的,並且運行那些Java程式設計語言所編譯的類,這些類被內建的dx工具轉換為.dex格式。

The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.
Dalvik虛擬機器依賴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. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.
Android依賴Linux 2.6來提供核心系統服務,比如安全、儲存管理、進程管理、網路棧和驅動模型。該核心同時扮演著介於硬體和軟體棧的其餘部分之間的一個抽象層。

(下集預告:架構論題:應用基礎)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.