(精品文献)Android外文翻译

合集下载

外文翻译安卓系统的大体描述

外文翻译安卓系统的大体描述

附录二外文文献(原文)The basic of description of android system The mainstream of the next generation of open operating systems will not be on the desktop, but will appear in the phone that we carry every day. Open environment will lead these new applications may be integrated into these online services that already exist, of course, as with growing data services on mobile phones support the security flaws on the phone is also becoming increasingly clear. The nature of the next-generation operating system, whether to provide a complete integrated security platform.By 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 2020 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 2020. According to industry insiders expect the G1 mobile phone sales in 2020 continue. Many other mobile phone suppliers in the near future plans to support this system.Around an android and a huge developer community has beenestablished, 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. This is the most obvious example is Google's tightly integrated with Gmail, 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 embedded Linux 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 application to call each other API collaboration, and the other to authenticate the user application. Although these applications have certain safety features,some of our experienced developers to create Android applications who revealed that the design of security 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 sdkThe 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 takesuch action specially designed services. Developers can also use a special daemon at system startup, 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.ContentProvider 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 (eg 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. Therefore, the radio receiver subscribe to these destinations receive 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 initiatean activity such as start an activity (startActivity (An intent)) start services (the startService (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.Implicit name is called the action string because of his special type of the requested action. Such as a view action string, in an intent data field points to an image file, the system will directly referring to the preferred image viewer.Developers can also use the action string a large number of radio to send and receive. Receiver at the receiving end, the developers use an intent filter to customize the special action string. Android Department, including the additional goal of the resolution rules, but an optional string type of data manipulation is the most common.Android applications are written in the Java programming language.The compiled Java code —along with any data and resourcefiles required by the application —is bundled by the apt tool into an Android package,an archive file marked by an .apk suffix.This file is the vehicle for distributing the application and installing it on mobile devices;it's the file users download to their devices.All the code in a single.apk file is considered to be one application.In many ways,each Android application lives in its own world:(1)By default,every application runs in its own Linux process.Android starts the process when any of the application's code needs to be executed,and shuts down the process when it's no longer needed and system resources are required by other applications.(2)Each process has its own virtual machine(VM),so application code runs in isolation from the code of all other applications.(3)By default,each application is assigned a unique Linux user ID.Permissions are set so that the application's files are visible only to that user and only to the application itself —altough 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 while 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 ofelements 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 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 or change settings.Tough they worktogether 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'sinteraction 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 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 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 themusic 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 Thread,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 respond 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 mayuse 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.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,amongother things.For example,it might convey a request for an activity to present an image t the user or let the user edit some text.For broadcast receivers,the Intent object names the action being announced.For example,it might announce to interested parties that the camera button has been pressed.There are separate methods for activating each type of component:1.An activity is launched(or given something new to do)by passing an Intent object to Context.startActivity() or Activity.startActivityForResult().The responding activity can look at the initial intent that caused it to be launched by calling its getIntent() method.Android calls the activity's onNewIntent()method to pass it any subsequent intents.One activity often starts the next one.If it expects a result back from the activity it's starting,it calls startActivityForResult() instead of startActivity().For example,if it starts an activity that lets the user pick a photo,it might expect to be returned the chosen photo.The result is returned in an Intent object that's passed to the calling activity's onActivityResult() method.2.A service is started(or new instructions are given to an ongoing service)by passing an Intent object to Context.startService().Android calls the service's onStart() method and passes it the Intent object.Similarly,an intent can be passed to Context.bindService() to establish an ongoing connection between the calling component and a target service.The service receives the Intent object in an onBind() call.(If the service is not already running,bindService() can optionally start it.)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.sendStickyBroadcast() in any of their variations.Android delivers the intent to all interested broadcast receivers by calling their onReceive() methods.For more on intent messages,see the separate article,Intents and Intent Filters.Shutting down componentsA content provider is active only while it's responding to a request from a ContentResolver.And a broadcast receiver is active only while it's responding to a broadcast message.So there's no need to explicitly shut down these components.Activities,on the other hand,provide the user interface.They're in a long-running conversation with the user and may remain active,even when idle,as long 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.Onte 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 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 themanifest,or they can be created dynamically i code (as BroadcastReceiver objects)and registered with the system by calling Context.registerReceiber().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 s 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.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,thescreen 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 component can have any number of intent filters,each one declaring a different set of capabilities.If it doesn't have any filters,it can be activated only by intents that explicitly name the component as the target.For a broadcast receiver that's created and registered in code,the intent filter is instantiated directly as an IntentFilter object.All other filters are set up in the manifest.For more on intent filters,see a separate document, Intents and Intent Filters.附录三外文文献(译文)安卓系统的大体描述下一代开放操作系统的主流将可不能在桌面上,可是将会出此刻咱们天天携带的电话上。

