附录:英文技术资料翻译
外文原文
Android is a Linux-based open source operating system, mainly used in portable devices.Yet
the name of the unified Chinese, mainland China, more people use the \or \caused. Android operating system originally developed by Andy Rubin, primarily support the phone. Capital injection, acquired by Google in 2005 and formed the Open Handset Alliance, the development of improved, gradually extended to the Tablet PC and other areas. Android's main competitor is the Apple iOS and RIM of the Blackberry OS. The first quarter of 2011, Android in the global market share for the first time more than Saipan system ranked first in the world. February 2012 data, Android occupy 52.5% of the global smartphone operating system market share of Chinese market share of 68.4%.
System architecture
The system architecture of Android and other operating systems, using a layered architecture. See from the chart, the android is divided into four layers from top to low-level application layer, application framework layer, the runtime layer and the Linux kernel layer.
Android mobile phone platform based on Linux as the core, with the rapid development of the Android as an open operating system, now allows developers to use a variety of programming languages to develop Android applications, instead of previously only Using Java to develop Android applications a single situation, and thus welcomed by many developers to become the true sense of the open operating system.
In Android, developers can use Java as a programming language to the development of the application also can be by NDK use in C / C + + programming language to the development of applications, also can use SL4A to use other variety of script language programming (eg: for python Lua, tcl, php, etc.), as well as others, such as: Qt (qt for the android) Mono (mono for the android) and other well-known programming framework also began to support the Android programming even through MonoDroid, developers can use C # as a programming language to develop applications. In addition, Google is still 2009 Special released the Simple Language for beginners Android, the language is similar to the Basic language. Web programming languages , JavaScript, ajax, HTML5, jquery, sencha, dojo, mobl, PhoneGap and so have support for Android development.
In terms of the underlying Android system, Android uses the C / C + + as development languages .
Application (Part I)
Early Android application development, usually through the Android SDK (Android Software Development Kit) to use Java as a programming language to develop applications, but by different software development kit, use the programming language is also different.
Developers through the Android NDK is (Android Native Development Kit) using the C language or C + + language as a programming language for developing applications. Google also launched for beginners to programming using the Simple language, the language is similar to Microsoft Visual Basic language. In addition, Google launched the Google App Inventor, development tools, the development tools to quickly build applications to facilitate the novice developer.
Program composed of
The technical content: This system consists of four parts, namely: activities (Activity): for the performance of functions. Service (Service): the Activity of the equivalent of running in the background. The broadcast reception (BroadcastReceiver): used to receive the broadcast.
Intentions (Intent): used to connect various components, and deliver the message in the meantime. 1 the Activity
Android, the Activity is a fundamental of all programs, the process of all programs running in Activity among activity can be regarded as the development of the most frequently encountered,
What is android?
one of the basic module which is also the Android. Android program which the Activity is
generally on behalf of a screen of the phone screen. If the phone is likened to a browser, Acitivity is equivalent to a web page. Activity which can add a Button, Check box control. Activity concept and the concept of page is quite similar.
Generally an Android application is composed by a number of Activity. Between the more than one Activity can jump each other, press a Button button, for example, may jump to the other
Activity. Web page to jump slightly as the Activity between the jump may be the return value, for example, from the Activity A jump to the Activity B when Activity B runs at the end of, it is possible to give the Activity A return to a value. To do so in many cases it is quite convenient. When you open a new screen, before a screen will be placed in suspended state, and pushed onto the history stack. The user can rollback operation returns to the screen previously opened. We can selectively removed without the need to retain the screen, because Android will start each
application to the current screen is saved in the stack. Activity is the Android system, carry out maintenance of it also have its own life cycle that is, it's a produce, run, the destruction of a cycle, for the Activity, the key is their life cycle, grasp, Second is the state save and restore
(onSaveInstanceState onRestoreInstanceState ), and Activity jumps and data transmission (An intent). 2 Service
Service is a component in the android system, it is almost level with the Activity, but he can not run their own, can only run in the background, and other components to interact. Service is a long life cycle interface code. Service is a program that can run a long time, but it has no user interface. Say a little boring, look at an example. Procedures to open a music player, this time if you want the Internet, then we open the Android browser, although this time we have entered a browser program, but the songs play and did not stop, but continues in the background of a followed by a play. In fact, this play by playing music of Service control. Of course, this can also play music of the Service to stop, for example, when the playlist inside the song ended, or the user presses stop the music player shortcut key. service can be used in the application and more occasions, such as multimedia playback of the time the user starts the other Activity this time of program you want to continue playing in the background, for example, to detect changes to files on the SD card, and then record the location of geographic information in the background or change the etc., in short, the service it is always hidden behind. 3 the Broadcast
In Android, Broadcast is a widely used mechanism for transmission of information between
applications. While BroadcastReceiver is sent out of the Broadcast filter to accept and respond to a class of components. BroadcastReceiver can use to allow the application to respond to an external event. This is very interesting, for example, when the incoming call to the arrival of the external events, you can use BroadcastReceiver processing. For example, when downloading a program successfully completed, you can still use BroadcastReceiver for processing.
BroadcastReceiver can not generate a UI that is not transparent for the user, the user can not see. BroadcastReceiver NotificationManager to notify the user of these things happen. The
BroadcastReceiver either registered in AndroidManifest.xml can also be used in the run-time code Context.registerReceiver () to register. As long as it is registered, when the event comes, even if the program does not start, the system also needs time to start the program. A variety of
applications can also by using Context.sendBroadcast () to their own intent broadcasts broadcast to other applications. The registration BroadcastReceiver in two ways: 4 Intent to
Intent is an abstract description of an action to perform, in general, is used as an argument to the Intent to assist with the communication between the android various components. Intent is responsible for the application of an operation action, action, involving data, additional data to describe the Android described in this Intent to find corresponding components Intent will be passed to the component that is called, and complete the call to the component. Therefore, the Intent here plays the role of a media intermediary, specialized components call each other to achieve a decoupling between the caller and callee. For example, in the application of a contact maintenance, when we have a contact list screen (assuming the corresponding Activity for
listActivity), click on a contact, I hope more information out of this contact screen (assuming the corresponding Activity for detailActivity). In order to achieve this goal, listActivity need to construct a the Intent Intent is used to tell the system, we have to do \
corresponds to the view that the object is \will construct The Intent incoming system according to the description of this Intent to the
manifest the Activity to meet the requirements of this Intent, the system will call to find Activity is detailActivity final incoming Intent to detailActivity are made based on the description of this Intent Perform the appropriate action. Intent is mainly used to start other activities or the service, so intent can be understood as the activity between the adhesive. Intent specific form of three kinds:
StartActivity method to start a new Activity;
Through the Intent broadcast mechanism can be an Intent sent to any interested in this Intent BroadcastReceiver;
Interact through the startService (Intent to) or bindService (Intent, ServiceConnection, int) to the background of the Service.
significance of Android developed
Android is a truly open mobile device platforms. It includes operating systems, user interface and applications - work required of the mobile phone all the software, but there is no exclusive right of obstacles hinder the mobile industry, innovation. Google and Open Handset Alliance to develop Android, leader of the alliance by more than 30 technology and wireless applications, including China Mobile, Motorola, Qualcomm, HTC and T-Mobile. We hope that with the establishment of standardized, open mobile phone software platform, the formation of an open ecosystem in the mobile industry through partnerships with operators, equipment manufacturers, developers and other interested parties formed a deep-seated, . We believe that this will promote better, faster innovation and unpredictable applications and services for mobile users.
中文翻译
什么是Android?
Android是一种以Linux为基础的开放源码操作系统,主要使用于便携设备。目前尚
未有统一中文名称,中国大陆地区较多人使用“安卓”或“安致”。Android操作系统最初由Andy Rubin开发,最初主要支持手机。2005年由Google收购注资,并组建开放手机联盟开发改良,逐渐扩展到平板电脑及其他领域上。Android的主要竞争对手是苹果公司的iOS以及RIM的Blackberry OS。2011年第一季度,Android在全球的市场份额首次超过塞班系统,跃居全球第一。 2012年2月数据,Android占据全球智能手机操作系统市场52.5%的份额,中国市场占有率为68.4%。
系统结构
Android的系统架构和其它操作系统一样,采用了分层的架构。从架构图看,android分为四个层,从高层到低层分别是应用程序层、应用程序框架层、系统运行库层和linux核心层。
Android是以Linux为核心的手机操作平台,作为一款开放式的操作系统,随着Android的快速发展,如今已允许开发者使用多种编程语言来开发Android应用程序,而不再是以前只能使用Java开发Android应用程序的单一局面,因而受到众多开发者的欢迎,成为真正意义上的开放式操作系统。
在Android中,开发者可以使用Java作为编程语言来开发应用程序,也可以通过NDK使用C/C++作为编程语言来开发应用程序,也可使用SL4A来使用其他各种脚本语言进行编程(如:python、lua、tcl、php等等),还有其他诸如:Qt(qt for android)、Mono(mono for android)等一些著名编程框架也开始支持Android编程,甚至通过MonoDroid,开发者还可以使用C#作为编程语言来开发应用程序。另外,谷歌还在2009年特别发布了针对初学者的Android Simple语言,该语言类似Basic语言。而在网页编程语言方面,JavaScript,ajax,HTML5,jquery、sencha、dojo、mobl、PhoneGap等等都已经支持Android开发。
而在Android系统底层方面,Android使用C/C++作为开发语言。
应用程序(部分)
早期的Android应用程序开发,通常通过Android SDK(Android软件开发包)下使用Java作为编程语言来开发应用程序,但通过不同的软件开发包,则使用的编程语言也不同。
例如开发者可以通过Android NDK(Android Native开发包)使用C语言或者C++语言来作为编程语言开发应用程序。同时谷歌还推出了适合初学者编程使用的Simple语言,该语言类似微软公司的Visual Basic语言。此外,谷歌公司还推出了Google App Inventor开发工具,该开发工具可以快速地构建应用程序,方便新手开发者。
程序组成
技术内容:本系统主要由四个部分组成,分别是:活动(Activity): 用于表现功能。服务(Service): 相当于后台运行的Activity。广播接收器(BroadcastReceiver):用于接收广播。意图(Intent): 用于连接以上各个组件,并在其间传递消息。 1 Activity
Android 中,Activity 是所有程序的根本,所有程序的流程都运行在Activity 之中,Activity可以算是开发者遇到的最频繁,也是Android 当中最基本的模块之一。在Android的程序当中,Activity 一般代表手机屏幕的一屏。如果把手机比作一个浏览器,那么Acitivity就相当于一个网页。在Activity 当中可以添加一些Button、Check box 等控件。可以看到Activity 概念和网页的概念相当类似。
一般一个Android 应用是由多个Activity 组成的。这多个Activity 之间可以进行相互跳转,例如,按下一个Button 按钮后,可能会跳转到其他的Activity。和网页跳转
稍微有些不一样的是,Activity 之间的跳转有可能返回值,例如,从Activity A 跳转到Activity B,那么当Activity B 运行结束的时候,有可能会给Activity A 一个返回值。这样做在很多时候是相当方便的。
当打开一个新的屏幕时,之前一个屏幕会被置为暂停状态,并且压入历史堆栈中。用户可以通过回退操作返回到以前打开过的屏幕。我们可以选择性的移除一些没有必要保留的屏幕,因为Android 会把每个应用的开始到当前的每一个屏幕保存在堆栈中。Activity 是由Android 系统进行维护的,它也有自己的生命周期,即它的一个产生、运行、销毁的一个周期,对于Activity,关键是其生命周期的把握,其次就是状态的保存和恢复(onSaveInstanceState onRestoreInstanceState),以及Activity 之间的跳转和数据传输(intent)。 2 Service
Service 是android 系统中的一种组件,它跟Activity 的级别差不多,但是他不能自己运行,只能后台运行,并且可以和其他组件进行交互。Service 是没有界面的长生命周期的代码。Service 是一种程序,它可以运行很长时间,但是它却没有用户界面。这么说有点枯燥,我们来看个例子。打开一个音乐播放器的程序,这个时候若想上网了,那么,我们打开Android 浏览器,这个时候虽然我们已经进入了浏览器这个程序,但是,歌曲播放并没有停止,而是在后台继续一首接着一首的播放。其实这个播放就是由播放音乐的Service进行控制。当然这个播放音乐的Service也可以停止,例如,当播放列表里边的歌曲都结束,或者用户按下了停止音乐播放的快捷键等。service 可以在和多场合的应用中使用,比如播放多媒体的时候用户启动了其他Activity这个时候程序要在后台继续播放,比如检测SD 卡上文件的变化,再或者在后台记录你地理信息位置的改变等等,总之服务嘛,总是藏在后头的。 3 Broadcast
在Android 中,Broadcast 是一种广泛运用的在应用程序之间传输信息的机制。而BroadcastReceiver 是对发送出来的Broadcast进行过滤接受并响应的一类组件。可以使用BroadcastReceiver 来让应用对一个外部的事件做出响应。这是非常有意思的,例如,当电话呼入这个外部事件到来的时候,可以利用BroadcastReceiver 进行处理。例如,当下载一个程序成功完成的时候,仍然可以利用BroadcastReceiver 进行处理。BroadcastReceiver不能生成UI,也就是说对于用户来说不是透明的,用户是看不到的。BroadcastReceiver通过NotificationManager 来通知用户这些事情发生了。BroadcastReceiver 既可以在AndroidManifest.xml 中注册,也可以在运行时的代码中使用Context.registerReceiver()进行注册。只要是注册了,当事件来临的时候,即使程序没有启动,系统也在需要的时候启动程序。各种应用还可以通过使用Context.sendBroadcast () 将它们自己的intent broadcasts广播给其他应用程序。注册BroadcastReceiver有两种方式: 4 Intent
Intent 是一个将要执行的动作的抽象的描述,一般来说是作为参数来使用,由Intent来协助完成android 各个组件之间的通讯。Intent 负责对应用中一次操作的动作、动作涉及数据、附加数据进行描述,Android 则根据此Intent 的描述,负责找到对应的组件,将Intent 传递给调用的组件,并完成组件的调用。因此,Intent 在这里起着一个媒体中介的作用,专门提供组件互相调用的相关信息,实现调用者与被调用者之间的解耦。例如,在一个联系人维护的应用中,当我们在一个联系人列表屏幕(假设对应的Activity 为listActivity)上,点击某个联系人后,希望能够跳出此联系人的详细信息屏幕(假设对应的Activity为detailActivity)。为了实现这个目的,listActivity需要构造一个Intent,这个Intent 用于告诉系统,我们要做\查看\动作,此动作对应的查看对象是\某联系人\,然后调用startActivity(Intent intent),将构造的Intent 传入,系统会根据此Intent 中的描述,到ManiFest中找到满足此Intent 要求的Activity,系统会调用找到的Activity,即为detailActivity,最终传入Intent,detailActivity 则会根据此Intent中的描述,执行相应的操作。Intent 主要是用来启动其他的activity 或者service,所以可以将intent 理解成activity 之间的粘合剂。Intent具体有一下3 种形式:
通过startActivity 方法来启动一个新的Activity;
通过broadcast Intent 机制可以将一个Intent 发送给任何对这个Intent 感兴趣的BroadcastReceiver;
通过startService (Intent) 或bindService(Intent,ServiceConnection,int) 来和后台的Service 进行交互。
android开发的意义
Android 是一个真正意义上的开放性移动设备综合平台。它包括操作系统、用户界面和应用程序 - 移动电话工作所需的全部软件,而且不存在任何以往阻碍移动产业创新的专有权障碍。谷歌与开放手机联盟合作开发了 Android,这个联盟由包括中国移动、摩托罗拉、高通、宏达和 T-Mobile 在内的 30 多家技术和无线应用的领军企业组成。通过与运营商、设备制造商、开发商和其他有关各方结成深层次的合作伙伴关系,我们希望借助建立标准化、开放式的移动电话软件平台,在移动产业内形成一个开放式的生态系统。我们认为此举必将推进更好、更快的创新,为移动用户提供不可预知的应用和服务。
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库202070417 - 纪文豪 - 中英文在线全文阅读。
相关推荐: