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应用基础毕设论文外文翻译

Android应用基础毕设论文外文翻译Android ns are developed using the Java programming language。

The Android SDK tools are used to compile the code。

data。

and resource files into an Android package。

which is an archive file with an。

apk n。

A single。

apk file contains all the code for an n and is used by Android-powered devices to install the n.After n。

each Android n XXX。

The Android operating system is a multi-user Linux system。

and each n is treated as a separate user。

By default。

the system assigns a unique Linux user ID to each n。

which is only known to the system and not to the n。

The system sets ns for all files in an n。

so that only the user ID assigned to that n can access them.Furthermore。

each process has its own virtual machine (VM)。

which means that an n's code XXX that an n's code cannot interfere with the code of other ns.By default。

Android外文文献翻译

Android外文文献翻译

An droid Applicati on Fun dame ntalsAn droid applicatio ns are writte n in the Java program ming Ian guage. The An droid SDK tools compile the code— along with any data and resource file—into an An droid package, an archive file with an .apk suffix. All the code in a single .apk file is considered to be one applicatio n and is the file that An droid-powered devices use to in stall the applicatio n.Once in stalled on a device, each An droid applicati on lives in its own security san dbox:The An droid operati ng system is a multi-user Linux system in which each applicatio n is a differe nt user.By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.Each process has its own virtual machine (VM), so an application's code runs in isolation from other applicati ons.By default, every applicatio n runs in its own Linux process. An droid starts the process whe n any of the applicati on's comp onents n eed to be executed, the n shuts dow n the process whe n it's no Ion ger n eeded or whe n the system must recover memory for other applicati ons. In this way, the An droid system impleme nts thepri nciple of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure en vir onment in which an applicati on cannot access parts of the system for which it is not give n permissi on.However, there are ways for an applicati on to share data with other applicati ons and for an applicati on to access system services:It's possible to arrange for two applicati ons to share the same Linux user ID, in which case they are able to access each other's files. To con serve system resources, applicati ons with the same user ID can also arrange to run in the same Linux process and share the same VM (the applications must also be signed with the same certificate).An applicatio n can request permissi on to access device data such as the user's con tacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. All applicatio n permissi ons must be gran ted by the user at in stall time.That covers the basics regardi ng how an An droid applicati on exists withi n the system. The rest of this docume nt in troduces you to:1、The core framework components that define your application.2、The manifest file in which you declare components and required device features for your applicati on.3、Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of device con figurati ons.Applicati on Comp onentsApplicatio n comp onents are the esse ntial build ing blocks of an An droid applicati on. Each comp onent is a differe nt point through which the system can en ter your applicati on. Not all comp onents are actual entry points for the user and some depe nd on each other, but each one exists as its own entity and plays a specific ro—each one is a unique building block that helps define your application's overall behavior.There are four differe nt types of applicati on comp onen ts. Each type serves a disti net purpose and has a distinct lifecycle that defines how the component is created and destroyed.Here are the four types of applicati on comp onen ts:ActivitiesAn activity represe nts a sin gle scree n with a user in terface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experie nee in the email applicati on, each one is in depe ndent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email applicati on that composes new mail, in order for the user to share a picture.An activity is implemented as a subclass oActivity and you can leann more about it in the Activities developer guide.ServicesA serviceis a comp onent that runs in the backgro und to perform long-running operatio nsor to perform work for remote processes.A service does not provide a user in terface. Forexample, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to in teract with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider man ages a shared set of applicati on data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the An droid system provides a content provider that man ages the user's con tact in formati on. As such, any applicati on with the proper permissi ons can query part of the content provider (such a Con tactsC on tract.Data) to read and write in formati on about a particular pers on.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save no tes.A content provider is implemented as a subclass o ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more in formati on, see the Co ntent Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announ ceme nts. Many broadcasts orig in ate from the system— for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user in terface, they may reate a status bar notificati on to alert the user whe n a broadcast eve nt occurs. More com monly, though, a broadcast receiver is just a "gateway" to other comp onents and is inten ded to do a very mini mal amount of work. For in sta nee, it might in itiate a service to perform some work based on the eve nt.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to itin order to interact with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database,on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such a C s ontactsContract.Data ) to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sample application uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developer guide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.。

Android外文文献翻译

Android外文文献翻译

