Android概述外文翻译资料

 2022-07-22 12:07

CHAPTER 1 Android Overview

In this chapter, you will learn how Android came about. Wersquo;ll take a look at its history to help us understand its future. As this mobile environment enters a make-or-break year, we look at the key players in this ecosystem, what motivates them, and what strengths and weaknesses they bring to the table.

By the end of this chapter, you will better understand the ecosystem from a business point of view, which should help clarify the technology choices and how they relate to long-term advantages for various platforms.

Android Overview

Android is a comprehensive open source platform designed for mobile devices. It is championed by Google and owned by Open Handset Alliance. The goal of the alliance is to “accelerate innovation in mobile and offer consumers a richer, less expensive, and better mobile experience.” Android is the vehicle to do so.

As such, Android is revolutionizing the mobile space. For the first time, it is a truly open platform that separates the hardware from the software that runs on it. This allows for a much larger number of devices to run the same applications and creates a much richer ecosystem for developers and consumers.

Letrsquo;s break down some of these buzz words and see whatrsquo;s behind them.

Comprehensive

Android is a comprehensive platform, which means it is a complete software stack for a mobile device.

For developers, Android provides all the tools and frameworks for developing mobile apps quickly and easily. The Android SDK is all you need to start developing for Android; you donrsquo;t even need a physical phone.

For users, Android just works right out of the box. Additionally, users can customize their phone experience substantially.

For manufacturers, it is the complete solution for running their devices. Other than some hardware-specific drivers, Android provides everything else to make their devices work.

Open Source Platform

Android is an open source platform. The entire stack, from low-level Linux modules all the way to native libraries, and from the application framework to complete applications, is totally open.

More so, Android is licensed under business-friendly licenses (Apache/MIT) so that others can freely extend it and use it for variety of purposes. Even some third-party open source libraries that were brought into the Android stack were rewritten under new license terms.

So, as a developer, you have access to the entire platform source code. This allows you to see how the guts of the Android operating system work. As manufacturer, you can easily port Android OS to your specific hardware. You can also add your own proprietary secret sauce, and you do not have to push it back to the development community if you donrsquo;t want to.

Therersquo;s no need to license Android. You can start using it and modifying it today, and there are no strings attached. More so, Android has many hooks at various levels of the platform, allowing anyone to extend it in unforeseen ways.

Designed for Mobile Devices

Android is a purpose-built platform for mobile devices. When designing Android, the team looked at which mobile device constraints likely were not going to change for the foreseeable future. For one, mobile devices are battery powered, and battery performance likely is not going to get much better any time soon. Second, the small size of mobile devices means that they will always be limited in terms of memory and speed.

These constraints were taken into consideration from the get-go and were addressed throughout the platform. The result is an overall better user experience.

Android was designed to run on all sorts of physical devices. Android doesnrsquo;t make any assumptions about a devicersquo;s screen size, resolution, chipset, and so on. Its core is designed to be portable.

History

The history of Android is interesting and offers some perspective on what the future might hold.

These are the key events of the past few years:

  • In 2005, Google buys Android, Inc. The world thinks a “gPhone” is about to come out.
  • Everything goes quiet for a while.
  • In 2007, the Open Handset Alliance is announced. Android is officially open sourced.
  • In 2008, the Android SDK 1.0 is released. The G1 phone, manufactured by HTC and sold by the wireless carrier T-Mobile USA, follows shortly afterward.
  • 2009 sees a proliferation of Android-based devices. New versions of the operating system are released: Cupcake (1.5), Donut (1.6), and Eclair (2.0 and 2.1). More than 20 devices run Android.
  • In 2010, Android is second only to Blackberry as the best-selling smart phone platform. Froyo (Android 2.2) is released and so are more than 60 devices that run it.

In 2005, when Google purchased Android, Inc., the world thought Google was about to enter the smart phone market, and there were widespread speculations about a device called the gPhone.

Googlersquo;s CEO, Eric Schmidt, made it clear right away that Androidrsquo;s ambitions were much larger than a single phone. Instead, they envisioned a platform that would enable many phones and other devices.

