(完整版)基于Android开发的外文文献

合集下载

关于Android的外文文献

关于Android的外文文献

附件A 外文文献(英文)Android: A Programmer’s Guide1 What Is Android1.1 Key Skills & Concepts●History of embedded device programming●Explanation of Open Handset Alliance●First look at the Android home screenIt can be said that, for a while, traditional desktop application developers have been spoiled. This is not to say that traditional desktop application development is easier than other forms of development. However, as traditional desktop application developers, we have had the ability to create almost any kind of application we can imagine. I am including myself in this grouping because I got my start in desktop programming.One aspect that has made desktop programming more accessible is that we have had the ability to interact with the desktop operating system, and thus interact with any underlying hardware, pretty freely (or at least with minimal exceptions). This kind of freedom to program independently, however, has never really been available to the small group of programmers who dared to venture into the murky waters of cell phone development.NOTE :I refer to two different kinds of developers in this discussion: traditional desktop application developers, who work in almost any language and whose end product, applications, are built to run on any “desktop” operating system; and Android developers, Ja va developers who develop for the Android platform. This is not for the purposes of saying one is by any means better or worse than the other. Rather, the distinction is made for purposes of comparing the development styles and tools of desktop operating system environments to the mobile operating system environment,1.2 Brief History of Embedded Device ProgrammingFor a long time, cell phone developers comprised a small sect of a slightly larger group of developers known as embedded device developers. Seen as a less “glamorous” sibling to desktop—and later web—development, embedded device development typically got the proverbial short end of the stick as far as hardware and operating system features, because embedded device manufacturers were notoriously stingy on feature support.Embedded device manufacturers typically needed to guard their hardware secrets closely, so they gave embedded device developers few libraries to call when trying to interact with a specific device. Embedded devices differ from desktops in that an embedded device is typically a “computer on a chip.” For example, consider your standard television remote control; it is not really seen as an overwhelming achievement of technological complexity. When any button is pressed, a chip interprets the signal in a way that has been programmed into the device. This allows the device to know what to expect from the input device (key pad), and how to respond to those commands (for example, turn on the television). This is a simple form of embedded device programming. However, believe it or not, simple devices such as these are definitely related to the roots of early cell phone devices and development.Most embedded devices ran (and in some cases still run) proprietary operating systems. The reason for choosing to create a proprietary operating system rather than use any consumer system was really a product of necessity. Simple devices did not need very robust and optimized operating systems.As a product of device evolution, many of the more complex embedded devices, such as early PDAs, household security systems, and GPSs, moved to somewhat standardized operating system platforms about five years ago. Small-footprint operating systems such as Linux, or even an embedded version of Microsoft Windows, have become more prevalent on many embedded devices. Around this time in device evolution, cell phones branched from other embedded devices onto their own path. This branching is evident when you examine their architecture.Nearly since their inception, cell phones have been fringe devices insofar as they run on proprietary software—software that is owned and controlled by the manufacturer, and is almostalways considered to be a “closed” system. The practice of manufacturers using proprietar y operating systems began more out of necessity than any other reason. That is, cell phone manufacturers typically used hardware that was completely developed in-house, or at least hardware that was specifically developed for the purposes of running cell phone equipment. As a result, there were no openly available, off-the-shelf software packages or solutions that would reliably interact with their hardware. Since the manufacturers also wanted to guard very closely their hardware trade secrets, some of which could be revealed by allowing access to the software level of the device, the common practice was, and in most cases still is, to use completely proprietary and closed software to run their devices. The downside to this is that anyone who wanted to develop applications for cell phones needed to have intimate knowledge of the proprietary environment within which it was to run. The solution was to purchase expensive development tools directly from the manufacturer. This isolated many of the “homebrew” devel opers.NOTE:A growing culture of homebrew developers has embraced cell phone application development. The term “homebrew” refers to the fact that these developers typically do not work for a cell phone development company and generally produce small, one-off products on their own time.Another, more compelling “necessity” that kept cell phone development out of the hands of the everyday developer was the hardware manufacturers’ solution to the “memory versus need” dilemma. Until recently, cell phon es did little more than execute and receive phone calls, track your contacts, and possibly send and receive short text messages; not really the “Swiss army knives” of technology they are today. Even as late as 2002, cell phones with cameras were not commonly found in the hands of consumers.By 1997, small applications such as calculators and games (Tetris, for example) crept their way onto cell phones, but the overwhelming function was still that of a phone dialer itself. Cell phones had not yet become the multiuse, multifunction personal tools they are today. No one yet saw the need for Internet browsing, MP3 playing, or any of the multitudes of functions we are accustomed to using today. It is possible that the cell phone manufacturers of 1997 did not fully perceive the need consumers would have for an all-in-one device. However, even if the need was present, a lack of device memory and storage capacity was an even biggerobstacle to overcome. More people may have wanted their devices to be all-in-one tools, but manufacturers still had to climb the memory hurdle.To put the problem simply, it takes memory to store and run applications on any device, cell phones included. Cell phones, as a device, until recently did not have the amount of memory avail able to them that would facilitate the inclusion of “extra” programs. Within the last two years, the price of memory has reached very low levels. Device manufacturers now have the ability to include more memory at lower prices. Many cell phones now have more standard memory than the average PC had in the mid-1990s. So, now that we have the need, and the memory, we can all jump in and develop cool applications for cell phones around the world, right? Not exactly.Device manufacturers still closely guard the operating systems that run on their devices. While a few have opened up to the point where they will allow some Java-based applications to run within a small environment on the phone, many do not allow this. Even the systems that do allow some Java apps to run do not allow the kind of access to the “core” system that standard desktop developers are accustomed to having.1.3 Open Handset Alliance and AndroidThis barrier to application development began to crumble in November of 2007 when Google, under the Open Handset Alliance, released Android. The Open Handset Alliance is a group of hardware and software developers, including Google, NTT DoCoMo, Sprint Nextel, and HTC, whose goal is to create a more open cell phone environment. The first product to be released under the alliance is the mobile device operating system, Android. (For more information about the Open Handset Alliance, see .)NOTE :Google, in promoting the new Android operating system, even went as far as to create a $10 million contest looking for new and exciting Android applications.While cell phones running Linux, Windows, and even PalmOS are easy to find, as of this writing, no hardware platforms have been announced for Android to run on. HTC, LG Electronics, Motorola, and Samsung are members of the Open Handset Alliance, under which Android has been released, so we can only hope that they have plans for a few Android-based devices in the near future. With its release in November 2007, the system itself is still in asoftware-only beta. This is good news for developers because it gives us a rare advance look at a future system and a chance to begin developing applications that will run as soon as the hardware is released.NOTE:This strategy clearly gives the Open Handset Alliance a big advantage over other cell phone operating system developers, because there could be an uncountable number of applications available immediately for the first devices released to run Android.Introduction to AndroidAndroid, as a system, is a Java-based operating system that runs on the Linux 2.6 kernel. The system is very lightweight and full featured. Android applications are developed using Java and can be ported rather easily to the new platform. If you have not yet downloaded Java or are unsure about which version you need, I detail the installation of the development environment in Chapter 2. Other features of Android include an accelerated 3-D graphics engine (based on hardware support), database support powered by SQLite, and an integrated web browser.If you are familiar with Java programming or are an OOP developer of any sort, you are likely used to programmatic user interface (UI) development—that is, UI placement which is handled directly within the program code. Android, while recognizing and allowing for programmatic UI development, also supports the newer, XML-based UI layout. XML UI layout is a fairly new concept to the average desktop developer. I will cover both the XML UI layout and the programmatic UI development in the supporting chapters of this book.One of the more exciting and compelling features of Android is that, because of its architecture, third-party applications—includi ng those that are “home grown”—are executed with the same system priority as those that are bundled with the core system. This is a major departure from most systems, which give embedded system apps a greater execution priority than the thread priority available to apps created by third-party developers. Also, each application is executed within its own thread using a very lightweight virtual machine.Aside from the very generous SDK and the well-formed libraries that are available to us to develop with, the most exciting feature for Android developers is that we now have access to anything the operating system has access to. In other words, if you want to create an application that dials the phone, you have access to the phone’s dialer; if you want to creat e anapplication that utilizes the phone’s internal GPS (if equipped), you have access to it. The potential for developers to create dynamic and intriguing applications is now wide open.On top of all the features that are available from the Android side of the equation, Google has thrown in some very tantalizing features of its own. Developers of Android applications will be able to tie their applications into existing Google offerings such as Google Maps and the omnipresent Google Search. Suppose you want to write an application that pulls up a Google map of where an incoming call is emanating from, or you want to be able to store common search results with your contacts; the doors of possibility have been flung wide open with Android.Chapter 2 begins your journey to Android development. You will learn the how’s and why’s of using specific development environments or integrated development environments (IDE), and you will download and install the Java IDE Eclipse.2 Application: Hello World2.1 Key Skills & Concepts●Creating new Android projects●Working with Views●Using a TextView●Modifying the main.xml file●Running applications on the Android EmulatorIn this chapter, you will be creating your first Android Activity. This chapter examines the application-building process from start to finish. I will show you how to create an Android project in Eclipse, add code to the initial files, and run the finished application in the Android Emulator. The resulting application will be a fully functioning program running in an Android environment.Actually, as you move through this chapter, you will be creating more than one Android Activity. Computer programming tradition dictates that your first application be the typical Hello World! application, so in the first section you will create a standard Hello World!application with just a blank background and the “Hello World!” text. Then, for the sake of enabling you to get to know the language better, the next section explains in detail the files automatically created by Android for your Hello World! application. You will create two iterations of this Activity, each using different techniques for displaying information to the screen. You will also create two different versions of a Hello World! application that will display an image that delivers the “Hello World!” message. This will give you a good introduction to the controls and inner workings of Android.NOTE:You will often see “application” and “Activity” used interchangeably. The difference between the two is that an application can be composed of multiple Activities, but one application must have at least one Activity. Each “window” or screen of your application is a separate Activity. Therefore, if you create a fairly simple application with only one screen of data (like the Hello World! application in this chapter), that will be one Activity. In future chapters you will create applications with multiple Activities.To make sure that you get a good overall look at programming in Android, in Chapter 6 you will create both of these applications in the Android SDK command-line environment for Microsoft Windows and Linux. In other words, this chapter covers the creation process in Eclipse, and Chapter 6 covers the creation process using the command-line tools. Therefore, before continuing, you should check that your Eclipse environment is correctly configured. Review the steps in Chapter 3 for setting the PATH statement for the Android SDK. You should also ensure that the JRE is correctly in your PATH statement.TIP:If you have configuration-related issues while attempting to work with any of the command-line examples, try referring to the configuration steps in Chapters 2 and 3; and look at the Android SDK documentation.2.2 Creating Your First Android Project in EclipseTo start your first Android project, open Eclipse. When you open Eclipse for the first time, it opens to an empty development environment (see Figure 5-1), which is where you want to begin. Your first task is to set up and name the workspace for your application. Choose File | New | Android Project, which will launch the New Android Project wizard.CAUTION Do not select Java Project from the New menu. While Android applications are written in Java, and you are doing all of your development in Java projects, this option will create a standard Java application. Selecting Android Project enables you to create Android-specific applications.If you do not see the option for Android Project, this indicates that the Android plugin for Eclipse was not fully or correctly installed. Review the procedure in Chapter 3 for installing the Android plugin for Eclipse to correct this.2.3 The New Android Project wizard creates two things for youA shell application that ties into the Android SDK, using the android.jar file, and ties the project into the Android Emulator. This allows you to code using all of the Android libraries and packages, and also lets you debug your applications in the proper environment.Your first shell files for the new project. These shell files contain some of the vital application blocks upon which you will be building your programs. In much the same way as creating a Microsoft .NET application in Visual Studio generates some Windows-created program code in your files, using the Android Project wizard in Eclipse generates your initial program files and some Android-created code. In addition, the New Android Project wizard contains a few options, shown next, that you must set to initiate your Android project. For the Project Name field, for purposes of this example, use the title HelloWorldText. This name sufficiently distinguishes this Hello World! project from the others that you will be creating in this chapter.In the Contents area, keep the default selections: the Create New Project in Workspace radio button should be selected and the Use Default Location check box should be checked. This will allow Eclipse to create your project in your default workspace directory. The advantage of keeping the default options is that your projects are kept in a central location, which makes ordering, managing, and finding these projects quite easy. For example, if you are working in a Unix-based environment, this path points to your $HOME directory.If you are working in a Microsoft Windows environment, the workspace path will be C:/Users/<username>/workspace, as shown in the previous illustration. However, for any number of reasons, you may want to uncheck the Use Default Location check box and select a different location for your project. One reason you may want to specify a different location here is simply if you want to choose a location for this specific project that is separate fromother Android projects. For example, you may want to keep the projects that you create in this book in a different location from projects that you create in the future on your own. If so, simply override the Location option to specify your own custom location directory for this project.附件B外文文献(中文)Android:一个程序员的入门书1 什么是Android1.1 主要技巧和思想●历史的嵌入式器件编程●开放手机联盟的解释●第一眼看到Android的主屏幕可以这么说,暂时,传统的桌面应用程序开发者已经被惯坏了。