Android系统外文翻译

Android系统外文翻译

附录1:外文原文What Is Android?It can be said that, for a while, traditional desktop application developers have beenspoiled. This is not to say that traditional desktop application development is easier thanother forms of development. However, as traditional desktop application developers, wehave had the ability to create almost any kind of application we can imagine. I amincluding myself in this grouping because I got my start in desktop programming.One aspect that has made desktop programming more accessible is that we havehad the ability to interact with the desktop operating system, and thus interact with anyunderlying hardware, pretty freely (or at least with minimal exceptions). This kind offreedom to program independently, however, has never really been available to thesmall group of programmers who dared to venture into the murky waters of cell phonedevelopment.For a long time, cell phone developers comprised a small sect of a slightly larger group of developers known as embedded device developers. Seen as a less “glamorous” sibling to desktop—and later web—development, embedded device development typically got the proverbial short end of the stick as far as hardware and operating system features, because embedded device manufacturers were notoriously stingy on feature support. Embedded device manufacturers typically needed to guard their hardware secrets closely, so they gave embedded device developers few libraries to call when trying to interact with a specific device. Embedded devices differ from desktops in that an embedded device is typically a “computer on a chip.” For example, consider your standard television remote control; it is not really seen as an overwhelming achievement of technological complexity. When any button is pressed, a chip interprets the signal in a way that has been programmed into the device. This allows the device to know what to expect from the input device (key pad), and how to respond to those commands (for example, turn on the television). This is a simple form of embedded device programming. However, believe it or not, simple devices such as these are definitely related to the roots of early cell phone devices and development.Most embedded devices ran (and in some cases still run) proprietary operating systems. The reason for choosing to create a proprietary operating system rather than use any consumer system was really a product of necessity. Simple devices did not need very robust and optimized operating systems.As a product of device evolution, many of the more complex embedded devices, such as early PDAs, household security systems, and GPSs, moved to somewhat standardized operating system platforms about five years ago. Small-footprintoperating systems such as Linux, or even an embedded version of Microsoft Windows, have become more prevalent on many embedded devices. Around this time in device evolution, cell phones branched from other embedded devices onto their own path. This branching is evident when you examine their architecture.Nearly since their inception, cell phones have been fringe devices insofar as they run on proprietary software—software that is owned and controlled by the manufacturer, and is almost always considered to be a “closed” system. The practice of manufacturers using proprietary operating systems began more out of necessity than any other reason. That is, cell phone manufacturers typically used hardware that was completely developed in-house, or at least hardware that was specifically developed for the purposes of running cell phone equipment. As a result, there were no openly available, off-the-shelf software packages or solutions that would reliably interact with their hardware. Since the manufacturers also wanted to guard very closely their hardware trade secrets, some of which could be revealed by allowing access to the software level of the device, the common practice was, and in most cases still is, to use completely proprietary and closed software to run their devices. The downside to this is that anyone who wanted to develop applications for cell phones needed to have intimate knowledge of the proprietary environment within which it was to run. The solution was to purchase expensive development tools directly from the manufacturer. This isolated many of the “homebrew” develo pers.Another, more compelling “necessity” that kept cell phone development out of the hands of the everyday developer was the hardware manufacturers’ solution to the “memory versus need” dilemma. Until recently, cell phones did little more than execute and receive phone calls, track your contacts, and possibly send and receive short text messages; not really the “Swiss army knives” of technology they are today. Even as late as 2002, cell phones with cameras were not commonly found in the hands of consumers.By 1997, small applications such as calculators and games (Tetris, for example) crept their way onto cell phones, but the overwhelming function was still that of a phone dialer itself. Cell phones had not yet become the multiuse, multifunction personal tools they are today. No one yet saw the need for Internet browsing, MP3 playing, or any of the multitudes of functions we are accustomed to using today. It is possible that the cell phone manufacturers of 1997 did not fully perceive the need consumers would have for an all-in-one device. However, even if the need was present, a lack of device memory and storage capacity was an even bigger obstacle to overcome. More people may have wanted their devices to be all-in-one tools, but manufacturers still had to climb the memory hurdle.To put the problem simply, it takes memory to store and run applications on any device, cell phones included. Cell phones, as a device, until recently did not have the amount of memory available to them that would facilitate the inc lusion of “extra” programs. Within the last two years, the price of memory has reached very low levels.Device manufacturers now have the ability to include more memory at lower prices. Many cell phones now have more standard memory than the average PC had in the mid-1990s. So, now that we have the need, and the memory, we can all jump inand develop cool applications for cell phones around the world, right? Not exactly.Device manufacturers still closely guard the operating systems that run on their devices. While a few have opened up to the point where they will allow some Java-based applications to run within a small environment on the phone, many do not allow this. Even the systems that do allow some Java apps to run do not allow the kind of access to t he “core” system that standard desktop developers are accustomed to having.This barrier to application development began to crumble in November of 2007 whenGoogle, under the Open Handset Alliance, released Android. The Open Handset Allianceis a group of hardware and software developers, including Google, NTT DoCoMo,Sprint Nextel, and HTC, whose goal is to create a more open cell phone environment.The first product to be released under the alliance is the mobile device operatingsystem, Android. (For more information about the Open Handset Alliance, see)With the release of Android, Google made available a host of development toolsand tutorials to aid would-be developers onto the new system. Help files, the platformsoftware development kit (SDK), and even a developers’ community can be found atGoogle’s Android website, /android. This site should be yourstarting point, and I highly encourage you to visit the site.While cell phones running Linux, Windows, and even PalmOS are easy to find, as ofthis writing, no hardware platforms have been announced for Android to run on. HTC, LGElectronics, Motorola, and Samsung are members of the Open Handset Alliance, underwhich Android has been released, so we can only hope that they have plans for a fewAndroid-based devices in the near future. With its release in November 2007, the systemitself is still in a software-only beta. This is good news for developers because it gives usa rare advance look at a future system and a chance to begin developing applications thatwill run as soon as the hardware is released.Android, 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. Figure 1-1 shows the unmodifiedAndroid home screen.Figure 1-1 The current Android home screen as seen on the Android EmulatorAndroid applications are developed using Java and can be ported rather easily to thenew platform. If you have not yet downloaded Java or are unsure about which version youneed, I detail the installation of the development environment in Chapter 2. Other featuresof 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, youare likely used to programmatic user interface (UI) development—that is, UI placementwhich is handled directly within the program code. Android, while recognizing and allowingfor programmatic UI development, also supports the newer, XML-based UI layout. XMLUI layout is a fairly new concept to the average desktop developer. I will cover boththe XML UI layout and the programmatic UI development in the supporting chaptersof this book.One of the more exciting and compelling features of Android is that, because of itsarchitecture, third-party applications—including those that are “home grown”—areexecuted 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 agreater execution priority than the thread priority available to apps created by third-partydevelopers. Also, each application is executed within its own thread using a verylightweight virtual machine.Aside from the very generous SDK and the well-formed libraries that are availabletous to develop with, the most exciting feature for Android developers is that we now haveaccess to anything the operating system has access to. In other words, if you want tocreate an application that dials the phone, you have access to the phone’s dialer; if youwant to create an application that utilizes the phone’s internal GPS (if equipped), you haveaccess to it. The potential for developers to create dynamic and intriguing applications isnow 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 Androidapplications will be able to tie their applications into existing Google offerings such asGoogle Maps and the omnipresent Google Search. Suppose you want to write anapplication 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 ofpossibility have been flung wide open with Android.Ask the ExpertQ: What is the difference between Google and the Open Handset Alliance?A: Google is a member of the Open Handset Alliance. Google, after purchasing the originaldeveloper of Android, released the operating system under the Open Handset Alliance.Q: Is Android capable of running any Linux software?A: Not necessarily. While I am sure that there will be ways to get around most any opensource system, applications need to be compiled using the Android SDK to run onAndroid. The main reason for this is that Android applications execute files in a specificformat; this will be discussed in later chapters.Reference:[1]Hello Android. Introdu cing Google’s Mobile Developmeng Platform 3rd.Edition,EdBurnette,The Pragmatic Bookshelf[2]The.Android.Developers.Cookbook Building Applications with the Android SDK,James Steele Nelson,Addison-Wesley[3] Pro Android Media. Developing Graphics,Music,Video and Rich Media Apps for Smartphones and Tablets,Shawn Van Every,Apress[4] Professional.Android.2.Application.Development.(Wrox,.2010,.0470565527)附录2:外文译文什么是Android?可以说,于此同时,传统的桌面应用程序开发人员已经被宠坏了。