Googlersquo;s Motivation

Googlersquo;s motivation for supporting the Android project seems to be having Android everywhere and by doing that, creating a level playing field for mobile devices. Ultimately, Google is a media company, and its business model is based on selling advertising. If everyone is using Android, then Google can provide additional services on top of it and compete fairly. This is unlike the business models of other software vendors who depend on licensing fees.

Although Google does license some proprietary apps, such as Gmail and Maps, and makes some money off the Android market, its primary motivation is still the advertising revenue that those apps bring in.

Open Handset Alliance

lt;

全文共18847字,剩余内容已隐藏,支付完成后下载完整资料


1. Android概述

在本章,我们讲述Android是如何诞生的。当今的移动领域正值群雄争霸的关键时期,Android扮演的角色不容小觑。我们在此简要回顾下它的历史,展望下它的未来,以应对它所带来的机遇与风险。

读过本章,你能以商业的视角对移动领域这一生态圈有更好的认识。我们也需要思考的是,面对诸多平台的更迭,如何选择技术才能获得长线的回报。

1.1. 概述

Android是一个为移动设备设计的开源系统。它由Google主导的开放手持设备联盟(Open Handset Alliance)维护,该组织的口号是:“助力移动设备的变革,以更低廉的价格,为用户提供更强大的功能和更好的体验”,而Android正是其理念的核心。

现在,Android正主导着移动领域的一场革命。这是第一个真正与硬件无关的开放系统,使得同一个应用能够轻松兼容于大量不同的设备之上,为用户和开发者营造一个更富生机的生态圈。

接下来直入主题:

1.1.1. 完整性

Android是一个完整的平台,即为移动设备提供的一套完整的软件架构。

面向开发者,Android提供了一套完整的工具和框架,以简化开发过程、提高开发效率。想要开发Android应用的话,Android SDK就是你所需的一切——甚至不需要一台真正的手机。

面向用户,Android开机即用。而且,用户可以按照自己的喜好做出相当程度的自定义。

面向生产厂商,Android就是令他们的设备跑起来的完整方案。厂商只需要编写自己的硬件驱动即可,而其它一切都有Android代劳。

1.1.2. 开源平台

Android是一个开放源码的平台。它的整个架构,从底层的Linux模块、原生库,到高层的开发框架乃至完整的应用程序,都是完全开放的。

而且,Android选择了对商业行为比较友好的许可证(Apache/MIT),从而允许他人在自由的扩展之余,更可以合法地用作其它用途。为保证整个架构的开放,Android甚至重写了一些三方库,并按照新的许可证重新发布。

因此作为开发者,你有权访问整个平台的所有代码,其运行原理不是秘密;作为生产厂商,你可以轻松把Android OS移植到自己专有的硬件平台之上,也可以保留自己的私传秘方,而不必强制贡献给开发社区。

这一切都不需要Android的授权。你可以随时随地使用它、修改它,而不带任何附加条件。Android还在不同层次上内置了丰富的hooks,在扩展上使人大有可为。

1.1.3. 为移动设备而设计

Android是为移动设备而设计的系统。Android的开发团队在设计时,会对移动设备本身的一些限制做些评估,哪些可以在可见的未来得到改善,而哪些会长期不变。比如移动设备多是使用蓄电池,而电池的续航能力可能在几年内并不能得到多大的改善。再比如,移动设备受其体积所限,它们只能拥有较少的内存,CPU的速度也要打个折扣。

在设计伊始即考虑这些限制,并将其贯彻始终。这对最终用户体验的提升是大有好处的。

支持各种不同的硬件平台也是Android的设计目标之一。Android不对屏幕尺寸、分辨率、芯片或者其它参数做任何假设。可移植性是它的原则。

1.2. 历史