手机系统安卓系统中英文对照外文翻译文献

手机系统安卓系统中英文对照外文翻译文献

中英文对照外文翻译文献(文档含英文原文和中文翻译)译文:深入理解安卓系统的安全性下一代开放操作系统的主流将不会在桌面上,但是将会出现在我们每天携带的手机上。

这些开放性的环境将会带领这些新的应用可能集成这些已经存在的在线服务,当然随着日以具增的数据与服务在手机上的支持,手机上的安全缺陷也越发明显。

下一代操作系统本质在于是否提供一个完整综合的安全平台。

由开放手机联盟(open Handset Alliance 谷歌领导)所开发的android 系统是一个被广泛看好的一个手机开源系统,该系统提供一个基本的操作系统,一个中间件应用层,一个java开发工具和一个系统应用收集器(collection of systemapplications )。

尽管android SDK自2007年就发布了,但是第一部android 手机却在2008年10月才诞生。

自从这时起谷歌开起了自己的时代,T-Mobile的G1的制造商台湾HTC估算G1的发货量在2008年底已经超过100万部。

据业内人士预期该G1手机的销量将会在2009年继续保持。

不久的将来其他许多手机供应商要计划支持这个系统。

一个围绕android庞大的开发者社区已经建立,同时很多新的产品和应用已经可以在android上使用。

一个Android的主要卖点是它使开发人员无缝把在线服务扩展到手机。