Android应用架构外文翻译

Android应用架构外文翻译

Android Application Architectureauthor:Lars V ogel1、AndroidManifest.xmlThe components and settings of an Android application are described in the file AndroidManifest.xml. For example all Activities and Services of the application must be declared in this file.It must also contain the required permissions for the application. For example if the application requires network access it must be specified here.<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="/apk/res/android"package="de.vogella.android.temperature"android:versionCode="1"android:versionName="1.0"><application android:icon="@drawable/icon"android:label="@string/app_name"><activity android:name=".Convert"android:label="@string/app_name"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="UNCHER" /></intent-filter></activity></application><uses-sdk android:minSdkVersion="9" /></manifest>The package attribute defines the base package for the Java objects referred to in this file. If a Java object lies within a different package, it must be declared with thefull qualified package name.Google Play requires that every Android application uses its own unique package. Therefore it is a good habit to use your reverse domain name as package name. This will avoid collisions with other Android applications.android:versionName and android:versionCode specify the version of your application. versionName is what the user sees and can be any String.versionCode must be an integer. The Android Market determine based on the versionCode, if it should perform an update of the applications for the existing installations. You typically start with "1" and increase this value by one, if you roll-out a new version of your application.The tag <activity> defines an Activity, in this example pointing to the Convert class in the de.vogella.android.temperature package. An intent filter is registered for this class which defines that this Activity is started once the application starts (action android:name="android.intent.action.MAIN"). The category definition category android:name="UNCHER" defines that this application is added to the application directory on the Android device.The @string/app_name value refers to resource files which contain the actual value of the application name. The usage of resource file makes it easy to provide different resources, e.g. strings, colors, icons, for different devices and makes it easy to translate applications.The "uses-sdk" part of the "AndroidManifest.xml" file defines the minimal SDK version for which your application is valid. This will prevent your application being installed on devices with older SDK versions.2、R.java and ResourcesThe " gen " directory in an Android project contains generated values. R.java is a generated class which contains references to certain resources of the project.These resources must be defined in the "res" directory and can be XML files, icons or pictures. You can for example define values, menus, layouts or animations via XML files.If you create a new resource, the corresponding reference is automatically created in R.java via the Eclipse ADT tools. These references are static int values and defineID's for the resources.The Android system provides methods to access the corresponding resource via these ID's.For example to access a String with the R.string.yourString ID, you would use the getString(R.string.yourString)) method.R.java is automatically created by the Eclipse development environment, manual changes are not necessary and will be overridden by the tooling.3、AssetsWhile the res directory contains structured values which are known to the Android platform, the assets directory can be used to store any kind of data. You access this data via the AssetsManager which you can access the getAssets() method.AssetsManager allows to read an assets as InputStream with the open() method.// Get the AssetManagerAssetManager manager = getAssets();// Read a Bitmap from Assetstry {InputStream open = manager.open("logo.png");Bitmap bitmap = BitmapFactory.decodeStream(open);// Assign the bitmap to an ImageView in this layoutImageView view = (ImageView) findViewById(R.id.imageView1);view.setImageBitmap(bitmap);} catch (IOException e) {e.printStackTrace();}4、Activities and LayoutsThe user interface for Activities is defined via layouts. The layout defines the included Views (widgets) and their properties.A layout can be defined via Java code or via XML. In most cases the layout is defined as an XML file.XML based layouts are defined via a resource file in the /res/layout folder. This file specifies the ViewGroups, Views, their relationship and their attributes forthis specific layout.If a View needs to be accessed via Java code, you have to give the View a unique ID via the android:id attribute. To assign a new ID to a View use @+id/yourvalue. The following shows an example in which a Button gets the "button1" ID assigned.<Buttonandroid:id="@+id/button1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="Show Preferences" ></Button>By conversion this will create and assign a new yourvalue ID to the corresponding View. In your Java code you can later access a View via the method findViewById(R.id.yourvalue).Defining layouts via XML is usually the preferred way as this separates the programming logic from the layout definition. It also allows the definition of different layouts for different devices. You can also mix both approaches.5、Reference to resources in XML filesIn your XML files, for example your layout files, you can refer to other resources via the @ sign.For example, if you want to refer to a color which is defined in a XML resource, you can refer to it via @color/your_id. Or if you defined a "hello" string in an XML resource, you could access it via @string/hello.6、Activities and LifecycleThe Android system controls the lifecycle of your application. At any time the Android system may stop or destroy your application, e.g. because of an incoming call. The Android system defines a lifecycle for Activities via predefined methods. The most important methods are:onSaveInstanceState() - called if the Activity is stopped. Used to save data so that the Activity can restore its states if re-startedonPause() - always called if the Activity ends, can be used to release resource orsave dataonResume() - called if the Activity is re-started, can be used to initialize fields7、Configuration ChangeAn Activity will also be restarted, if a so called "configuration change" happens.A configuration change happens if an event is triggered which may be relevant for the application. For example if the user changes the orientation of the device (vertically or horizontally). Android assumes that an Activity might want to use different resources for these orientations and restarts the Activity.In the emulator you can simulate the change of the orientation via CNTR+F11.You can avoid a restart of your application for certain configuration changes via the configChanges attribute on your Activity definition in your AndroidManifest.xml. The following Activity will not be restarted in case of orientation changes or position of the physical keyboard (hidden / visible).<activity android:name=".ProgressTestActivity"android:label="@string/app_name"android:configChanges="orientation|keyboardHidden|keyboard"> </activity>8、ContextThe class android.content.Context provides the connections to the Android system. It is the interface to global information about the application environment. Context also provides access to Android Services, e.g. the Location Service. Activities and Services extend the Context class and can therefore be used as Context.Android应用架构作者:Lars Vogel(拉尔斯·沃格尔)1、AndroidManifest.xml一个Android应用程序的组件和设置描述文件中的AndroidManifest.xml。