A n d r o i d外文文献翻译 Company number:【0089WT-8898YT-W8CCB-BUUT-202108】Android Application FundamentalsAndroid applications are written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, an archive file with an.apksuffix. All the code in a single.apkfile is considered to be one application and is the file that Android-powered devices use to install the application.Once installed on a device, each Android application lives in its own security sandbox:The Android operating system is a multi-user Linux system in which each application is a different user.By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications.By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission.However, there are ways for an application to share data with other applications and for an application to access system services:It's possible to arrange for two applications to share the same Linux user ID, in which case they are able to access each other's files. To conserve system resources, applications with the same user ID can also arrange to run in the same Linux process and share the same VM (the applications must also be signed with the same certificate).An application can request permission to access device data such as the user's contacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. All application permissions must be granted by the user at install time.That covers the basics regarding how an Android application exists within the system. The rest of this document introduces you to:1、The core framework components that define your application.2、The manifest file in which you declare components and required device features for your application.3、Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of device configurations.Application ComponentsApplication components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.Here are the four types of application components:ActivitiesAn activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, a different application can start any one of these activities (if the email application allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture.An activity is implemented as a subclass ofand you can learn more about it in thedeveloper guide.ServicesA service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it.A service is implemented as a subclass of and you can learn more about it in thedeveloper guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a content provider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such as to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the sample application uses a content provider to save notes.A content provider is implemented as a subclass ofand must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the developer guide.Broadcast receiversAbroadcast receiveris a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 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.Although broadcast receivers don't display a user interface, they mayto alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.A broadcast receiver is implemented as a subclass of and each broadcast is delivered as an object. For more information, see the class.A unique aspect of the Android system design is that any application can start another application’s component. For example, i f you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. When complete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application.When the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera application that captures a photo, that activity runs in the process that belongs to the camera application, not in your application's process. Therefore, unlike applications on most other systems, Android applications don't have a single entry point (there's nomain()function, for example).Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.Activating ComponentsThree of the four component types—activities, services, and broadcast receivers—are activated by an asynchronous message called an intent. Intents bind individual components to each other at runtime (you can think of them as the messengersthat request an action from other components), whether the component belongs to your application or another.An intent is created with an object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.For activities and services, an intent defines the action to perform (for example, to "view" or "send" something) and may specify the URI of the data to act on (among other things that the component being started might need to know). For example, an intent might convey a request for an activity to show an image or to open a web page. In some cases, you can start an activity to receive a result, in which case, the activity also returns the result in an(for example, you can issue an intent to let the user pick a personal contact and have it returned to you—the return intent includes a URI pointing to the chosen contact).For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").The other component type, content provider, is not activated by intents. Rather, it is activated when targeted by a request from a. T he content resolver handles all direct transactions with the content provider so that the component that's performing transactions with the provider doesn't need to and instead calls methods on the object. This leaves a layer of abstraction between the content provider and the component requesting information (for security).There are separate methods for activating each type of component:You can start an activity (or give it something new to do) by passing antoor(when you want the activity to return a result).You can start a service (or give new instructions to an ongoing service) by passing anto. Or you can bind to the service by passing an to.You can initiate a broadcast by passing anto methods like,, or.You can perform a query to a content provider by calling on a.For more information about using intents, see the document. More information about activating specific components is also provided in the following documents:,,and.Declaring componentsThe primary task of the manifest is to inform the system about the application's components. For example, a manifest file can declare an activity as follows:In the?element, the android:icon attribute points to resources for an icon that identifies the application.In theelement, theandroid:name at tribute specifies the fu lly qualified class name of the subclass and theandroid:label attributes specifies a string to use as the user-visible label for the activity.You must declare all application components this way:1、elements for activities2、elements for services3、elements for broadcast receivers4、elements for content providersActivities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run. However, broadcast receivers can be either declared in the manifest or created dynamically in code (as objects) and registered with the system by calling.Declaring component capabilitiesAs discussed above, in, you can use anto start activities, services, and broadcast receivers. You can do so by explicitly naming the target component (using the component class name) in the intent. However, the real power of intents lies in the concept of intent actions. With intent actions, you simply describe the type of action you want to perform (and optionally, the data upon whi ch you’d like to perform the action) and allow the system to find a component on the device that can perform the action and start it. If there are multiple components that can perform the action described by the intent, then the user selects which one to use.The way the system identifies the components that can respond to an intent is by comparing the intent received to the intent filters provided in the manifest file of other applications on the device.When you declare a component in your application's manifest, you can optionally include intent filters that declare the capabilities of the component so it can respond to intents from other applications. You can declare an intent filter for your component by adding an element as a child of the component's declaration element.For example, an email application with an activity for composing a new email might declare an intent filter in its manifest entry to respond to "send" intents (in order to send email). An activity in your application can then create an intent with the “send” action(), which the system matches to the email application’s “send” activity and launches it when you invoke the intent with.For more about creating intent filters, see thedocument.Declaring application requirementsThere are a variety of devices powered by Android and not all of them provide the same features and capabilities. In order to prevent your application from being installed on devices that lack features needed by your application, it's important that you clearly define a profile for the types of devices your application supports by declaring device and software requirements in your manifest file. Most of these declarations are informational only and the system does not read them, but external services such as Google Play do read them in order to provide filtering for users when they search for applications from their device.For example, if your application requires a camera and uses APIs introduced in Android (7), you should declare these as requirements in your manifest file. That way, devices that do not have a camera and have an Android version lower than cannot install your application from Google Play.However, you can also declare that your application uses the camera, but does not require it. In that case, your application must perform a check at runtime to determine if the device has a camera and disable any features that use the camera if one is not available.Here are some of the important device characteristics that you should consider as you design and develop your application:Screen size and densityIn order to categorize devices by their screen type, Android defines two characteristics for each device: screen size (the physical dimensions of the screen) and screen density (the physical density of the pixels on the screen, or dpi—dots per inch). To simplify all the different types of screen configurations, the Android system generalizes them into select groups that make them easier to target.The screen sizes are: small, normal, large, and extra large.The screen densities are: low density, medium density, high density, and extra high density.By default, your application is compatible with all screen sizes and densities, because the Android system makes the appropriate adjustments to your UI layout and image resources. However, you should create specialized layouts for certain screen sizes and provide specialized images for certain densities, using alternative layout resources, and by declaring in your manifest exactly which screen sizes your application supports with the?element.For more information, see the?document.Input configurationsMany devices provide a different type of user input mechanism, such as a hardware keyboard, a trackball, or a five-way navigation pad. If your application requires a particular kind of input hardware, then you should declare it in your manifest withthe?element. However, it is rare that an application should require a certain input configuration.Device featuresThere are many hardware and software features that may or may not exist on a given Android-powered device, such as a camera, a light sensor, bluetooth, a certain version of OpenGL, or the fidelity of the touchscreen. You should never assume that a certain feature is available on all Android-powered devices (other than the availability of the standard Android library), so you should declare any features used by your application with theelement.Platform VersionDifferent Android-powered devices often run different versions of the Android platform, such as Android or Android . Each successive version often includes additional APIs not available in the previous version. In order to indicate which set of APIs are available, each platform version specifies an(for example, Android is API Level 1 and Android is API Level 9). If you use any APIs that were added to the platform after version , you should declare the minimum API Level in which those APIs were introduced using theelement.It's important that you declare all such requirements for your application, because, when you distribute your application on Google Play, the store uses these declarations to filter which applications are available on each device. As such, your application should be available only to devices that meet all your application requirements.For more information about how Google Play filters applications based on these (and other) requirements, see the document.Application ResourcesAn Android application is composed of more than just code—it requires resources that are separate from the source code, such as images, audio files, and anything relating to the visual presentation of the application. For example, you should define animations, menus, styles, colors, and the layout of activity user interfaces with XML files. Using application resources makes it easy to update various characteristics ofyour application without modifying code and—by providing sets of alternative resources—enables you to optimize your application for a variety of device configurations (such as different languages and screen sizes).For every resource that you include in your Android project, the SDK build tools define a unique integer ID, which you can use to reference the resource from your application code or from other resources defined in XML. For example, if your application c ontains an image file named? (saved in the res/drawable/ directory), the SDK tools generate a resource IDOne of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations. For example, by defining UI strings in XML, you can translate the strings into other languages and save those strings in separate files. Then, based on a language qualifier that you append to the resource directory's name (such as res/values-fr/ for French string values) and the user's language setting, the Android system applies the appropriate language strings to your UI.Android supports many different qualifiers for your alternative resources. The qualifier is a short string that you include in the name of your resource directories in order to define the device configuration for which those resources should be used. As another example, you should often create different layouts for your activities, depending on the device's screen orientation and size. For example, when the device screen is in portrait orientation (tall), you might want a layout with buttons to be vertical, but when the screen is in landscape orientation (wide), the buttons should be aligned horizontally. To change the layout depending on the orientation, you can define two different layouts and apply the appropriate qualifier to each layout's directory name. Then, the system automatically applies the appropriate layout depending on the current device orientation.For more about the different kinds of resources you can include in your application and how to create alternative resources for various device configurations, see thedeveloper guide.安卓应用基础在Java编程语言编写的Android应用程序的Android的SDK工具编译代码以及与任何数据和到一个Android的包,一个归档文件档案资源的.apk后缀,所有的在一个单一的代码.apk文件被认为是一个应用程序,是Android的文件,供电设备来安装应用程序。

基于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 Androiddevelopers 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 usin g 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 responsein 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 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 musicplayback 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 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 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 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, 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 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 Projectwizard 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 Application FundamentalsAndroid applications are written in the Java programming language. The Android SDK tools compile the code-along with any data and resource files—into an Android package,an archive file with an .apk suffix。

All the code in a single 。

apk file is considered to be one application and is the file that Android—powered devices use to install the application.Once installed on a device,each Android application lives in its own security sandbox:The Android operating system is a multi-user Linux system in which each application is a different user.By default,the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application)。