这方面最明显的例子是谷歌的紧密集成Gmail,日历和联系人Web应用程序通过该系统。

用户只需提供一个android用户名和密码,其手机自动同步与谷歌的服务。

其他厂商正在迅速适应自己的现有的即时通讯,社交网络和游戏服务。

Android和许多企业寻找新途径来整合他们的自己已有的业务到android上。

传统的台式机和服务器的操作系统一直在努力进行安全功能的集成。

这些个人和商业应用在单一平台的很出色,然而这一块业务一个手机平台上像android上不是很有用。

它给了许多研究人员希望。

外文文献-The basic of description of android system对Android系统的基本描诉

外文文献-The basic of description of android system对Android系统的基本描诉

外文文献-The basic of description of android system对Android系统的基本描诉毕业设计外文文献原文及译文The basic of description of android system对Android系统的基本描诉学生姓名: 学号:电子与计算机科学技术系系别:计算机科学与技术专业:指导教师:2015年 5 月2015届毕业设计外文文献原文及译文The basic of description of android systemBy the Open Mobile Alliance (open Handset Alliance led by Google) developed the android system is a widely optimistic about an open source phone system, the system provides a basic operating system, a middle ware application layer, a java development tools and a system Application collector (collection of system applications).The android the SDK since 2007 on the release of the first android phone in October 2008 before the birth. Google opened since then on his own time, Taiwan's HTC, the manufacturer of the T-Mobile G1 estimate G1 shipments have more than one million at the end of 2008. According to industry insiders expect the G1 mobile phone sales in 2009 continue.Many other mobile phone suppliers in the near future plans to supportthis system.Around an android and a huge developer community has been established, while a lot of new products and applications on the android. Android's main selling point is that it enables developers to seamlessly expand online services to mobile phones. Calendar and Contacts Web applications through the system. Users only need to provide an android user name and password, the phone automatically sync with Google services. The other vendors are quickly adapt their existing instant messaging, social networking and gaming services. Android and many companies find new ways to integrate their existing business to the android.Traditional desktop and server operating system has been working for the integration of security features. These individuals and business applications on a single platform is very good, however a business phone platform like android is not very useful. It gives the hope of many researchers. Android is not parked in the body for other platform application support: the implementation of the application depends on a top-level JAVA middle ware, the middle ware running on the embeddedLinux kernel. Therefore, developers should deploy their applications to the Android must use a custom user interface environment.In addition, the android system applications limit the applicationto call each other API .Although these applications have certain safety features, some ofour experienced developers to create Android applications who revealed that the design of security2015届毕业设计外文文献原文及译文applications is not always straight forward. Android uses a simple permission label distribution mode to restrict access to resources, but the reasons for the necessity and convenience of other applications, the designers have increased the confusion on this system. This paper attempts to explain the complexity of the Android security, and pay attention to some of the possible development defects and application security. We try to draw some lessons learned, and hope that the safety of the future.Android application framework for developers is a mandatory framework. It does not have a main () function function or a single entry point for the implementation of the contrary, the developer must in the design of application components. We developed applications to help the API of the android SDK .The Android system defines four kinds of component type.Activity component that defines the application user interface. Usually, the application developer defines each activity screen.Activity can start, it may pass and return values. Can be handled at a time only a keyboard system Activity, all other Activity will be suspended at this time.Service components perform background processing. The need for some operations when an activity, after the disappearance of the user interface (such as downloading a file or playing music), it usually take such action specially designed services. Developers can also use a special daemon at system start up, the service is usually defined a remote procedure call (RPC), and other system components can be used to send the interface command and retrieve data, as well as to register a callback function.Content Provider component storage and share data with relational database interfaces. Each Content supplier has an associated "rights" to describe its contents contains. Other components when used as a handle to execute SQL queries (for example SELECT, INSERT,or DELETE content. Content suppliers are typically stored the values on the database records, data retrieval is a special case, the file is also shared by the content provider interface.The components of the broadcast receiver as to send a message from the mailbox to the application. Typically, the broadcast message, the application code implicit destination.2015届毕业设计外文文献原文及译文Therefore, the radio receiver subscribe to these destinationsreceive messages sent to it. The application code can also be solved explicitly broadcast receivers, including the name space allocation.The main mechanism of the interaction of the components of the Component Interaction, is an intent, which is a simple message object,which contains a destination address and data components. The Android API defines his approach into intent, and use that information to initiate an activity.such as start an activity (startActivity (An intent)) start services (the start Service (An intent)) and radio (sendBroadcast (An intent)). Android framework to inform the calls to these methods began to perform in the target application code. This process, the internal components of communication is called an action. Simply put, the Intent object defined in the "Intent to implement the" action ". One of the most powerful features of the Android is allowed a variety of intent addressing mechanism. The developer can solve the space of a target component using its applications, they can also specify an implicit name. In the latter case, the system determines the best components of an action by considering the installed applications and user choice.Android applications are written in the Java programminglanguage.The compiled Java code — along with any data and resource files required by the application — is bundled bythe apt tool into an Android package,an archive file marked by an .A suffix.This file is the vehicle for distributing the application and installing it on mobile devices;it's the file users download to their devices.All the code in a single.APK file is considered to be one application.In many ways,each Android application lives in its own world:(1) By default,every application runs in its own Linuxprocess.Android starts the process when any of the application's code needs to be executed,and shuts down the process when it's no longer needed and system resources are required by other applications.(2) Each process has its own virtual machine(VM),so application code runs in isolation from the code of all other applications.2015届毕业设计外文文献原文及译文(3) By default,each application is assigned a unique Linux userID.Permissions are set so that the application's files are visible only to that user and only to the application itself there are ways to export them to other applications as well.Application ComponentsA central feature of Android is that one application can make use of elements of other application (provided those application permit it).For example,if your application needs to display a scrolling list of images and another application has developed a suitable and made it available to others,you can call upon that to do the work,rather than develop your own.Your application doesn't incorporate the code of the other application or link to it.Rather,it simply starts up that piece of the other application when the need arises. For this to work,the system must be able to start an application process when any part of it isneeded,and instantiate the Java objects for that part.Therefore,unlike applications on most other systems,Android applications don't have a single entry point for everything in the application(nomain()function,for example).Rather,they have essential components that the system can instantiate and run as needed.There are four types of components:ActivitiesAn activity presents a visual user interface for one focused endeavor the user can undertake.For example,an activity might present a list of menu items users can choose from or it might display photographs along with their captions.A text messaging application might have one activity that shows a list of contacts to send messages to,a second activity to write the message to the chosen contact,and other activities to review old messages or change or change settings.Tough they work together to form a cohesive user interface,each activity is independent of the others.Each one is implemented as a subclass of the Activity base class.An application might consist of just one activity or,like the text messaging application just mentioned,it may contain several.What the activities are,and how many there are depends,of course,on the application and its design.Typically,one of the activities is marked as the first one that should be presented to the user when the application is launched.Moving2015届毕业设计外文文献原文及译文from one activity to another is accomplished by having the current activity start the next one.Each activity is given a default window to draw in.Typically,the window fills the screen,but it might be smaller than the screen andfloat on top of other windows.An activity can also make use ofadditional windows — for example,a pop-up dialog that calls for a user response in the midst of the activity,or a window that presentsusers with vital information when they select a particular item on-screen. The visual content of the window is provided by a hierarchy of views — objects derived from the base View class.Each view controls a particular rectangular space within the window.Parent views contain and organize the layout of their children.Leaf views(those at the bottom of the hierarchy)draw in the rectangles they control and respond to user actions directed at that space.Thus,views are where the activity's interaction with the user takes place. For example,a view might display a small image and initiate an action when the user taps thatimage.Android has a number of ready-made views that you can use —including buttons,text fields,scroll bars,menu items,check boxes,and more.ServicesA service doesn't have a visual user interface,but rather runs inthe background for an indefinite period of time.For example,a service might play background music as the user attends to other matters,or it might fetch data over the network or calculate something and provide the result to activities that need it.Each service extends the Service base class.A prime example is a media player songs from a play list.The player application would probably have one or more activities that allow theuser to choose songs and start playing them.However,the music playback itself would bot be handled by an activity because users will expect the music to keep the music going,the media player activity could start a service to run in the background.The system would then keep the music playback service running even after the activity that started it leaves the screen.It's possible to connect to (bind to)an ongoing service(and startthe service if it's not2015届毕业设计外文文献原文及译文already running).While connected,you can communicate with theservice through an interface that the service exposes.For the music service,this interface might allow users to pause,rewind,stop,andrestart the playback.Like activities and the other components,services run in the main thread of the application process.So that they won't block other components or the user interface,they often spawn another thread fortime-consuming tasks(like music playback).See Processes and Thread,later.Broadcast receiversA broadcast receiver is a component that does nothing but receiveand react to broadcast announcements.Many broadcasts originate in system code — for example,announcements thatthe timezone has changed,that the battery is low,that a picture has been taken,or that the user changed a language preference.Applications can also initiate broadcasts — for example,to letother applications know that some data has been downloaded to the device and is available for them to use.An application can have any number of broadcast receivers to respond to respond to respond to any announcements it considers important.All receivers extend the Broadcast Receiver base class.Broadcast receivers do not display a user interface.However,they may start an activity in response to the information they receive,or they may use the Notification Manager to alert the user.Notifications can get the user's attention in various ways — flashing the back light,vibrating the device,playing a sound,and so on,They typically place a persistent icon in the status bar,which users can open to get the message.Content providersA content provider makes a specific set of the application's data available to other applications.The data can be stored in the file system,in an database,or in any other manner that makes sense.The content provider extends the Content Provider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it2015届毕业设计外文文献原文及译文controls.However,applications do not call these methodsdirectly.Rather they use a Content Resolver object and call its methods instead.A Content Resolver can talk to any content provider;it cooperates with the provider to manage any inter process communication that's involved.See the separate Content Providers document for more information on using content providers.Whenever there's a request that should be handled by a particular component,Android makes sure that the application process of the component is running,starting it if necessary,and that an appropriate instance of the component is available,creating the instance if necessary.2015届毕业设计外文文献原文及译文The basic of description of android system对Android系统的基本描诉由开放手机联盟(Open Handset Alliance LED通过谷歌)开发的安卓系统是一个开源的手机系统被广泛看好,该系统提供了一个基本的操作系统,中间件的应用层,一个Java开发工具和应用系统集热器(系统应用收集)。

基于Android开发的外文文献

基于Android开发的外文文献

AndroidAndroid, as a system, is a Java-based operating system that runs on the Linux 2、6 kernel、The system is very lightweight and full featured、Android applications are developed using Java and can be ported rather easily to the new platform、If you have not yet downloaded Java or are unsure about which version you need, I detail the installation of the development environment in Chapter 2、Other features of Android include an accelerated 3-D graphics engine (based on hardware support), database support powered by SQLite, and an integrated web browser、If you are familiar with Java programming or are an OOP developer of any sort, you are likely used to programmatic user interface (UI) development—that is, UI placement which is handled directly within the program code、Android, while recognizing and allowing for programmatic UI development, also supports the newer, XML-based UI layout、XML UI layout is a fairly new concept to the average desktop developer、I will cover both the XML UI layout and the programmatic UI development in the supporting chapters of this book、One of the more exciting and compelling features of Android is that, because of its architecture, third-party applications—including those that are “home grown”—are executed with the same system priority as those that are bundled with the core system、This is a major departure from most systems, which give embedded system apps a greater execution priority than the thread priority available to apps created by third-party developers、Also, each application is executed within its own thread using a very lightweight virtual machine、Aside from the very generous SDK and the well-formed libraries that are available to us to develop with, the most exciting feature for Android developers is that we now have access to anything the operating system has access to、In other words, if you want to create an application that dials the phone, you have access to the phone’s dialer; if you want to create an application that utilizes the phone’s internalGPS (if equipped), you have access to it、The potential for developers to create dynamic and intriguing applications is now wide open、On top of all the features that are available from the Android side of the equation, Google has thrown in some very tantalizing features of its own、Developers of Android applications will be able to tie their applications into existing Google offerings such as Google Maps and the omnipresent Google Search、Suppose you want to write an application that pulls up a Google map of where an incoming call is emanating from, or you want to be able to store common search results with your contacts; the doors of possibility have been flung wide open with Android、Chapter 2 begins your journey to Android development、You will learn the how’s and why’s of using specific development environments or integrated development environments (IDE), and you will download and install the Java IDE Eclipse、Application ComponentsA central feature of Android is that one application can make use of elements of other applications (provided those applications permit it)、For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own、Your application doesn't incorporate the code of the other application or link to it、Rather, it simply starts up that piece of the other application when the need arises、For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part、Therefore, unlike applications on most other systems, Android applications don't have a single entry point for everything in the application (no main() function, for example)、Rather, they have essential components that the system can instantiate and run as needed、There are four types of components:ActivitiesAn activity presents a visual user interface for one focused endeavor the user can undertake、For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions、A text messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and other activities to review old messages or change settings、Though they work together to form a cohesive user interface, each activity is independent of the others、Each one is implemented as a subclass of the Activity base class、An application might consist of just one activity or, like the text messaging application just mentioned, it may contain several、What the activities are, and how many there are depends, of course, on the application and its design、Typically, one of the activities is marked as the first one that should be presented to the user when the application is launched、Moving from one activity to another is accomplished by having the current activity start the next one、Each activity is given a default window to draw in、Typically, the window fills the screen, but it might be smaller than the screen and float on top of other windows、An activity can also make use of additional windows — for example, a pop-up dialog that calls for a user response in the midst of the activity, or a window that presents users with vital information when they select a particular item on-screen、The visual content of the window is provided by a hierarchy of views — objects derived from the base View class、Each view controls a particular rectangular space within the window、Parent views contain and organize the layout of their children、Leaf views (those at the bottom of the hierarchy) draw in the rectangles they control and respond to user actions directed at that space、Thus, views are where the activity's interaction with the user takes place、For example, a view might display a small image and initiate an action when theuser taps that image、Android has a number of ready-made views that you can use —including buttons, text fields, scroll bars, menu items, check boxes, and more、A view hierarchy is placed within an activity's window by the Activity、setContentView() method、The content view is the View object at the root of the hierarchy、(See the separate User Interface document for more information on views and the hierarchy、)ServicesA service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time、For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it、Each service extends the Service base class、A prime example is a media player playing songs from a play list、The player application would probably have one or more activities that allow the user to choose songs and start playing them、However, the music playback itself would not be handled by an activity because users will expect the music to keep playing even after they leave the player and begin something different、To keep the music going, the media player activity could start a service to run in the background、The system would then keep the music playback service running even after the activity that started it leaves the screen、It's possible to connect to (bind to) an ongoing service (and start the service if it's not already running)、While connected, you can communicate with the service through an interface that the service exposes、For the music service, this interface might allow users to pause, rewind, stop, and restart the playback、Like activities and the other components, services run in the main thread of the application process、So that they won't block other components or the user interface, they often spawn another thread for time-consuming tasks (like music playback)、SeeProcesses and Threads, later、Broadcast receiversA broadcast receiver is a component that does nothing but receive and react to broadcast announcements、Many broadcasts originate in system code — for example, announcements that the timezone has changed, that the battery is low, that a picture has been taken, or that the user changed a language preference、Applications can also initiate broadcasts — for example, to let other applications know that some data has been downloaded to the device and is available for them to use、An application can have any number of broadcast receivers to respond to any announcements it considers important、All receivers extend the BroadcastReceiver base class、Broadcast receivers do not display a user interface、However, they may start an activity in response to the information they receive, or they may use the NotificationManager to alert the user、Notifications can get the user's attention in various ways — flashing the backlight, vibrating the device, playing a sound, and so on、They typically place a persistent icon in the status bar, which users can open to get the message、Content providersA content provider makes a specific set of the application's data available to other applications、The data can be stored in the , in an SQLite database, or in any other manner that makes sense、The content provider extends the ContentProvider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls、However, applications do not call these methods directly、Rather they use a ContentResolver object and call its methods instead、A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved、See the separate Content Providers document for more information on usingcontent providers、Whenever there's a request that should be handled by a particular component, Android makes sure that the application process of the component is running, starting it if necessary, and that an appropriate instance of the component is available, creating the instance if necessary、Key Skills & Concepts●Creating new Android projects●Working with Views●Using a TextView●Modifying the main、xml fileCreating Your First Android Project in EclipseTo start your first Android project, open Eclipse、When you open Eclipse for the first time, it opens to an empty development environment (see Figure 5-1), which is where you want to begin、Your first task is to set up and name the workspace for your application、Choose File | New | Android Project, which will launch the New Android Project wizard、CAUTION Do not select Java Project from the New menu、While Android applications are written in Java, and you are doing all of your development in Java projects, this option will create a standard Java application、Selecting Android Project enables you to create Android-specific applications、If you do not see the option for Android Project, this indicates that the Android plugin for Eclipse was not fully or correctly installed、Review the procedure in Chapter 3 for installing the Android plugin for Eclipse to correct this、The New Android Project wizard creates two things for youA shell application that ties into the Android SDK, using the android、jar file, andties the project into the Android Emulator、This allows you to code using all of the Android libraries and packages, and also lets you debug your applications in the proper environment、Your first shell files for the new project、These shell files contain some of the vital application blocks upon which you will be building your programs、In much the same way as creating a Microsoft 、NET application in Visual Studio generates some Windows-created program code in your files, using the Android Project wizard in Eclipse generates your initial program files and some Android-created code、In addition, the New Android Project wizard contains a few options, shown next, that you must set to initiate your Android project、For the Project Name field, for purposes of this example, use the title HelloWorldText、This name sufficiently distinguishes this Hello World! project from the others that you will be creating in this chapter、In the Contents area, keep the default selections: the Create New Project in Workspace radio button should be selected and the Use Default Location check box should be checked、This will allow Eclipse to create your project in your default workspace directory、The advantage of keeping the default options is that your projects are kept in a central location, which makes ordering, managing, and finding these projects quite easy、For example, if you are working in a Unix-based environment, this path points to your $HOME directory、If you are working in a Microsoft Windows environment, the workspace path will be C:/Users/<username>/workspace, as shown in the previous illustration、However, for any number of reasons, you may want to uncheck the Use Default Location check box and select a different location for your project、One reason you may want to specify a different location here is simply if you want to choose a location for this specific project that is separate from other Android projects、For example, you may want to keep the projects that you create in this book in a different location from projects that you create in the future on your own、If so, simply override the Location option to specify your own custom location directory for this project、。