安卓应用开发基础论文中英文对照资料外文翻译文献

安卓应用开发基础论文中英文对照资料外文翻译文献

安卓应用开发基础论文中英文对照资料外文翻译文献中英文对照资料外文翻译文献安卓应用开发基础在Java编程语言编写的Android应用程序的Android的SDK工具编译代码以及与任何数据和到一个Android的包,一个归档文件档案资源的.apk后缀,所有的在一个单一的代码.apk文件被认为是一个应用程序,是Android的文件,供电设备来安装应用程序。

一旦安装在设备上,每个Android应用程序的生命在它自己的安全沙箱:而Android操作系统是一个多用户Linux系统中,每个应用程序是一个不同的用户。

默认情况下,每个应用程序的系统分配一个唯一的Linux用户ID,系统设置所有的应用程序中的文件权限,以便只有用户ID分配给该应用程序可以访问它们。

每个进程都有它自己的虚拟机,因此应用程序的代码在从其他应用程序隔离运行。

默认情况下,每个应用程序运行在它自己的Linux进程。

Android的启动过程时,应用程序的任何组件需要被执行,然后关闭该进程时,它不再需要或恢复时,系统必须为其他应用程序的内存。

这样一来,Android系统实现了最小特权原则,也就是说,每个应用程序,默认情况下,只能访问的组件,它需要做的工作,没有更多,这将创建一个非常安全的环境,使应用程序无法访问的,这就是它没有给予许可制度的部分。