The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.Each process has its own virtual machine (VM),so an application's code runs in isolation from other applications。

Android应用基础毕设论文外文翻译

Android应用基础毕设论文外文翻译

英文文献原文:Android Application Fundamentals Androidapplicationsare written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, anarchive filewith an .apk suffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.Once installed on a device, each Android application lives in its own security sandbox:∙The Android operating system is a multi-user Linux system in which each application is a different user.∙By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). Thesystem sets permissions for all the files in an application so that only the user ID assigned to that application can access them.∙Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications.∙By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission. However, there are ways for an application to share data with other applications and for an application to access system services:∙It's possible to arrange for two applications to share the same Linux user ID, in which case they are able to access each other's files. To conserve system resources, applications with the same user ID can also arrange to run in the same Linux process and share the same VM (the applications must also be signed with the same certificate).∙An application can request permission to access device data such as the user's contacts, SMS messages, the mountable storage (SD card), camera,Bluetooth, and more. All application permissions must be granted by the user at install time.That covers the basics regarding how an Android application exists within the system. The rest of this document introduces you to:∙The core framework components that define your application.∙The manifest file in which you declare components and required device features for your application.∙Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of deviceconfigurations.Application ComponentsApplication components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.Here are the four types of application components:ActivitiesAn activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails.Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, adifferent application can start any one of these activities (if the emailapplication allows it). For example, a camera application can start the activity in the email application that composes new mail, in order for the user to sharea picture.An activity is implemented as a subclass of Activity and you can learn more about it in the Activities developer guide.ServicesA service is a component that runs in the background to perform long-runningoperations or to perform work for remote processes. A service does notprovide a user interface. For example, a service might play music in thebackground while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it.A service is implemented as a subclass of Service and you can learn moreabout it in the Services developer guide.Content providersA content provider manages a shared set of application data. You can storethe data in the file system, an SQLite database, on the web, or any otherpersistent storage location your application can access. Through the content provider, other applications can query or even modify the data (if the content provider allows it). For example, the Android system provides a contentprovider that manages the user's contact information. As such, any application with the proper permissions can query part of the content provider (such as ContactsContract.Data) to read and write information about a particularperson.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the Note Pad sampleapplication uses a content provider to save notes.A content provider is implemented as a subclass of ContentProvider and mustimplement a standard set of APIs that enable other applications to perform transactions. For more information, see the Content Providers developerguide.Broadcast receiversA broadcast receiver is a component that responds to system-wide broadcastannouncements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to thedevice and is available for them to use. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.A broadcast receiver is implemented as a subclass of BroadcastReceiver andeach broadcast is delivered as an Intent object. For more information, see the BroadcastReceiver class.A unique aspect of the Android system design is that any application can start another applicat ion’s component. For example, if you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. When complete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application.When the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera application that captures a photo, that activity runs in the process that belongs to the camera application, not in your application's process. Therefore, unlike applications on most other systems, Android applications don't have a single entry point (there's no main() function, for example).Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.Activating ComponentsThree of the four component types—activities, services, and broadcast receivers—are activated by an asynchronous message called an intent. Intents bind individual components to each other at runtime (you can think of them as the messengers that request an action from other components), whether the component belongs to your application or another.An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.For activities and services, an intent defines the action to perform (for example, to "view" or "send" something) and may specify the URI of the data to act on (among other things that the component being started might need to know). For example, an intent might convey a request for an activity to show an image or to open a web page. In some cases, you can start an activity to receive a result, in which case, the activity also returns the result in an Intent (for example, you canissue an intent to let the user pick a personal contact and have it returned to you—the return intent includes a URI pointing to the chosen contact).For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").The other component type, content provider, is not activated by intents. Rather, it is activated when targeted by a request from a ContentResolver. The content resolver handles all direct transactions with the content provider so that the component that's performing transactions with the provider doesn't need to and instead calls methods on the ContentResolver object. This leaves a layer of abstraction between the content provider and the component requesting information (for security).There are separate methods for activating each type of component:∙You can start an activity (or give it something new to do) by passing an Intent to startActivity() or startActivityForResult() (when you want theactivity to return a result).∙You can start a service (or give new instructions to an ongoing service) by passing an Intent to startService(). Or you can bind to the service by passing an Intent to bindService().∙You can initiate a broadcast by passing an Intent to methods like sendBroadcast(), sendOrderedBroadcast(), or sendStickyBroadcast().∙You can perform a query to a content provider by calling query() on a ContentResolver.For more information about using intents, see the Intents and Intent Filters document. More information about activating specific components is also provided in the following documents: Activities, Services, BroadcastReceiver and Content Providers.中文翻译Android应用基础用Java编程语言编写的Android应用程序,被Android的SDK工具将它和数据以及资源文件编译到一个以.apk为后缀的Android程序包。

毕业设计--基于Android的电子词典软件的设计与实现 (含外文翻译)

毕业设计--基于Android的电子词典软件的设计与实现 (含外文翻译)

LANZHOU UNIVERSITY OF TECHNOLOGY毕业设计基于Android的电子词典软件的设计与实现学生姓名学号专业班级指导教师学院计算机与通信学院摘要本文设计了基于Android平台的电子词典软件。

此英文词典包括两部分,一部分是离线的英文词典,一部分是在线的英文词典。

离线的英文词典主要是使用Android自带的轻量级数据库SQLite来保存单词信息,系统通过SQLite数据库的query方法来查找到与指定英文相对应的单词的中文释义。

在线的英文词典是利用oracle数据库来保存单词信息,然后利用Http 协议解析出单词信息显示到手机界面上,同时还能够增加、删除、更新单词信息。

当然,对于查询到的生疏的单词可以添加到单词本以便于随时复习。

关键词:Android,oracle数据库,SQLite数据库,英文单词AbstractIn this paper, we design and implementation about electronic dictionary software which is based on the Android platform. English dictionary mainly include two parts, and one is to realize the offline English dictionary, the other is to realize the online English dictionary. Offline English dictionary is mainly used a lightweight database SQLite that belongs to Android to preserve words information, we find the specified English word corresponding to the Chinese interpretation by using query method of SQLite database. Offline English dictionary use an oracle database to save the word information, and then parse out the word information to display in the mobile phone interface by Http protocol, at the same time there have the functions that is used to increase, delete, update word information. Of course, we can add unfamiliar word to the note of word in order to review at any time.Keywords: Android; oracle database; SQLite database; English words目录第1章绪论 (1)第2章系统需求分析 (3)2.1 软件的功能要求 (3)2.2 需求分析 (3)2.3 功能需求(用例图分析) (4)2.3.1 基本功能需求例图 (4)2.3.2 离线词典的例图 (6)2.3.3 在线查询用例图 (7)2.3.4 添加到单词本的用例图 (8)2.4 系统结构图和流程图 (10)2.5 系统界面需求 (14)2.6 运行环境 (15)2.6.1 关键技术 (15)2.6.2 运行环境 (16)第3章数据库的设计 (16)3.1 在线词典的服务器端的数据库设计 (16)3.1.1 数据库中数据表的设计 (16)3.1.2 在线词典的客户端的数据库设计 (17)3.1.3 离线时的数据库的设计 (18)3.1.4 软件数据模型 (19)3.2 连接数据库 (20)3.2.1 数据库的创建 (20)3.2.2.数据库的操作 (20)3.2.3 数据的查看 (21)3.2.4 服务器和客户端的连接 (21)第4章环境的搭建 (23)4.1关于Android的简单介绍 (23)4.1.1 Android环境的搭建 (23)4.1.2Android命令行的使用 (24)4.1.3 Android工程的简单介绍 (25)4.2 Java Web环境的搭建 (28)第5章具体功能模块的设计 (31)5.1 查询模块的设计 (32)5.1.1 离线查询 (32)5.1.2 在线查询 (33)5.2 添加单词模块 (35)5.3 删除单词模块 (36)5.4 修改单词模块 (37)5.5 菜单模块的实现 (38)5.6 生词本模块的设计 (42)第6章系统测试与性能分析 (44)6.1测试 (44)6.2 性能测试及分析 (45)总结 (46)参考文献 (47)附录一:英文翻译原文 (48)附录二:英文翻译译文 (56)附录三:程序清单 (63)致谢 (70)第1章绪论如今,英语在人们的工作、学习中显得越来越重要,而手机词典软件的出现无疑带来了极大的便利,遇到遇到生疏的英语单词,现在拿起手机就能轻松解决。

安卓 android 翻译 中英文 对照 毕设

安卓 android 翻译  中英文 对照  毕设

欣达维出版公司国际电脑游戏技术期刊卷2012,文章编号:494232,共10页DOI:10.1155/2012/494232研究课题通过比较学习发展中的社会应用程序与安卓平台上的游戏的软件体系结构BianWu和Alf IngeWang挪威特隆赫姆科技大学计算机科学系学习软件体系结构的比较研究论文7491邮件联系方式BianWu:bian@idi.ntnu.no收件时间:2012年4月15日,回复时间:2012年7月16日学术责任编辑:丹尼尔·塔尔曼版权©2012 B. Wu and A. I.Wang。

这是一个开放的,允许无限制地使用和分配在任何媒体上,原来的工作是正确的引用在创作公用署名许可下发布的文章。

本文描述了一个实证研究:重点是发现使用相同的安卓开发平台的游戏开发工作与学生工作的学生的社交应用开发的异同。

在2010-2011年之间,学生参加课程挪威科技大学(NTNU)的软件架构,可以选择四种类型的项目。

独立所选择的项目类型,所有的学生必须要经过相同的阶段,产生相同的模板,基于相同的文件,并按照完全相同的进程。

本研究的重点项目是安卓项目,看看有多少应用程序域的独立影响的课程项目所选择的技术。

我们的研究结果,为学生做游戏开发的社交应用开发,学习软件架构,积极地工作与游戏,更好地专注于发展过程中的质量属性,如可修改性和可测试性,软件架构,较高的生产复杂性,更高效的编码工作的项目揭示了一些积极的作用。

然而,,对于学生选择两个不同的领域而获得等级,我们并没有发现有显着差异。

1.介绍电脑游戏和视频游戏已经非常流行,在儿童、青少年和年轻人的文化中发挥了突出的作用。

游戏是现在可以到处都在播放的技术,丰富的环境,配备笔记本电脑,智能手机,游戏机(移动和固定),机顶盒和其它数字设备。

这种现象,被认为是年轻人显示对游戏的内在动机,可以结合教育内容和目标,并且关系到一种普伦斯基所谓的“数字游戏为基础的学习”。

Android中英文对照外文翻译文献

Android中英文对照外文翻译文献

中英文对照外文翻译(文档含英文原文和中文翻译)1 什么是Android1.1 主要技巧和思想●历史的嵌入式器件编程●开放手机联盟的解释●第一眼看到Android的主屏幕可以这么说,暂时,传统的桌面应用程序开发者已经被惯坏了。

这个不是说桌面应用程序开发比其他形式的开发很简单。

总之,作为传统桌面的应用程序开发者,凡是我们能想象到的各种应用程序,我们就一定有能力创造。

包括我自己,因为我也是从做桌面程序开始的。

一方面已经使得桌面程序更容易理解就是我们已经有能力去跟桌面操作系统相互作用,因此,任何底部的硬件很自由的相互作用。

这种类型独立自主的程序编制,然而,对于很小的开发者团体来说是不敢冒险的去搞手机发展这样浑浊的技术的。

注解:我提到两种不同的开发商在此讨论:传统的桌面应用程序开发,他们能在任何语言环境下工作,而且最终的产品和程序是用来运行“桌面”操作系统的;还有Android 程序开发者,那些开发Android平台开发工具的JAVA程序开发人员。

这不是说跟其他人比起来谁好谁坏。

其实,区别目的仅仅在于想说明并比较Android桌面操作系统环境的开发风格,工具。

1.2 嵌入式器件编程的简要历史有很长一段时间,手机的开发者由大的著名嵌入式的开发团队中的少数人组成,作为嵌入式设备的开发者。

相对于桌面开发或者后续的网络开发,被视作更少“魅力”,而且嵌入式设备的开发通常因为硬件和操作系统而处于劣势。

因为嵌入式设备的制造商们太小气,他们要保护他们硬件方面的秘密,所以他们给开发者们非常有限的库去运行当他们尝试去让一些特定的设备去相互作用。

嵌入设备与桌面系统显著不同的一部分是嵌入设备是个有特色的“芯片上的电脑”。

例如:考虑你的标准电话遥控。

这个并不是一个非常强大并且复杂性的技术。

当任何的按钮被按下去,一个芯片解释一个信号以一种方式已经被编程进了这个设备。

这个允许设备知道什么是从输入设备(键盘)来的需要。

并且如何的响应这些命令(比如,打开电视机)。

毕业论文外文翻译-理解安卓系统的安全性

毕业论文外文翻译-理解安卓系统的安全性

本科毕业设计(论文)翻译班级姓名学号指导教师填表日期图2显示了FriendTracker和FriendViewer的组件和应用程序组件,还有Android distribution中定义的程序的交互作用。

在每一种情况下,一个组件都会发起与其他组件的沟通。

为了简单起见,我们称这个为件间通信(ICC)。

在许多方面,ICC是类似于基于Unix 的系统中进程间通信(IPC)。

对于开发人员,无论目标是在相同或不同的应用与界定下,ICC的功能都相同(除了下文将定义的安全规则)。

可用的ICC的动作取决于目标的组成部分。

每个组件的类型都支持它自己的类型。

例如,当FriendViewer开始FriendMap进程,FriendMap活动出现在屏幕上。

服务组件支持启动,停止,运行bind活动,所以FriendTrackerControl开始活动,例如,可以启动和停止FriendTracker服务在后台运行。

Bind 活动建立了组件之间的联系,使启动程序执行由服务定义的RPCs。

在我们的例子中,使得FriendTracker与系统中的服务器位置的管理器相结合。

图一Understand android securitySecurity& Privacy, IEEE.2009,7the next generation of open operating systems won’t be on desktops or mainframes but on the small mobile devices we carry every day. The openness of these new environments will lead to new applications and markets and will enable greater integration with existing online services.However, as the importance of the data and services our cell phones support increases, so too do the opportunities for vulnerability. It’s essential that this next generation of platforms provide a comprehensive and usable security。

Android毕设外文资料和译文

Android毕设外文资料和译文

外文资料和译文专业:计算机科学与技术(嵌入式软件开发方向)班级:计嵌入式000000姓名:XXXX学号:08111XXXXX指导教师:XXXX教授2011 年 12 月 18 日译文这篇文档主要讲述Android应用框架的核心原则。

站在高层来说,以用户为中心来设计良好的交互程序,对于应用设计者或是开发者来说是非常重要的。

下面用例子来阐述了activities和tasks的一些底层原则和机制,例如导航,多任务,activity重用,意图和activity栈。

这篇文档也着重讨论了一些设计决策,针对如何利用好它们去设计你的应用程序UI。

这篇文档中的例子均是Android应用程序,包括默认应用程序(比如拨号器)、Google 应用程序(比如地图)。

你可以自己在Android模拟器上或是Android手机上去试验这些例子。

如果你使用Android手机试验时,可能未提供本文档中的某些例子。

Applications, Activities, Activity Stack and Tasks 理解Android系统中的四个基本概念对你是很有帮助的,它们分别是:Applications(应用)Activities(活动)Activity Stack(活动堆栈)Tasks(任务)Applications一个Android应用程序其实就是由一个或者多个Activity组成。

它们被捆绑在一起并存放进.apk文件中,这就是Android应用程序。

Android中有着丰富的应用程序,比如邮件、日历、地图定位、文本消息、联系人、照相机、打电话、音乐播放器,系统设置等应用。

一般情况下,桌面上都会有Android应用程序快捷图标,用户可以选择某一个图标来启动应用程序。

ActivitiesActivity是Android应用程序的主要组成部分,activity可以是你自己创建的,当然,还可以是其它应用程序中的activity。

它们都是在运行时绑定上的,以便于应用程序扩展其自身的功能,它们一旦组合在一起,就会如同一个应用程序一样。

Android外文资料及译文

Android外文资料及译文

外文资料:WLANWhy use WLANFor one of the main local area network management, for the laying of cables, or check the cable is disconnected this time-consuming work, it is easy to upset, not easy to break in a short time to find out where. Furthermore, for the business and application environment constantly updating and development of enterprise network must be matched with the original re-layout, need to re-install the network lines, although the cable itself is not expensive, but requested the technical staff to the high cost of wiring, especially the old building, wiring project costs even higher. Therefore, the construction of wireless local area network has become the best solution.What conditions need to use WLANWLAN is not limited to alternative local area network, but to make up for lack of wired local area networks, in order to achieve the purpose of extending the network, the following circumstances may have wireless local area network.●no fixed workplace users●wired local area network set up by the environmental constraints●As a wired local area network backup systemWLAN access technologyCurrently manufacturers in the design of wireless local area network products, there are quite a variety of access design methods can be divided into three categories: narrowband microwave, spread spectrum (Spread Spectrum) technology, and infrared have their advantages and disadvantages, limitations, and more, followed by detailed discussion of these techniques. (Infrared) technology, each technique has their advantages and disadvantages, limitations, and more, followed by detailed discussion of these techniques.Technical requirementsAs wireless local area network needs to support high-speed, burst data services, need to be addressed in the indoor use of multipath fading, as well as issues such ascrosstalk subnets. Specifically, wireless local area network must achieve the following technical requirements:1)Reliability: Wireless LAN system packet loss rate should be lower than 10-5,the error rate should be lower than 10-8.2)Compatibility: For indoor use of wireless local area network, so as far aspossible with the existing wired LAN network operating system and networksoftware compatible.3)Data rate: In order to meet the needs of local area network traffic, wirelessLAN data transfer rate should be more than 1Mbps.4)The confidentiality of communications: As the data transmitted in the air viawireless media, wireless local area networks at different levels must takeeffective measures to improve communication security and data security.5)Mobility: support for all mobile networks or semi-mobile network.6)Energy Management: When receiving or sending data to the site when themachine is in sleep mode, when activated again when the data transceiver toachieve the savings in power consumption.7)small size and low price: This is the key to the popularity of wireless local areanetwork can be.8)Electromagnetic environment: wireless LAN should consider thehumanbodyand the surrounding electromagnetic environment effects.AndroidGoogle Android is a Linux-based platform for developing open-source phone operating system (registered trademark in China called &quot;Achi;). It includes operating systems, user interface and applications - mobile phone work required by the software, but there is no past, the exclusive right to impede innovation and barriers to mobile industry, called mobile terminal is the first to create a truly open and complete mobile software. Google and Open Handset Alliance to develop the Android, the alliance by including China Mobile, Motorola, Qualcomm and T-Mobile, including more than 30 technology and the composition of a leader in wireless applications. Google with operators, equipment manufacturers, developers and other interested parties to formdeep-level partnerships, hoping to establish a standardized, open software platform for mobile phones in the mobile industry to form an open ecosystem .It uses software stack layers (software stack, also known as the software stack) architecture, is divided into three parts: the core of the underlying Linux-based language developed by the c, only basic functions. Middle layer consists of library. Library and Virtual Machine Virtual Machine, developed by the C +. At the top are a variety of applications, including the call procedures, SMS procedures, application software is developed by the companies themselves to write java.To promote this technology, Google, and dozens of other phone company has established the Open Handset Alliance (Open Handset Alliance).Characteristic●application framework to support component reuse and replacement●Dalvik virtual machine specifically for mobile devices is optimized●Internal integrated browser, the browser-based open-source WebKit engine●optimization of 2D and 3D graphics library includes graphics library, 3Dgraphics library based on OpenGL ES 1.0 (hardware-accelerated optional)●# SQLite for structured data storage●Multimedia support includes the common audio, video and static image fileformats (such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)●GSM phone (depending on hardware)●Bluetooth Bluetooth, EDGE, 3G, and WiFi (hardware dependent)●Camera, GPS, compass, and accelerometer (hardware dependent)●Rich development environment including a device emulator, debugger,memory and performance analysis charts, and the Eclipse integrateddevelopment environment plug-insApplicationsA core Android application package together with the release of the application package, including email client, SMS short messaging program, calendar, maps, browser, contact management procedures. A ll applications are written using JA V A.Android Application Framework Developers have full access to core applicationsused by the API framework. The application framework designed to simplify the reuse of software components; any application can publish its functional blocks and any other applications can use the function block its release (but must follow the framework of security restrictions). Reuse mechanism allows the application form can be user replaced.All of the following applications by the composition of a range of services and systems, including:●an expanded view (Views) can be used to build applications, including a list of(lists), grid (grids), text boxes (text boxes), buttons (buttons), and even an embeddable web browser.●Content Manager (Content Providers) allows applications to access data fromanother application program (such as the contact database), or to share their own data.● A resource manager (Resource Manager) to provide access to non-coderesources, such as local strings, graphics, and hierarchical file (layout files).● A notification manager (Notification Manager) allows applications to customersin the status bar display notification information.●An activity class Manager (Activity Manager) to manage the application lifecycle and provides common navigation rollback feature.Ordering the systemOrdering the system information using automated software tools to achieve la carte, side dishes, stir fry vegetables to the transfer of all management processes; completion point, the computer management menu, point the menu and the kitchen, front-end checkout synchronization print; achieved without the menu paper-based operation; backstage manager of inquiry; warehouse inventory management and so on.In addition, ordering the system can also effectively manage customer data, archiving and future reference, put an end to the restaurant "leakage List", "run list" phenomenon; help restaurants using computer data processing capability and powerful ability to process optimization to achieve automated management, streamline workflow restaurant, reduce waste and man-made phenomenon of management oversight, re-optimal allocation of corporate resources, the operating costs to a minimum.Powerful addition to ordering the system to support the general application of stand-alone and LAN in addition to support head office / branch of multi-level framework used for remote network using the POS system to achieve front store sales cashier, sales of small-ticket instantly print sales day-end, reporting sales data and receive information of new features dishes.There are three currently ordering the system to achieve mode:First, the touch screen a la carte model: It uses the currently most popular touch-computer ordering process to achieve that members can to order the software screen prompts, simply click on the screen with your fingers can complete the entire ordering process and convenient This model applies to the practice of rich dishes and large restaurants, restaurants, and restaurant, etc..Second,the wireless PDA ordering mode: it uses a wireless WiFi technology, a la carte interface by PDA display, use touch pen to complete the ordering process, virtually anywhere, anytime to order real-time response, this model is more suitable for dishes and practices simple restaurant, features a restaurant and special mood of senior restaurants.Third, the wireless ordering Po mode: it uses the ISM band, can be a floor or other obstruction in the case of seamless coverage up to 10 meters away, while the signal remained stable, which is the ratio of the wireless PDA ordering model's greatest strength, this model applies to simple dishes and practices and other requirements with fewer fast food restaurants, pot shops.中文翻译:无线局域网为何使用无线局域网络?对于局域网络管理主要工作之一,对于铺设电缆或是检查电缆是否断线这种耗时的工作,很容易令人烦躁,也不容易在短时间内找出断线所在。