毕业论文外文文献翻译Android平台上的社交应用和游戏应用来比较学习软件体系结构

毕业论文外文文献翻译Android平台上的社交应用和游戏应用来比较学习软件体系结构

毕业设计(论文)外文文献翻译文献、资料中文题目:通过开发Android平台上的社交应用和游戏应用来比较学习软件体系结构文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14通过开发Android平台上的社交应用和游戏应用来比较学习软件体系结构1.引言电脑游戏和视频游戏非常受儿童和青少年的欢迎,在年轻人的文化发挥了突出的作用[1]。

现在游戏可以在技术丰富的配备了笔记本电脑,智能手机,游戏机(移动和固定),机顶盒,和其他数字设备的环境中运行。

从这一现象,人们相信将年轻人对游戏的内在动机与教育内容和目标结合就会变成Prensky称之为“以数字游戏为基础的学习”的学习方法[2]。

青年学生生活的游戏中除了丰富的外观,游戏开发技术已经成熟,并且越来越先进[3]。

基于现有的各种游戏开发环境,游戏开发过程中的全部责任可以分为几个的专家领域和角色,如游戏程序员,3D模型的创造者,游戏设计师,音乐家,漫画家,剧作家,等等。

游戏内容与技术相结合的过程可以通过游戏引擎和使用网络上的各种用户和专家社区的可用信息得到简化。