但是,有一个应用程序的方法与其他应用程序和应用程序访问系统服务的数据:这有可能为两个应用程序安排共享相同的Linux用户ID,在这种情况下,它们能够相互访问的文件。

为了节约使用相同的用户ID系统资源,应用程序还1 可以安排运行在相同的Linux进程和共享同一个VM。

应用程序可以请求访问权限,如用户的联系人,短信,可安装存储,摄像头,蓝牙等设备的数据,所有应用程序的权限必须用户在安装时授予。

这涵盖了基本就如何Android应用程序在系统中存在这个文件的其余部分向您介绍:1、框架的核心组件定义应用程序。

2、清单文件中声明组件和应用程序所需的设备功能。

手机图形界面设计外文文献翻译最新译文

手机图形界面设计外文文献翻译最新译文

手机图形界面设计外文文献翻译最新译文XXX interface design for mobile phones。

With the increasing popularity of smartphones。

it has e essential to create XXX but also easy to use。

The article XXX that can be used to create effective mobile phone interfaces.nMobile phones have XXX part of our daily lives。

and their XXX-designed interface can make it easier for users to navigate through us features and ns。

XXX.Design PrinciplesOne of the key principles of mobile phone interface design is simplicity。

The interface should be easy to understand and use。

with clear and concise labels and XXX。