最新应用程序基础AndroidDevelopers-毕业设计外文翻译

最新应用程序基础AndroidDevelopers-毕业设计外文翻译

┊┊┊┊┊┊┊┊┊┊┊┊┊装┊┊┊┊┊订┊┊┊┊┊线┊┊┊┊┊┊┊┊┊┊┊┊┊附录二英文原文及译文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 consideredto be one a pplication.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'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:Activities┊┊┊┊┊┊┊┊┊┊┊┊┊装┊┊┊┊┊订┊┊┊┊┊线┊┊┊┊┊┊┊┊┊┊┊┊┊An 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 o r 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 V iew 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 U ser 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). 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 t hat 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 i t considers important. All receivers extend the BroadcastReceiver b ase 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 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 C ontentResolver 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, theIntent 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 objecttoContext.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 o nBind() call. (If the service is not already running, bindService() can optionally start it.) For example, 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() i n 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 a rticle, 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:1. 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().2. 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. For example, an activity might be declared as follows:The name attribute of the <activity> element names the Activity subclass that implements the activity. The icon and label attributes point to resource files containing an icon and label that can be displayed to users to represent the activity.The other components are declared in a similar way —<service> elements for services, <receiver> elements for broadcast receivers, and <provider> elements for content providers. Activities, services, and content providers that are not declared in the manifest are not visible to the system and are consequently never run. However, broadcast receivers can either be declared in the manifest, or they can be created dynamically in code (as BroadcastReceiver objects)and registered with the system by calling Context.registerReceiver().For more on how to structure a manifest file for your application, see The Android Manifest.xml File.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. Here's an extension of the previous example that adds two intent filters to the activity:┊┊┊┊┊┊┊┊┊┊┊┊┊装┊┊┊┊┊订┊┊┊┊┊线┊┊┊┊┊┊┊┊┊┊┊┊┊The first filter in the example —the combination of the action "android.intent.action.MAIN" and the category"UNCHER" — is a common one. It marks the activity as one that should be represented in the application launcher, the screen listing applications users can launch on the device. In other words, the activity is the entry point for the application, the initial one users would see when they choose the application in the launcher.The second filter declares an action that the activity can perform on a particular type of data.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 I ntentFilter 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外文翻译(Android中英文献)