例如,微软的XNA 游戏开发工具包提供的游戏循环函数绘制及更新游戏内容,而且还提供了方便的游戏开发组件来加载不同格式的图形,音频和视频。

这使得游戏迷们如无论有没有编程背景的学生修改现有的游戏或开发新游戏。

他们可以用这些游戏创作工具实现自己的游戏概念设计,学习发展技能和相关知识,积累相关的实际经验。

在这种情况下,不但游戏可以用于学习而且通过激发任务机制,游戏开发工具可以用来研究计算机科学(CS),软件工程(SE),和游戏编程相关主题。

一般来说,游戏可以用三种方式集成在教育中[4,5]。

首先,游戏可以用来代替传统的练习,鼓励学生把额外的努力用来做练习,给老师或助教一个实时地监控学生是如何练习的机会[6,7]。

第二,游戏可以作为一个讲座的一部分来促进学生的参与,增加学生的动力[8,9]。

毕业论文--基于Android 无线电子菜谱系统开发(含外文翻译)

毕业论文--基于Android 无线电子菜谱系统开发(含外文翻译)

基于Android 无线电子菜谱系统开发(服务器端)摘要今天我们生活在充满数字的时代,随着GPRS、WLAN等无线技术的突飞猛进,移动生活、移动办公逐渐由概念转为现实,信息数据随手可及。

特别是无线数据传输技术的成熟,运营商的大力推广,WLAN的应用日渐普及,并日益影响到人们生活的方方面面,种种梦想化为现实成为了可能。

对于传统的餐饮业而言,利用无线网络技术实现点餐系统也成为了现实。

基于Android的无线点餐系统,使用当下较为流行的Android平台,通过和服务器之间的WLAN无线通信实现了灵活、高效、便捷的管理系统,优化了点餐和管理流程,使餐厅的服务和管理得到实质性的提升,提高了品牌形象和核心竞争力。