where the design elements should be consistent across different ns and screens.Design XXXXXX that can be used to create effective mobile phone XXX is the use of color。

where different colors can be used to distinguish een different XXX is the use of typography。

有关android技术英文文献翻译

有关android技术英文文献翻译

Application FundamentalsAndroid applications are written in the Java programming language. The compiled Java code —along with any data and resource files required by the application —is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.Android应用基础:Android应用程序是通过java语言开发的,通过绑定一些应用所需要的东西,例如:编译的Java代码,加上数据和一些资源文件,使用一个apt的工具将所有的东西封装成一个android包,这个文件的文件后缀是.apk。

这个文件是分发并安装应用程序到移动设备的载体,是用户获得该应用程序所需要的下载的文件。

Application Components A 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 or changesettings. 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. Android有四大应用程序组件Android的一个很重要的中心特征就是一个应用程序能充分利用其他的应用程序的一些组件(前提是被允许的)例如:如果的当前开发的应用需要一个滚动的列表去展示相片并且当时其他的程序已经开发了一个合适的滚动列表并且对其他人可用,你可以调用这个滚动的列表来完成你的工作而不是开发你自己的。

安卓单词(国外英文资料)

安卓单词(国外英文资料)

安卓单词(国外英文资料)在当今数字化的时代,安卓操作系统已经成为全球范围内使用最广泛的移动操作系统之一。

安卓不仅为用户提供了丰富的应用和功能,还推动了移动技术的创新和发展。

然而,对于许多人来说,安卓系统中的许多专业术语和概念可能显得有些陌生和难以理解。

为了帮助用户更好地了解安卓系统,本文将介绍一些与安卓相关的常用单词和术语,并提供相关的英文资料,以便读者能够更深入地了解安卓系统的各个方面。

1. Android:安卓操作系统的名称,源自于英文单词“android”,意为“”。

2. APK:安卓应用程序的安装包文件格式,全称为“Android Package”。

3. Dalvik:安卓系统中的一个虚拟机,用于运行安卓应用程序。

4. ROM:安卓系统的固件版本,全称为“ReadOnly Memory”。

5. Root:对安卓系统进行解锁,以获得更高的权限和更广泛的控制。

6. SDK:安卓软件开发工具包,全称为“Software Development Kit”。

7. UI:用户界面,全称为“User Interface”。

8. UX:用户体验,全称为“User Experience”。

9. Widget:安卓系统中的一个小工具,可以显示在主屏幕上,提供快捷的操作和显示信息。

10. Fragment:安卓系统中的一个组件,用于实现用户界面的模块化。

1. Android Developers:安卓开发者官方网站,提供了丰富的文档、教程和资源,适合开发者学习安卓编程。

2. XDA Developers:一个安卓社区,提供了大量的安卓相关资讯、教程和讨论,适合对安卓系统感兴趣的用户。

3. Android Central:一个专注于安卓系统的新闻网站,提供了最新的安卓资讯、评测和教程。

4. Stack Overflow:一个编程问答社区,提供了大量的安卓编程问题解答,适合开发者解决安卓编程中的问题。

5. Reddit:一个社交新闻网站,有一个专门的安卓子版块,提供了大量的安卓相关讨论和分享。

android英文翻译

android英文翻译