欲对Android的未来有所把握,就不能不对它背后的历史有所了解。如下是过去几年的大事记:

  • 2005年 Google收购Android, Inc.,全世界都以为'gPhone'就快来了... 风平浪静了一段时间。
  • 2007年 开放手持设备联盟(Open Handset Alliance)宣布成立,Android正式踏入开源阵营。
  • 2008年 Android SDK 1.0发布。G1手机随之而来,它由HTC出产,并由无线运营商T-Mobile USA发售。
  • 2009年 基于Android的设备如雨后春笋般出现。Android系统发布了几个新版本:Cupcake(1.5),Donut(1.6),Eclair(2.0及2.1)。 已有超过20款设备运行Android。
  • 2010年 Android成为仅次于黑莓的第二大智能手机平台。Froyo(Android 2.2)发布,已有超过60款设备运行它。

在2005年Google买下Android, Inc.时,这被认为是Google进军智能手机市场的信号,一时间人们纷纷猜测着一款叫做gPhone的设备。

然而Google的首席执行官Eric Schmidt很快就让人们醒悟过来,仅仅一款智能手机是远远不能满足Android野心的:他们要把它做成一个通用的平台,为各种手机和其它设备都提供支持。

1.2.1. Google的动机

Google对Android的支持似乎仅仅是为了推广Android,凭借它的无处不在为自己在移动领域占据一席之地。其实Google是一家传媒公司,其商业模式建基于广告营销,这与传统软件商出售许可证的商业模式有所不同。只要大家使用Android,就可以有Google提供的附加功能,这与第三方是公平竞争的。

虽说Google也保留一些专有应用的许可(比如Gmail和Maps),在Android Market之上也有一定营收,但是Google最看重的还是应用程序带来的广告收益。

1.2.2. 开放手持设备联盟

Android的背后不只是Google,更有开放手持设备联盟(Open Handset Alliance)。它是一个由电信运营商、手机制造商、软件开发商和芯片制造商等等组成的非盈利组织,致力于保持开放以及改进移动设备的用户体验。

这一联盟仍略显年轻,各个成员也正在慢慢摸索合作的方式。目前Android背后的主力仍是Google。

1.3. Android的版本

同任何软件一样,Android也在不断的改进之中,其间的变化就在版本号上得以呈现。但是容易使人迷惑的是,不同版本号之间又是什么关系?在表格里看会更直观些,如下:

表格 1.1. 截至Android 3.0的Android各版本

Android版本号差不多就是标志了它大版本和小版本发布的轨迹,其间以API Level最为重要。版本号的更新有时是为API的改动,有时是为修补bug或者性能优化。

身为应用程序的开发者,你需要明确知道目标平台的API Level,这决定了你的应用能否兼容。

一般来说,你会希望自己的应用能够兼容尽可能多设备,因此应留意Android的版本在诸多现存设备上的分野,选择较低的API Level。图1.1截至2011年1月Android现存版本的分布展示了来自Android Device Dashboard的一段统计信息:

图1.1 截至2011年1月Android现存版本的分布

你可以注意到,使用Android 1.5和1.6的用户已经不是很多,最新版本2.3也还未成气候,不过2.x版本的用户数增长势头良好。1.0和1.1的用户几乎都通过OTA自动升级到了1.5,不过1.5和1.6的用户却因为缺少固件难以升级。很多手机生产商甚至并无推出新固件的计划,因为他们更专注于新机的开发。

对此有所了解之后,你可能会选择1.6或者2.0作为最低的目标平台。确实有必要用到新版本特性的话,则另当别论。

1.4. 总结

Android操作系统在设计伊始,就是作为一个完整的、移动设备之上的开源平台而考虑的。随着巨大的成功,它改变了整个行业的游戏规则。

在下一章,我们将全局地观察整个Android操作系统,了解它是如何将其各部分巧妙地合为一体的。

2. Android的架构

我们将从9000英尺的高空俯瞰Android平台。你的目标可能仅仅是想学习Android应用程序的编写方法,但对Android的架构有所理解是绝对没有坏处的。在学习中了解到它的长处和不足,在实际的开发中才能做到扬长避短、事半功倍。

读过本章,你将能够对Android整个系统的工作方式有个大体的了解。

2.1. 概述

Android 系统就像一个多层的蛋糕。每一层都有自己的特性和用途,不过这些层之间并没有一个明确的界限,而通常是相互渗透的。