本文详细描述了基于Android无线电子菜谱系统服务器端的需求分析和系统设计,利用Struts、Spring、Hibernate和Axis2实现了一套无线点餐的Web端后台管理系统,同时向系统外部发布包括用户登录,餐桌管理,点菜管理、并台管理、转台管理、查台管理、结台管理、更新管理等的Web Service接口,方便用户在包括Android等在内的各种平台上调用,以实现无线点餐的功能。

最后对该系统的特点进行了总结,并展望了其未来的发展方向。

关键词: 无线通信;Android;服务器端;Web Service 餐饮Development of Wireless Order System based onAndroid (Service Side)AbstractToday we live in a digital era, with the rapid progress of the GPRS, WLAN and other wireless technologies, mobile life; mobile office gradually becomes to true from concept, you can get the information and data everywhere. In particular, the growing popularity of wireless data transmission technology matures, the promotion efforts of the operators, the popularity of WLAN applications grows, and is increasingly affecting all aspects of people's lives, it’s possible for all kinds of dreams comes into reality. As for traditional catering industry, the use of wireless network technology to achieve ordering system has also becomes to reality.Android-based wireless ordering system, using the popular Android platform, build a flexible, efficient and convenient management system to optimize the ordering and management process through wireless communications between the WLAN and server, this will increase the restaurant service and management substantial and improve brand image and core competitiveness.This paper describes in detail the contents of the requirement and system design of Wireless Ordering System, Use of Struts, Spring, Hibernate and Axis2 Web side of the back-office management system, and release the user logon, table management, ordering management, combination management, change table management, check table management, settle accounts management, update management, and other Web Service interface, it can be called on a variety of platforms, including Android, etc., in order to achieve a wireless ordering function. This paper finally summarizes the system characteristics and prospects of its future development.Keywords: Wireless communication; Android; server; Web Service目录1 引言 (1)1.1 选题背景和意义 (1)1.2 无线点餐系统简介 (2)1.3 本文的主要工作及组织结构 (2)1.3.1 本文的主要工作: (2)1.3.2 本文的组织结构 (3)2 需求分析 (4)2.1 功能需求 (4)2.2 用户群体描述 (5)2.3业务流程分析 (6)2.3.1访客浏览 (6)2.3.2 点菜流程 (6)2.3.3结账流程 (7)2.3.4管理用户信息 (8)2.4 数据通讯 (8)3 概要设计 (10)3.1 系统结构设计 (10)3.2 总体功能模块设计 (11)3.3 模块功能概要设计 (11)3.3.1 菜单管理模块 (11)3.3.2 餐桌管理模块 (12)3.3.3 订单管理模块 (12)3.3.4 用户管理模块 (12)3.3.5 Web Service接口 (12)4 数据库设计 (13)4.1 数据库的需求分析 (13)4.2 数据库概念设计 (13)4.3 数据库逻辑设计 (15)4.4 数据库的实现 (15)5 详细设计 (18)5.1 菜单管理模块设计 (19)5.1.1 整体设计 (19)5.1.2 管理员输入信息的传递 (19)5.2订单管理模块设计 (20)5.2.1 整体设计 (20)5.2.2 用户点餐功能 (21)5.2.3 邮件通知功能 (21)5.2.4 换桌、并桌功能 (21)5.2.4 结账功能 (22)5.3 用户管理模块设计 (22)5.3.1 整体设计 (22)5.3.2 用户注册功能 (22)5.3.3 角色管理功能 (22)5.3.3 个人信息修改功能 (22)5.4 Web Service 接口设计 (22)6 系统实现 (24)6.1 开发环境及相关技术 (24)6.2 功能模块的实现 (26)6.2.1 菜单管理功能模块的实现 (26)6.3 点菜功能模块的实现 (27)6.3.1 添加菜品的实现 (27)6.3.2 邮件通知的实现 (28)6.4 主要界面 (28)6.5 数据库操作 (34)7 测试报告 (37)7.1 测试方案 (37)7.2 测试项目 (37)7.3 主要测试用例 (38)7.4 测试进度 (40)7.5 测试方法 (41)7.6 测试结果分析 (41)7.6.1 测试的局限性 (41)7.6.2 评价测试结果的准则 (41)总结 (42)致谢 (43)参考文献 (44)附录A 译文 (45)附录B 外文原文 (51)1 引言本章主要简述无线点餐系统的选题背景和意义,并对本文的工作和组织结构做了介绍。

android文献中英对照

android文献中英对照

