Computing continues to become more “personal,” increasingly accessible anytime,
anywhere. At the forefront of this development are handheld devices that are
transforming into computing platforms.
处理,继续变得更加人性化了,更加容易“随时,随地”。手持设备发展领导潮流,它正在转化成一个处理事物的平台。
Mobile phones are no longer just for talkingthey have been capable of carrying data and video for some time. Significantly, themobile device is becoming so capable of general-purpose(多方面,多功能 ) computing that it’s destinedto become the next PC (Personal Computer). It is also anticipated that even a number oftraditional PC manufacturers such as ASUS, HP, and Dell will be producing devices ofvarious form factors based on the Android OS. The battle lines between operatingsystems, computing platforms, programming languages, and development frameworksare being shifted and reapplied to mobile devices.
移动电话不再仅仅只是打电话了,在很多情况下,它已经有能力去携带一些数据和视频文件。
值得关注的,移动设备已经成为了有能力去多方面的处理,它注定成为下一个“个人电脑”。它也提前被一些PC制造厂商如:ASUS,HP,DELL等,这些制造商们,已经在制造一些基于Android系统的电子设备。这条战线,将在操作系统,处理平台,开发语言,和开发框架的发展之间,这些都将成为再转化和再运用到移动设备。
We are also expecting a surge in mobile programming in the IT industry as more and
more IT applications start to offer mobile counterparts.To help you profit from this trend,we’ll show you how to use Java to write programs for devices that run on Google'sAndroid Platform (http://developer.android.com/index.html), an open source platformfor mobile development. We are excited about Android because it is an advancedplatform that introduces a number of new paradigms in framework design (even with thelimitations of a mobile platform).
我们将期待在IT行业里一大批的移动开发,更多IT应用程序开始邀请移动设备的伙伴。去帮助你从这股热潮中获益,我们将展示给你看如何使用JAVA语言去进行对基于Android平台的设备的代码的编写。(GoogleAndroid开发论坛),对于移动开发方面的一个开源的平台。我们对于Android很兴奋,那是因为它是一个更加超前平台,在框架设计上它包括一些新的范式(对手机平台还是有限制)。
In this chapter, we’ll provide an overview of Android and its SDK, give a brief overview ofkey packages, introduce what we are going to cover in each chapter briefly, show youhow to take advantage of Android source code, and highlight the benefits ofprogramming for the Android Platform.
在这一章节,我们将提供一个Android概况和它的SDK,还会给一个关于重要工具包的简短的概况。我们将会简短的覆盖到第一个章节,给你展示如何去使用Android的源代码,并且会突出一些基于Android平台的程序设计的优势。
A New Platform for a New Personal Computer
做为一个新的个人电脑的全新的平台
The fact that hitherto dedicated devices such as mobile phones can now count
NOTE: Although built for mobile devices, the Android platform exhibits the characteristics of a
full-featured desktop framework. Google makes this framework available to Java programmers
through a Software Development Kit (SDK) called the Android SDK. When you are working with
the Android SDK, you rarely feel that you are writing to a mobile device because you have access
to most of the class libraries that you use on a desktop or a server—including a relational
database.
The Android SDK supports most of the Java Platform, Standard Edition (Java SE) except
for the Abstract Window Toolkit (AWT) and Swing. In place of AWT and Swing, Android
SDK has its own extensive modern UI framework.Because you’re programming yourapplications in Java, you could expect that you need a Java Virtual Machine (JVM) thatis responsible for interpreting the runtime Java byte code. A JVM typically provides thenecessary optimization to help Java reach performance levels comparable to compiledlanguages such as C and C++. Android offers its own optimized JVM to run thecompiled Java class files in order to counter the handheld device limitations such asmemory, processor speed, and power. This virtual machine is called the Dalvik VM,which we’ll explore in a later section “Delving into the Dalvik VM.”
The familiarity and simplicity of the Java programming language coupled with Android’sextensive class library makes Android a compelling platform to write programs for.
这个熟悉又简单的JAVA程序设计语言外加Android的扩展类库,使得Android成为一个更加让人对其激发兴趣去为它而编写程序的平台。
Figure 1–2 provides an overview of the Android software stack. (We’ll provide further
details in the section “Understanding the Android Software Stack.”)
图表1-2提供一个Android软件堆栈概况(我们将在“Understanding the Android Software Stack”这一章节里提供更多更详细介绍)
variety of operating systems such as Symbian OS, Microsoft’s Windows Mobile, MobileLinux, iPhone OS (based on Mac OS X), Moblin (from Intel), and many other proprietaryOSs. So far no single OS has become the de facto standard. The available APIs andenvironments for developing mobile applications are too restrictive and seem to fallbehind when compared to desktop frameworks. This is where Google comes in. TheAndroid platform promised openness, affordability, open source code, and a high-enddevelopment framework.