在你阅读本章时,要注意本章仅仅是整个系统的概览,至于各部分的细节,我们将在后面讨论。图2.1Android架构展示了Android 系统架构的各部分。

图 2.1. Android架构

2.2. Linux 系统

Android 是基于Linux 系统构建的。Linux 是一个伟大的操作系统,也是一个经典的开源项目。选择 Linux 作为Android系统基础的原因有很多,而最主要的因素,在于它的可移植性、安全性以及丰富的特性。

2.2.1. 可移植性

Linux可以轻松地移植到各种不同的硬件平台上。有了Linux做硬件抽象层,Android就不必为不同硬件的兼容性而劳心。Linux 的绝大多数底层代码都是用可移植的C代码编写,因此第三方开发者可以将 Android 移植到很多不同的设备上。

2.2.2. 安全性

Linux 已经在一些苛刻的环境下使用和测试了数十年,被证明是一个非常安全的系统。Android 依赖 Linux 实现其安全特性。 所有的 Android 应用都在独立的 Linux 进程中执行,可以直接应用Linux进程的权限机制。由此,Android得以将大部分安全措施交由底层的Linux实现。

2.2.3. 丰富的特性

Linux 系统本身就具有很多实用的特性。Android 从中受益良多,例如内存管理、电源管理和网络部分。

2.3. 本地库

来自开源社区的 C/C 本地库为 Android 应用层提供了很多必需的服务。它们包括:

  • Web Kit: 一个高速的Web渲染引擎,这个引擎已经被Safari,Chrome 和很多其他的浏览器所使用。
  • SQLite: 一个全功能的 SQL 数据库
  • Apache Harmony: 开源的Java实现
  • OpenGL: 3D 图像渲染库
  • OpenSSL: 安全套接字层

这些库中的大部分都是被原封不动地拿过来的,但是 Bionic 是一个例外。 Bionic 基本上是 C 标准库的重写版。 使用 Bionic 的原因有如下两条:

  • 技术方面: 专为电量有限的设备进行优化。
  • 许可证方面: 对他人的使用和修改是许可证友好的。

2.4. Dalvik 虚拟机

Dalvik 是一个专为 Android 设计的虚拟机。它由 Dan Bornstein 和他在 Google 的团队开发。

传统的Java虚拟机(JVM)是为了适应各种不同环境而设计的,强调泛用性。但Dalvik的开发团队认为专注于一个方面,可以得到更好的设计。因此他们研究了长期限制移动设备性能的制约因素,比如电池的续航能力和处理器的速度。而后针对这些因素对症下药,专门设计了Dalvik。

使用Dalvik VM代替传统Java VM的另一个好处在于许可证。Java语言、Java开发工具以及Java类库都是自由的,但当时的Java VM不是。现在已经有了许多开源的 JVM 替代品,比如Open JDK和Apache Harmony等等。

Android作为一个全功能的开发平台,一个真正开源且许可证友好的虚拟机不可或缺。它鼓励人们移植到不同平台,而不用担心许可证问题。

2.5. Android和Java

在Java中,你使用Java编译器将自己编写的Java源文件编译成Java字节码,然后在Java虚拟机上运行此字节码。在Android中,情况就不同了。编写Java源文件的还是你的,你仍然使用相同的Java编译器把源文件编译成Java字节码,但在这一时刻,你使用Dalvik编译器再次将它重新编译成Dalvik字节码。随后在Dalvik虚拟机上执行的正是这种Dalvik字节码。图2-2显示了标准的Java(左)与Android系统使用的Dalvik(右)之间的比较。

图 2.2.Java与Dalvik的对比

你可能会奇怪,为什么不直接从Java源代码编译成Dalvik字节码呢?采取额外的步骤有几个很好的理由。早在2005年,当Dalvik的工作开始时,Java语言正在经历频繁的变化,但Java字节码或多或少是一成不变的。因此Android团队选择了让Dalvik立足于Java字节码,而不是Java源代码。

这方面的一个副作用是你可以采用编译成Java字节

全文共7034字,剩余内容已隐藏,支付完成后下载完整资料


资料编号:[145900],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。