本科毕业设计(论文)外文参考文献译文及原文学院信息工程学院专业测控技术与仪器(光机电一体化方向) 年级班别 2011级(1)班学号学生姓名指导教师2015年 6 月目录1应用程序基础 (1)1.1应用程序组件 (1)1.2激活组件:intent (3)1.3 关闭组件 (4)1.4manifest文件 (5)1.5Intent过滤器 (6)1.6基于XML的布局 (7)1Application Fundamentals (8)1.1 Application Components (8)1.2Activating components:intent (11)1.3 Shutting down components (12)1.4 The manifest file (13)1.5Intent filters (14)1.6XML-Based Layout (15)1 应用程序基础Android应用程序使用Java编程语言开发。

aapt工具把编译后的Java代码连同应用程序所需的其他数据和资源文件一起打包到一个Android包文件中,这个文件使用.apk作为扩展名。

此文件是分发并安装应用程序到移动设备的载体;是用户下载到他们的设备的文件。

单一.apk文件中的所有代码被认为是一个应用程序。

从多个角度来看,每个Android应用程序都存在于它自己的世界之中:1 默认情况下,每个应用程序均运行于它自己的Linux进程中。

当应用程序中的任何代码需要被执行时,Android启动此进程,而当不再需要此进程并且其它应用程序又请求系统资源时,则就关闭了这个进程。