英文原文Application FundamentalsAndroid applications are written in the Java programming language. The compiled Java code —along with any data and resource files required by the application —is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.In many ways, each Android application lives in its own world:(1)By default, every application runs in its own Linux process. Android starts the process when any of the application's code needs to be executed, and shuts down the process when it's no longer needed and system resources are required by other applications.(2)Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications.(3)By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only to that user and only to the application itself — although there are ways to export them to other applications as well.It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can also arrange to run in the same Linux process, sharing the same VM.Application ComponentsA central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Your application doesn'tincorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises.For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part. Therefore, unlike applications on most other systems, Android applications don't have a single entry point for everything in the application (no main() function, for example). Rather, they have essential components that the system can instantiate and run as needed. There are four types of components:(1)ActivitiesAn activity presents a visual user interface for one focused endeavor the user can undertake. For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions. A text messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and other activities to review old messages or change settings. Though they work together to form a cohesive user interface, each activity is independent of the others. Each one is implemented as a subclass of the Activity base class.An application might consist of just one activity or, like the text messaging application just mentioned, it may contain several. What the activities are, and how many there are depends, of course, on the application and its design. Typically, one of the activities is marked as the first one that should be presented to the user when the application is launched. Moving from one activity to another is accomplished by having the current activity start the next one.Each activity is given a default window to draw in. Typically, the window fills the screen, but it might be smaller than the screen and float on top of other windows. An activity can also make use of additional windows — for example, a pop-up dialog that calls for a user response in the midst of the activity, or a window that presents users with vital information when they select a particular item on-screen.The visual content of the window is provided by a hierarchy of views — objects derived from the base View class. Each view controls a particular rectangular spacewithin the window. Parent views contain and organize the layout of their children. Leaf views (those at the bottom of the hierarchy) draw in the rectangles they control and respond to user actions directed at that space. Thus, views are where the activity's interaction with the user takes place.For example, a view might display a small image and initiate an action when the user taps that image. Android has a number of ready-made views that you can use —including buttons, text fields, scroll bars, menu items, check boxes, and more.A view hierarchy is placed within an activity's window by the Activity.setContentView() method. The content view is the View object at the root of the hierarchy. (See the separate User Interface document for more information on views and the hierarchy.)(2)ServicesA service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time. For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it. Each service extends the Service base class.A prime example is a media player playing songs from a play list. The player application would probably have one or more activities that allow the user to choose songs and start playing them. However, the music playback itself would not be handled by an activity because users will expect the music to keep playing even after they leave the player and begin something different. To keep the music going, the media player activity could start a service to run in the background. The system would then keep the music playback service running even after the activity that started it leaves the screen.It's possible to connect to (bind to) an ongoing service (and start the service if it's not already running). While connected, you can communicate with the service through an interface that the service exposes. For the music service, this interface might allow users to pause, rewind, stop, and restart the playback.Like activities and the other components, services run in the main thread of theapplication process. So that they won't block other components or the user interface, they often spawn another thread for time-consuming tasks (like music playback). See Processes and Threads, later.(3)Broadcast receiversA broadcast receiver is a component that does nothing but receive and react to broadcast announcements. Many broadcasts originate in system code — for example, announcements that the timezone has changed, that the battery is low, that a picture has been taken, or that the user changed a language preference. Applications can also initiate broadcasts — for example, to let other applications know that some data has been downloaded to the device and is available for them to use.An application can have any number of broadcast receivers to respond to any announcements it considers important. All receivers extend the BroadcastReceiver base class.Broadcast receivers do not display a user interface. However, they may start an activity in response to the information they receive, or they may use the NotificationManager to alert the user. Notifications can get the user's attention in various ways — flashing the backlight, vibrating the device, playing a sound, and so on. They typically place a persistent icon in the status bar, which users can open to get the message.(4)Content providersA content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. The content provider extends the ContentProvider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead. A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved.See the separate Content Providers document for more information on using content providers.Whenever there's a request that should be handled by a particular component, Android makes sure that the application process of the component is running, starting it if necessary, and that an appropriate instance of the component is available, creating the instance if necessary.Activating components: intentsContent providers are activated when they're targeted by a request from a ContentResolver. The other three components —activities, services, and broadcast receivers — are activated by asynchronous messages called intents. An intent is an Intent object that holds the content of the message. For activities and services, it names the action being requested and specifies the URI of the data to act on, among other things. For example, it might convey a request for an activity to present an image to the user or let the user edit some text. For broadcast receivers, the Intent object names the action being announced. For example, it might announce to interested parties that the camera button has been pressed.There are separate methods for activating each type of component:(1)An activity is launched (or given something new to do) by passing an Intent object to Context.startActivity() or Activity.startActivityForResult(). The responding activity can look at the initial intent that caused it to be launched by calling its getIntent() method. Android calls the activity's onNewIntent() method to pass it any subsequent intents. One activity often starts the next one. If it expects a result back from the activity it's starting, it calls startActivityForResult() instead of startActivity(). For example, if it starts an activity that lets the user pick a photo, it might expect to be returned the chosen photo. The result is returned in an Intent object that's passed to the calling activity's onActivityResult() method.(2)A service is started (or new instructions are given to an ongoing service) by passing an Intent object to Context.startService(). Android calls the service's onStart() method and passes it the Intent object. Similarly, an intent can be passed to Context.bindService() to establish an ongoing connection between the calling component and a target service. The service receives the Intent object in an onBind() call. (If the service is not already running, bindService() can optionally start it.) Forexample, an activity might establish a connection with the music playback service mentioned earlier so that it can provide the user with the means (a user interface) for controlling the playback. The activity would call bindService() to set up that connection, and then call methods defined by the service to affect the playback.A later section, Remote procedure calls, has more details about binding to a service.(3)An application can initiate a broadcast by passing an Intent object to methods like Context.sendBroadcast(), Context.sendOrderedBroadcast(), and Context.sendStickyBroadcast() in any of their variations.Android delivers the intent to all interested broadcast receivers by calling their onReceive() methods. For more on intent messages, see the separate article, Intents and Intent Filters.Shutting down componentsA content provider is active only while it's responding to a request from a ContentResolver. And a broadcast receiver is active only while it's responding to a broadcast message. So there's no need to explicitly shut down these components.Activities, on the other hand, provide the user interface. They're in a long-running conversation with the user and may remain active, even when idle, as long as the conversation continues. Similarly, services may also remain running for a long time. So Android has methods to shut down activities and services in an orderly way:An activity can be shut down by calling its finish() method. One activity can shut down another activity (one it started with startActivityForResult()) by calling finishActivity().A service can be stopped by calling its stopSelf() method, or by calling Context.stopService().Components might also be shut down by the system when they are no longer being used or when Android must reclaim memory for more active components. A later section, Component Lifecycles, discusses this possibility and its ramifications in more detail.The manifest fileBefore Android can start an application component, it must learn that the component exists. Therefore, applications declare their components in a manifest file that's bundled into the Android package, the .apk file that also holds the application's code, files, and resources.The manifest is a structured XML file and is always named AndroidManifest.xml for all applications. It does a number of things in addition to declaring the application's components, such as naming any libraries the application needs to be linked against (besides the default Android library) and identifying any permissions the application expects to be granted.But the principal task of the manifest is to inform Android about the application's components.Intent filtersAn Intent object can explicitly name a target component. If it does, Android finds that component (based on the declarations in the manifest file) and activates it. But if a target is not explicitly named, Android must locate the best component to respond to the intent. It does so by comparing the Intent object to the intent filters of potential targets. A component's intent filters inform Android of the kinds of intents the component is able to handle. Like other essential information about the component, they're declared in the manifest file.A component can have any number of intent filters, each one declaring a different set of capabilities. If it doesn't have any filters, it can be activated only by intents that explicitly name the component as the target.For a broadcast receiver that's created and registered in code, the intent filter is instantiated directly as an IntentFilter object. All other filters are set up in the manifest.For more on intent filters, see a separate document, Intents and Intent Filters.中文译文应用程序基础Android DevelopersAndroid应用程序使用Java编程语言开发。

通信工程专业基于Android应用的无处不在的智能家居系统毕业论文外文文献翻译及原文

通信工程专业基于Android应用的无处不在的智能家居系统毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译文献、资料中文题目:基于Android应用的无处不在的智能家居系统文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院(部):专业:通信工程班级:姓名:学号:指导教师:翻译日期: 2017.02.14毕业设计外文翻译毕业设计题目基于ANDRIO的智能家居系统的设计与实现外文题目UBIQUITOUS SMART HOME SYSTEM USING ANDROID APPLICATIONInternational Journal of Computer Networks & Communications (IJCNC) V ol.6, No.1, January 2014基于Android应用的无处不在的智能家居系统Shiu KumarDepartment of Information Electronics Engineering, Mokpo National University,534-729, Mokpo, South Korea摘要本文提出了一种灵活独立的,低成本的智能家居系统,它是基于Android应用与微web服务器通信,不仅仅提供交换功能。

Arduino以太网的使用是为了避免使用个人电脑从而保证整个系统成本最低,语音激活时用来实现切换功能的。

光开关,电源插头,温度传感器,湿度传感器,电流传感器,入侵检测传感器,烟雾/气体传感器和警报器等这些设备集成在系统中,表明了所提出的智能家居系统的有效性和可行性。

经过检测,智能家居应用程序可以成功地进行智能家居操作,例如开关功能,自动环境监测,和入侵监测,在监测到有不法入侵后,系统会自动发送一个邮件,并响警笛。

关键字:Android智能手机,智能家居,物联网(loTs),远程控制1.引言随着移动设备受欢迎程度的不断增长和人们日常生活中对无处不在的先进的移动应用的功能需求不断增加,利用Web服务是提供远程访问服务的最开放和可互操作的方式,并且使应用程序能够彼此通信。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