The thesis is a review paper that gives an introduction to the new mobile platform. Android as well as a comparative evaluation with regard to other mobile operating systems.The key topic of this thesis is the categorization of Android.Therefore it first gives a historical introduction to cell phones and mobile operating systems.Then it describes the main features of Android for a better understanding of this platform.In the following theoretical part Android will be compared to the mobile operating systems Symbian OS and Windows Mobile. Features and criteria defined in this part will be considered and included in the comparison of these systems.The practical part contains a comparison of the Software Development Kits (SDK) from Android and Symbian OS. In this context a simple application implementation on both systems is realized tosupport this comparison.Finally an outlook and a conclusion complete this elaboration.这是一篇介绍新的手机系统的论文,也将Android和其他手机操作系统进行了比较评价。

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

本科毕业设计(论文)外文参考文献译文及原文学院信息工程学院专业测控技术与仪器(光机电一体化方向) 年级班别 2011级(1)班学号学生姓名指导教师目录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,并加以权限设置,使得应用程序的文件仅对此用户及此应用程序可见——尽管也有其它的方法使得这些文件同样能为其他应用程序所访问。

1.1 应用程序组件Android的一个核心的特性就是一个应用程序可以使用其它应用程序的元素(如果那个应用程序允许的话)。

例如,如果你的应用程序需要显示一个图片卷动列表,而另一个应用程序已经开发了一个合用的而又允许别的应用程序使用的话,你可以直接调用那个卷动列表来完成工作,而不用自己再开发一个。

你的应用程序并没有吸纳或链接其它应用程序的代码。

它只是在有需求的时候启动了其它应用程序的那个功能部分。

为达到这个目的,系统必须能够在一个应用程序的任何一部分被需要时启动一个此应用程序的进程,并将那个部分的Java对象实例化。

因此,不像其它大多数系统上的应用程序,Android应用程序并没有为应用程序提供一个单独的入口点(比如说,没有main()函数),而是为系统提供了可以实例化和运行所需的必备组件。

一共有四种组件类型:(1)Activityactivity是为用户操作而展示的可视化用户界面。

例如,一个activity可以展示一个菜单项列表供用户选择,戒者显示一些包含说明文字的照片。

一个短消息应用程序可以包括一个用于显示要发送消息到的联系人列表的activity,一个给选定的联系人写短信的activity以及翻阅以前的短信或改变设置的其他activity。

尽管它们一起组成了一个内聚的用户界面,但其中每个activity都不其它的保持独立。

每一个都实现为以Activity类为基类的子类。

一个应用程序可以只有一个activity,戒者,如刚才提到的短信应用程序那样,包含很多个。

每个activity的作用,以及有多少个activity,当然是取决于应用程序及其设计的。

一般情况下,总有一个应用程序被标记为用户在应用程序启动的时候第一个看到的。

从一个activity转向另一个靠的是用当前的activity启动下一个。

每个activity都被给予一个默认的窗口以进行绘制。

一般情况下,这个窗口是满屏的,但它也可以是一个小的位于其它窗口之上的浮动的窗口。

一个activity也可以使用附加的窗口——例如,一个在activity运行过程中弹出的供用户响应的对话框,这是一个当用户选择了屏幕上特定项目后显示的必要信息的窗口。

窗口显示的可视内容是由一系列层次化view构成的,这些view均继承自View 基类。

每个view均控制着窗口中一块特定的矩形区域。

父级view包含并组织其子view的布局。

叶节点view(位于层次结构最底端)在它们控制的矩形区域中进行绘制,并对用户直达其区域的操作做出响应。

因此,view是activity与用户进行交互的界面。

例如,view可以显示一个小图片,并在用户指点它的时候产生动作。

Android有一些预置的view供开发者使用——包括按钮、文本域、滚动条、菜单项、复选框等等。

view的层次结构是由Activity.setContentView() 方法放入activity的窗口之中的。

content view是位于层次结构根位置的View对象。

(参见独立的用户界面文档以获取关于view及层次结构的更多信息。

)(2) Serviceservice没有可视化的用户界面,而是在一段时间内在后台运行。

例如,一个service可以在用户做其它事情的时候在后台播放背景音乐、从网络上获取数据或者计算一些东西并提供给需要这个运算结果的activity使用。

每个service都继承自Service基类。

一个媒体播放器播放播放列表中的曲目是一个不错的例子。