2 每个进程都有其独有的虚拟机(VM),所以应用程序代码与所有其它应用程序代码是隔离运行的。

3 默认情况下,每个应用程序均被赋予一个唯一的Linux用户ID,并加以权限设置,使得应用程序的文件仅对此用户及此应用程序可见——尽管也有其它的方法使得这些文件同样能为其他应用程序所访问。

基于Android开发的外文文献

基于Android开发的外文文献

AndroidAndroid, as a system, is a Java-based operating system that runs on the Linux 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 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 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. See Processes and Threads, later.Broadcast receiversA broadcast receiver is a component that does nothing but receive and react tobroadcast 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 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, startingit 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 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 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 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 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 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的发展和应用作者:wikipedia第1章简介Android(读音:['ændrɔid])是一种以Linux为基础的开放源码操作系统,主要使用于便携设备。

它由谷歌公司和开放手持设备联盟开发和领导。

目前尚未有统一中文名称,“安卓”和“安致”是在中国大陆流行的另一个称呼。

Android操作系统最初由安迪·鲁宾(Andy Rubin)创办,最初主要支持手机。

2005年8月17日被谷歌公司(Google)收购注资。

2007年11月5日,谷歌公司与84家硬件制造商、软件开发商及电信运营商组成开放手持设备联盟(Open Handset Alliance)来共同开发改良Android操作系统并生产搭载Android的智能手机,并逐渐扩展到平板电脑及其他领域上。

随后,Android获得了Apache免费开源许可证,谷歌公司发布了其源代码。

同时,一个负责进一步发展和维护Android操作系统的Android开源项目也被建立(AOSP)。

Android的内核基于Linux,除了内核之外,则是中介层、数据库元和用C/C++编写的API以及应用程序框架。

Android的应用程序通常以Java数据库元为基础编写,运行程序时,应用程序的代码会被即时转变为Dalvik dex-code (Dalvik Executable),然后Android操作系统通过使用即时编译的Dalvik虚拟机来将其运行。

除了开放手持设备联盟之外,Android还拥有许多由全球各地开发者组成的开源社区来专门负责开发Android应用程序和第三方Android操作系统来延长和扩展Android的功能和性能。

截止至2011年10月,Android电子市场上拥有超过30万个认证的应用程序,电子市场的应用程序下载量也在2011年12月达到100亿次。

由于Android是开放的,因此它还可以通过第三方网站来下载安装电子市场上所没有的应用程序。

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

东北大学东软信息学院外文资料和译文专业:计算机科学与技术(嵌入式软件开发方向)班级:计嵌入式000000姓名:XXXX学号:08111XXXXX指导教师:XXXX教授2011 年 12 月 18 日译文这篇文档主要讲述Android应用框架的核心原则。

站在高层来说,以用户为中心来设计良好的交互程序,对于应用设计者或是开发者来说是非常重要的。

下面用例子来阐述了activities和tasks的一些底层原则和机制,例如导航,多任务,activity重用,意图和activity栈。

这篇文档也着重讨论了一些设计决策,针对如何利用好它们去设计你的应用程序UI。

这篇文档中的例子均是Android应用程序,包括默认应用程序(比如拨号器)、Google 应用程序(比如地图)。

你可以自己在Android模拟器上或是Android手机上去试验这些例子。

如果你使用Android手机试验时,可能未提供本文档中的某些例子。

Applications, Activities, Activity Stack and Tasks 理解Android系统中的四个基本概念对你是很有帮助的,它们分别是:Applications(应用)Activities(活动)Activity Stack(活动堆栈)Tasks(任务)Applications一个Android应用程序其实就是由一个或者多个Activity组成。

它们被捆绑在一起并存放进.apk文件中,这就是Android应用程序。

Android中有着丰富的应用程序,比如邮件、日历、地图定位、文本消息、联系人、照相机、打电话、音乐播放器,系统设置等应用。

一般情况下,桌面上都会有Android应用程序快捷图标,用户可以选择某一个图标来启动应用程序。

ActivitiesActivity是Android应用程序的主要组成部分,activity可以是你自己创建的,当然,还可以是其它应用程序中的activity。

它们都是在运行时绑定上的,以便于应用程序扩展其自身的功能,它们一旦组合在一起,就会如同一个应用程序一样。

每个activity都有其独特的UI、明确的功能,诸如打电话、看照片、听音乐等。

任何一个应用程序都应至少有一个activity。

当使用Android手机时,用户在屏幕上一个接一个地滑动或是点击图标启动activity,完全不会注意到底层的行为——他们体验是无缝的。

activity后面有activity,task后面还会有task。

Activity可以处理特定的数据类型和接受一相关的动作。

每个activity都有其各自的生命周期,互不干扰;并且它们都可以被用户或者系统独立启动、运行、暂停、恢复运行、停止、重新开始。

正因为这个独立性,activity可以以不同的方式被其它的activity 进行替换。

Activity是Android应用中最为突出的组件,其余组件分别为:service、content provider、broadcast receiver。

Activity Stack用户之所以能够从一个activity转到下一个activity,是因为Android系统针对activity而设计了一个线性的导航历史以供用户追溯访问,这就是activity栈,也称为back stack。

当用户启动了一个新的activity,它就被添加进activity栈,以便按BACK 键时能够返回到上一个activity。

然而,用户不能按BACK键就直接返回到桌面(除非activity的前一个是桌面才可以)。

activity栈里面存放的只能是activity,而视图、窗体、菜单和对话框则不能。

也就是说,如果你可以让用户从屏幕A跳转到屏幕B,当用户按BACK键时,他就应该会回到屏幕A,那屏幕A必须是一个activity。

有个例外情况就是,你的应用程序需要利用BACK键控制自身的导航,那就要自己重新设定BACK键的导航功能。

Tasks任务则是一系列的activity集合,它能使用户完成既定的操作,而又不用去关心这些activity是哪个应用程序里面的,除明确指定一个新任务之外(参见“中断任务”小段),那么其他activity都属于当前任务的一部分。

再次注意的是,这些activity可是任意应用程序中的其中一个,也就是说不管它们所属的应用程序是否相同。

举个例子,用户打开了联系人的程序,任务随之也会启动,他选择了email地址准备发邮件,这时跳转到了email activity,之后他要添加附件,需要在相册中挑选图片。

这里面,联系人,email,图片相册都是不同的应用程序。

当一个activity启动时,任务也随之启动的话,那个activity就是根activity。

启动activity一般有这么几种方式,应用程序发射器、桌面快捷方式、最近任务切换器。

Android系统内部一旦有任务,那么按BACK键就可以回到上一个activity。

Activity栈可以是多个任务的组成部分。

下面是关于任务的例子,以供参考:发送文本消息并含有附件观看YouTube视频并以邮件的方式向其他人分享。

中断任务——任务中有一个重要特性就是能使用户中断当前正在做的操作(他们的任务)而去执行其它操作,当然他们也可以回到之前的任务上,也就是说支持同时运行多任务并且来回切换它们。

这里有两种情况来开始其它任务,并且都可以返回到原先的任务上。

打开通知:用户接收到通知并打开查看它。

用户转去做其它操作:用户在桌面启动。

当然,也有例外的。

除了刚才提到的两种方式,另外还有一种打开新任务的情况,就在其内部开启一个activity。

例如,在邮件中以新任务的方式打开地图activity或是打开一个浏览器activity,当按BACK键时就又会回到邮件activity中。

Activities和Tasks之旅下面的例子阐述了应用程序的基本原则,主要有activities,activity栈,回退键,任务和意图;并展示了系统是如何响应用户请求的,例如用户开始了一个应用程序,用户不断的切换UI,程序内部就是利用在不同任务之间切换activities的。

下面的许多例子你都可以在Android手机上运行起来。

在桌面上开始一个Activity桌面是启动应用程序的主要地方,比如在桌面上点击应用程序图标就能将其打开,用户第一眼看到的就是应用程序中的主activity。

用BACK和HOME键进行导航Activity保持或者丢掉其状态完全取决于用户是怎样离开这个activity的——使用HOME键还是BACK键。

默认情况下,按下BACK键来结束(销毁)当前activity并为用户显示上一个activity。

此外,也不是所有activity都是当按下BACK键之后销毁掉的。

例如用户开始播放音乐,接着按下BACK键,却不会影响音乐的播放。

即使它的activity不再可见,音乐应用程序依然会在状态栏上提示着用户。

注意:你也可以让activity不再可见时停止掉或是继续在后台运行,但后者更适合像音乐这样的应用程序。

重用activity有两个应用程序中,它们分别也有两个activity:activity A 和activity B。

A的部分功能需要调用B的已实现功能,那么B就叫被重用。

联系人重用相册来获取图片—联系人activity中会有联系人的照片,但是照片一般存放在相册里面,所以联系人要重用相册的功能来获取图片,相册activity就是重用的绝佳例子。

替换activity这个例子描述的是不用应用程序中的两个activity互相替换,activity A替换activity B。

这种一般发生在activity A比activity B的功能更为强大一些。

换句话来说,A和B妥妥得等价,当然就可以实现A替换B。

这个例子中的联系人应用程序重用了activity,A和B虽然是完全不同的activity,但是它们两个彼此形成了互补,使程序更加的强大。

多任务如前所述,当一个activity启动后,用户还可以回到桌面启动第二个activity,第一个activity则不会被销毁还是继续运行着,我们换个例子来说明这一小节——地图应用程序。

状态1:用户打开了地图应用程序并查询一个地址。

这时,用户该说了,网络太慢了!因为地图定位是需要一些时间的。

状态2:用户准备做些其它事情,按下HOME键,不过这样做不会干扰地图应用程序,还是保持其加载地图的状态。

状态3:地图activity现在是在后台运行着,桌面在来到了前台。

这时用户打开了日历activity,比如查看今天是星期几。

状态4:用户回到桌面,重新打开Map,这时地图已经全部加载完毕了。

以上两个应用程序“地图”和“日历”是两个不同的任务,因此Android支持多任务模式。

切换任务下面的例子描述的是用户如何在两个任务之间进行切换。

1.开始第一个任务。

你想要发送一条短消息并附加一张图片。

你会这样操作:桌面 > 短消息 > 新的短信息 > 菜单 > 附件 > 图片。

最后一步启动了相册activity来选择一张照片。

注意相册是另外的一个应用程序。

在选择照片之前,可以先去桌面打开日历,目的是为了开始第二个任务。

2.开始第二个任务。

你会这样操作:桌面 > 查看日历。

从桌面上打开日历,就等于是开始一个新任务了。

3.切换到第一个任务并完成后面的操作。

查看完日历之后,继续回到先前的任务上:桌面 > 短消息,此时进入的并不是短消息activity,而是相册activity,也就是之前离开的activity。

然后你就可以选择图片并发送短消息出去了,也就完成了第一个任务。

设计小贴士下面的提示和指导都是针对应用设计者和开发者而提出的。

使用显式意图来防止外部应用调用你的activity如果你不想自己的activity被外部使用,就别在manifest.xml里面配置intent-filter。

这样的话,你的activity就只会在应用程序内部来启动了,同样也避免了安全漏洞。

反之,创建一个意图并指定明确要启动的组件,这就是显示意图,在这个例子中,就不需要intent filters。

Intent filters可以发布所有的应用程序,当你创建了一个intent filter时,其它应用程序就可以访问到你的activity了,至于它们怎么用,你就不知道了,这意味着不经意间形成了安全隐患。

思考:以怎样的方式来启动activity做为Android设计者或开发者,完全取决于用户如何启动你的应用程序,而应用程序则是由一系列的activity组成,用户会从Home或是其他应用程序中启动这些activity。

相关文档
最新文档