AndroidAndroid, as a system, is a Java-based operating system that runs on the Linux 2.6 kernel. The system is very lightweight and full featured. Android applications are developed using Java and can be ported rather easily to the new platform. If you have not yet downloaded Java or are unsure about which version you need, I detail the installation of the development environment in Chapter 2. Other features of Android include an accelerated 3-D graphics engine (based on hardware support), database support powered by SQLite, and an integrated web browser.If you are familiar with Java programming or are an OOP developer of any sort, you are likely used to programmatic user interface (UI) development—that is, UI placement which is handled directly within the program code. Android, while recognizing and allowing for programmatic UI development, also supports the newer, XML-based UI layout. XML UI layout is a fairly new concept to the average desktop developer. I will cover both the XML UI layout and the programmatic UI development in the supporting chapters of this book.One of the more exciting and compelling features of Android is that, because of its architecture, third-party applications—including those that are “home grown”—are executed with the same system priority as those that are bundled with the core system. This is a major departure from most systems, which give embedded system apps a greater execution priority than the thread priority available to apps created by third-party developers. Also, each application is executed within its own thread using a very lightweight virtual machine.Aside from the very generous SDK and the well-formed libraries that are available to us to develop with, the most exciting feature for Android developers is that we now have access to anything the operating system has access to. In other words, if you want to create an application that dials the phone, you have access to the phone’s dialer; if you want to create an application that utilizes the phone’s internal GPS (if equipped), you have access to it. The potential for developers to create dynamic and intriguing applications is now wide open.On top of all the features that are available from the Android side of the equation, Google has thrown in some very tantalizing features of its own. Developers of Android applications will be able to tie their applications into existing Google offerings such as Google Maps and the omnipresent Google Search. Suppose you want to write an application that pulls up a Google map of where an incoming call is emanating from, or you want to be able to store common search results with your contacts; the doors of possibility have been flung wide open with Android.Chapter 2 begins your journey to Android development. You will learn the how’s and why’s of using specific development environments or integrated development environments (IDE), and you will download and install the Java IDE Eclipse.Application ComponentsA central feature of Android is that one application can make use of elements of other applications (provided those applications permit it). For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Your application doesn't incorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises.For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part. Therefore, unlike applications on most other systems, Android applications don't have a single entry point for everything in the application (no main() function, for example). Rather, they have essential components that the system can instantiate and run as needed. There are four types of components:ActivitiesAn activity presents a visual user interface for one focused endeavor the user can undertake. For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions. A text messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and otheractivities to review old messages or change settings. Though they work together to form a cohesive user interface, each activity is independent of the others. Each one is implemented as a subclass of the Activity base class.An application might consist of just one activity or, like the text messaging application just mentioned, it may contain several. What the activities are, and how many there are depends, of course, on the application and its design. Typically, one of the activities is marked as the first one that should be presented to the user when the application is launched. Moving from one activity to another is accomplished by having the current activity start the next one.Each activity is given a default window to draw in. Typically, the window fills the screen, but it might be smaller than the screen and float on top of other windows. An activity can also make use of additional windows — for example, a pop-up dialog that calls for a user response in the midst of the activity, or a window that presents users with vital information when they select a particular item on-screen.The visual content of the window is provided by a hierarchy of views — objects derived from the base View class. Each view controls a particular rectangular space within the window. Parent views contain and organize the layout of their children. Leaf views (those at the bottom of the hierarchy) draw in the rectangles they control and respond to user actions directed at that space. Thus, views are where the activity's interaction with the user takes place.For example, a view might display a small image and initiate an action when the user taps that image. Android has a number of ready-made views that you can use — including buttons, text fields, scroll bars, menu items, check boxes, and more.A view hierarchy is placed within an activity's window by the Activity.setContentView() method. The content view is the View object at the root of the hierarchy. (See the separate User Interface document for more information on views and the hierarchy.)ServicesA service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time. For example, a service might play background musicas the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it. Each service extends the Service base class.A prime example is a media player playing songs from a play list. The player application would probably have one or more activities that allow the user to choose songs and start playing them. However, the music playback itself would not be handled by an activity because users will expect the music to keep playing even after they leave the player and begin something different. To keep the music going, the media player activity could start a service to run in the background. The system would then keep the music playback service running even after the activity that started it leaves the screen.It's possible to connect to (bind to) an ongoing service (and start the service if it's not already running). While connected, you can communicate with the service through an interface that the service exposes. For the music service, this interface might allow users to pause, rewind, stop, and restart the playback.Like activities and the other components, services run in the main thread of the application process. So that they won't block other components or the user interface, they often spawn another thread for time-consuming tasks (like music playback). See Processes and Threads, later.Broadcast receiversA broadcast receiver is a component that does nothing but receive and react to broadcast announcements. Many broadcasts originate in system code — for example, announcements that the timezone has changed, that the battery is low, that a picture has been taken, or that the user changed a language preference. Applications can also initiate broadcasts — for example, to let other applications know that some data has been downloaded to the device and is available for them to use.An application can have any number of broadcast receivers to respond to any announcements it considers important. All receivers extend the BroadcastReceiver base class.Broadcast receivers do not display a user interface. However, they may start anactivity in response to the information they receive, or they may use the NotificationManager to alert the user. Notifications can get the user's attention in various ways — flashing the backlight, vibrating the device, playing a sound, and so on. They typically place a persistent icon in the status bar, which users can open to get the message.Content providersA content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. The content provider extends the ContentProvider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead. A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved.See the separate Content Providers document for more information on using content providers.Whenever there's a request that should be handled by a particular component, Android makes sure that the application process of the component is running, starting it if necessary, and that an appropriate instance of the component is available, creating the instance if necessary.Key Skills & Concepts●Creating new Android projects●Working with Views●Using a TextView●Modifying the main.xml fileCreating Your First Android Project in EclipseTo start your first Android project, open Eclipse. When you open Eclipse for the first time, it opens to an empty development environment (see Figure 5-1), which is where you want to begin. Your first task is to set up and name the workspace for your application. Choose File | New | Android Project, which will launch the New AndroidProject wizard.CAUTION Do not select Java Project from the New menu. While Android applications are written in Java, and you are doing all of your development in Java projects, this option will create a standard Java application. Selecting Android Project enables you to create Android-specific applications.If you do not see the option for Android Project, this indicates that the Android plugin for Eclipse was not fully or correctly installed. Review the procedure in Chapter 3 for installing the Android plugin for Eclipse to correct this.The New Android Project wizard creates two things for youA shell application that ties into the Android SDK, using the android.jar file, and ties the project into the Android Emulator. This allows you to code using all of the Android libraries and packages, and also lets you debug your applications in the proper environment.Your first shell files for the new project. These shell files contain some of the vital application blocks upon which you will be building your programs. In much the same way as creating a Microsoft .NET application in Visual Studio generates some Windows-created program code in your files, using the Android Project wizard in Eclipse generates your initial program files and some Android-created code. In addition, the New Android Project wizard contains a few options, shown next, that you must set to initiate your Android project. For the Project Name field, for purposes of this example, use the title HelloWorldText. This name sufficiently distinguishes this Hello World! project from the others that you will be creating in this chapter.In the Contents area, keep the default selections: the Create New Project in Workspace radio button should be selected and the Use Default Location check box should be checked. This will allow Eclipse to create your project in your default workspace directory. The advantage of keeping the default options is that your projects are kept in a central location, which makes ordering, managing, and finding these projects quite easy. For example, if you are working in a Unix-based environment, this path points to your $HOME directory.If you are working in a Microsoft Windows environment, the workspace pathwill be C:/Users/<username>/workspace, as shown in the previous illustration. However, for any number of reasons, you may want to uncheck the Use Default Location check box and select a different location for your project. One reason you may want to specify a different location here is simply if you want to choose a location for this specific project that is separate from other Android projects. For example, you may want to keep the projects that you create in this book in a different location from projects that you create in the future on your own. If so, simply override the Location option to specify your own custom location directory for this project.。

相关文档
最新文档