播放器应用程序可能有一个或多个activity来给用户选择歌曲并进行播放。

然而,音乐播放这个任务本身丌应该由任何activity来处理,因为用户的期望即使在他们离开播放器的应用程序而已经在开始做别的事情时,音乐仍然在继续播放。

为达到这个目的,媒体播放器activity可以启动一个运行于后台的service服务。

系统将在这个activity不再显示于屏幕后,仍维持音乐播放的service的运行。

连接至(绑定到)一个正在运行的service(如果service没有运行,则启动之)是可能的。

连接之后,你可以通过那个service暴露出来的接口不service进行通讯。

对于音乐service来说,这个接口可以允许用户暂停、回退、停止以及重新开始播放。

如同activity和其它的组件一样,service服务运行于应用程序进程的主线程内。

所以它不会对其它组件或者用户界面有任何的妨碍作用,它们一般会派生一个新线程来执行一些时间消耗型任务(比如音乐回放和网络下载)。

参见稍后的进程和线程介绍。

(3) BroadcastReceiverbroadcast receiver是一个与注于接收广播通知信息,并做出相应处理的组件。

许多广播是由系统代码产生的——例如,通知时区改变、电池电量低、拍摄了一张照片或者用户改变了语言选项。

应用程序也可以发起广播——例如,通知其它应用程序一些数据已经下载到设备上并处于可用状态。

一个应用程序可以拥有任意数量的broadcast receiver,以对所有它认为重要的通知信息予以各种响应。

所有的receiver均继承自BroadcastReceiver基类。

broadcast receiver没有用户界面。

然而,它们可以启动一个activity或者service 来响应它们收到的信息,当然也可以使用NotificationManager来通知用户。

通知可以用多种方式来吸引用户的注意力──闪动背光灯、震动设备、播放声音等等。

通知一般是在状态栏上放一个持丽的图标,用户可以点击打开它并获取所要消息。

(4)Contentprovidercontent provider将一些特定的应用程序数据供给其它应用程序使用处理。

数据可以存储于文件系统、SQLite数据库或其它有意丿的方式。

content provider继承于ContentProvider 基类,实现了一套使得其他应用程序能够检索和存储它所管理的类型数据的标准方法。

然而,应用程序并不直接调用返些方法,而是使用一个ContentResolver 对象,调用它的方法作为替代。

ContentResolver可以与任何content provider进行会话;与其合作对任何相关的进程间通讯进行管理。

参阅独立的Content Providers文档以获得更多关于使用content provider的信息。

每当出现一个需要被特定组件处理的请求时,Android会确保那个组件的应用程序进程处于运行状态,必要时会启动它,并确保那个组件的一个合适的实例可用,必要时会创建那个实例。

1.2激活组件:intent当接收到ContentResolver发出的请求后,content provider被激活。

而其它三种组件——activity、service和broadcast receiver,被一种叫做intent的异步消息所激活。

intent是一个保存着消息内容的Intent对象。

对于activity和service来说,它指明了所请求的操作名称,并指定了用来操作的数据的URI和其它一些信息。

例如,它可以承载一个对一个activity的请求,让它为用户显示一张图片,或者让用户编辑一些文本。

而对于broadcast receiver来说,Intent对象指明了所通报的操作。

例如,它可以对所有感兴趣的对象通报照相按钮被按下。

对于每种组件来说,激活的方法也是不同的:1 通过传递一IntentContext.startActivity()Activity.startActivityForResult(以启动(或指定新工作给)另外一个activity。

相应的activity可以通过调用自身的getIntent() 方法来查看并且激活它的intent。

Android通过调用activity的onNewIntent()方法来传递给它随后的任何intent。

一个activity经常启动另一个activity。

如果它期望它所启动的那个activity返回一个结果,它会调用startActivityForResult()而不是startActivity()。

例如,如果它启动了另外一个activity以使用户挑选一张自己的照片,它也许想知道哪张照片被选中了。

其结果将会被封装在一个Intent对象中,并传递给发出调用的activity 的onActivityResult() 方法。

2 通过传递一个Intent对象至Context.startService()以启动一个service(或向正在运行的service给出一个新的指令)。

Android调用此service的onStart()方法并将Intent对象传递给它。

相关文档
最新文档