搜档网
当前位置:搜档网 › android系统外文翻译

android系统外文翻译

android系统外文翻译
android系统外文翻译

附录一:英文翻译原文

Abstract

With the development of the mobile phone market,3G mobile phone system development has also become popular on the maket. This paper introduces some basic applications of the Android system about a part of the Application Fundamentas book translation, so that more learners can easily learn about the development and application of the Android system. Translation about this paper is my personal understanding of the Application Fundaments, there are some similarities and differences with the original, and if you would like to know more about or more detailed about basic application of Android system,please read the original article referenced this article, this paper only introduces basic application of the Android system about applicatedcomponent,closecomponent,manifestfile,the Intent filter.

Key word:application components, closed components , Intent filter, manifest files, activity, Service,Broadcast receiver , Content provider

Android applications are written in the Java programming language. The compiled Java code — along with any data and resource files required by the application — is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application.

In many ways, each Android application lives in its own world:

1. By default, every application runs in its own Linux process. Android starts the process when any of the application's code needs to be executed, and shuts down the process when it's no longer needed and system resources are required by other applications.

2. Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications.

3. By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only to that user and only to the application itself — although there are ways to export them to other applications as well.

It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can also arrange to run in the same Linux process, sharing the same VM.

Application 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 change settings. Though they work together to form a cohesive user interface, each activity is independent of the others. Each one is implemented as a subclass of the Activity base class.

An application might consist of just one activity or, like the text messaging application just mentioned, it may contain several. What the activities are, and how many there are depends, of course, on the application and its design. Typically, one of the activities is marked as the first one that should be presented to the user when the application is launched. Moving from one activity to another is accomplished by having the current activity start the next one.

Each activity is given a default window to draw in. Typically, the window fills the screen, but it might be smaller than the screen and float on top of other windows. An activity can also make use of additional windows — for example, a pop-up dialog that calls for a user response in the midst of the activity, or a window that presents users with vital information when they select a particular item on-screen.

The visual content of the window is provided by a hierarchy of views — objects derived from the base View class. Each view controls a particular rectangular space within the window. Parent views contain and organize the layout of their children. Leaf views (those at the bottom of the hierarchy) draw in the rectangles they control and respond to user actions directed at that space. Thus, views are where the activity's

interaction with the user takes place.

For example, a view might display a small image and initiate an action when the user taps that image. Android has a number of ready-made views that you can use —including buttons, text fields, scroll bars, menu items, check boxes, and more.

A view hierarchy is placed within an activity's window by the Activity.setContentView() method. The content view is the View object at the root of the hierarchy. (See the separate User Interface document for more information on views and the hierarchy.)

Services

A 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 receivers

A 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 providers

A 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: intents

Content 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 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.sendBroadcast(), Context.sendOrderedBroadcast(), and Context.sendStickyBroadcast() in any of their variations.

Android delivers the intent to all interested broadcast receivers by calling their onReceive() methods. For more on intent messages, see the separate article, Intents and Intent Filters.

Shutting down components

A 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: 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 file

Before 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:

Figure 1 the struck of Activity

The name attribute of the 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 — elements for services, elements for broadcast receivers, and 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 filters

An 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

Figure 2 the struck of the Intent

The first filter in the example —the combination of the action "android.intent.action.MAIN" and the category"https://www.sodocs.net/doc/f75472019.html,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 IntentFilter object. All other filters are set up in the manifest.

For more on intent filters, see a separate document, Intents and Intent Filters.

附录二:英文翻译译文

摘要

随着手机市场的发展,3G手机逐渐占领手机市场,3G手机系统开发也成为市场上的热门技术。本论文主要介绍android系统的一些基本应用程序,是对Application Fundamentals这本书的部分翻译,让更多的学习者可以轻松的学习了解android系统的开发和应用。论文中的翻译内容是本人对Application Fundamentals的个人理解,与原著存在一些异同,想了解更多关于或更详细android系统应用基础可以参考本文阅读原著,本文只对android系统应用基础中的应用组件、关闭组件、manifest文件、Intent过滤器进行简单的描述介绍。

关键字:应用组件、关闭组件、manifest文件、Intent过滤器、activity、Service、Broadcast receiver、Content provider

Android应用程序使用Java编程语言开发。aapt工具把编译后的Java代码连同应用程序所需的其他数据和资源文件一起打包到一个Android包文件中,这个文件使用.apk作为扩展名。此文件是分发并安装应用程序到移动设备的载体;是用户下载到他们的设备的文件。单一.apk文件中的所有代码被认为是一个应用程序。

从多个角度来看,每个Android应用程序都存在于它自己的世界之中:

1默认情况下,每个应用程序均运行于它自己的Linux进程中。当应用程序中的任何代码需要被执行时,Android启动此进程,而当不再需要此进程并且其它应用程序又请求系统资源时,则关闭这个进程。

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

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

1 应用程序组件

Android的一个核心特性就是一个应用程序可以使用其它应用程序的元素(如果那个应用程序允许的话)。例如,如果你的应用程序需要显示一个图片卷动列表,而另一个应用程序已经开发了一个合用的而又允许别的应用程序使用的话,你可以直接调用那个卷动列表来完成工作,而不用自己再开发一个。你的应用程序并没有吸纳或链接其它应用程序的代码。它只是在有需求的时候启动了其它应用程序的那个功能部分。为达到这个目的,系统必须能够在一个应用程序的任何一部分被需要时启动一个此应用程序的进程,并将那个部分的Java对象实例化。因此,不像其它大多数系统上的应用程序,Android应用程序并没有为应用程序提供一个单独的入口点(比如说,没有main()函数),而是为系统提供了可以实例化和运行所需的必备组件。一共有四种组件类型:

1 Activity

activity是为用户操作而展示的可视化用户界面。例如,一个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 Service

service没有可视化的用户界面,而是在一段时间内在后台运行。例如,一个service可以在用户做其它事情的时候在后台播放背景音乐、从网络上获取数据或者计算一些东西并提供给需要这个运算结果的activity使用。每个service都继承自Service基类。

一个媒体播放器播放播放列表中的曲目是一个不错的例子。播放器应用程序可能有一个或多个activity来给用户选择歌曲并进行播放。然而,音乐播放这个任务本身丌应该由任何activity来处理,因为用户期望即使在他们离开播放器应用程序而开始做别的事情时,音乐仍在继续播放。为达到这个目的,媒体播放器activity可以启动一个运行于后台的service。系统将在这个activity不再显示于屏幕乀后,仍维持音乐播放service的运行。

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

是可能的。连接之后,你可以通过那个service暴露出来的接口不service进行通讯。对于音乐service来说,这个接口可以允许用户暂停、回退、停止以及重新开始播放。

如同activity和其它组件一样,service运行于应用程序进程的主线程内。所以它不会对其它组件或用户界面有任何妨碍,它们一般会派生一个新线程来执行一些时间消耗型任务(比如音乐回放)。参见稍后的进程和线程。

3 Broadcast receiver

broadcast receiver是一个与注于接收广播通知信息,并做出相应处理的组件。许多广播是由系统代码产生的——例如,通知时区改变、电池电量低、拍摄了一张照片或者用户改变了语言选项。应用程序也可以发起广播——例如,通知其它应用程序一些数据已经下载到设备上并处于可用状态。

一个应用程序可以拥有任意数量的broadcast receiver,以对所有它认为重要的通知信息予以响应。所有的receiver均继承自BroadcastReceiver基类。

broadcast receiver没有用户界面。然而,它们可以启动一个activity来响应它们收到的信息,或者也可以使用NotificationManager来通知用户。通知可以用多种方式来吸引用户的注意力──闪动背光灯、震动设备、播放声音等等。通知一般是在状态栏上放一个持丽的图标,用户可以打开它并获取消息。

4 Content provider

content provider将一些特定的应用程序数据供给其它应用程序使用。数据可以存储于文件系统、SQLite数据库或其它有意丿的方式。content provider继承于ContentProvider基类,实现了一套使得其他应用程序能够检索和存储它所管理的类型数据的标准方法。然而,应用程序并不直接调用返些方法,而是使用一个ContentResolver对象,调用它的方法作为替代。ContentResolver可以与任何content provider进行会话;与其合作对任何相关的进程间通讯进行管理。

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

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

1.1激活组件: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对象传递给它。

与此类似,一个intent可以被传递给Context.bindService()以建立一个处于调用组件和目标service乀间的活动连接。此service会通过onBind() 方法的调用来获取此Intent对象(如果此service尚未运行,bindService()会先启动它)。例如,一个activity可以建立一个不前述的音乐回放service的连接,这样它就可以提供给用户一些途径(用户界面)来控制回放。这个activity可以调用bindService()来建立此连接,然后调用service中定之的方法来控制回放。稍后的远程方法调用一节有关于如何绑定至一个service的更多细节。

3 应用程序可以通过传递一个Intent对象至Context.sendBroadcast() ,Context. sendOrderedBroadcast(),以及Context.sendStickyBroadcast()和其它类似方法来发起一个广播。Android会调用所有对此广播有兴趣的broadcast receiver的onReceive()方法,将此intent传递给它们。

1.2关闭组件

content provider仅在响应来自ContentResolver的请求时处于活动状态。而broadcast receiver仅在响应一条广播信息的时候处于活动状态。所以没有必要去显式地关闭返些组件。而activity则不同,它提供了用户界面。只要会话依然持续,无论会话过程有无空闲,activity同用户进行长时间会话且可能一直处于活动状态。与此相似,service也会在很长一段时间内保持运行。所以Android为关闭activity 和service提供了一系列有序的方法。

activity可以通过调用自身的finish()方法来关闭。一个activity可以通过调用finishActivity()方法来关闭另外一个activity(它用startActivityForResult() 启动的。service可以通过调用自身的stopSelf()方法,或调用Context.stopService()来停止。

系统也会在组件不再被使用的时候戒者当Android必须为更多的活动组件回收内存时关闭它。稍后的组件的生命周期一节,将对返种可能性及结果进行更详细的认论。

1.3 manifest文件

当Android启动一个应用程序组件之前,它必须知道那个组件是存在的。因此,应用程序会在一个被打包到Android包中的manifest文件中声明它的组件,.apk 文件还将涵括应用程序的代码、文件以及其它资源。

manifest文件是一个结构化的XML文件,而且对于所有应用程序,文件名总是AndroidManifest.xml。除了声明此应用程序各个组件,它会做很多其他工作,比如指明应用程序所需链接到的库的名称(除了默认的Android库乀外)以及标出应用程序期望获得的各种权限。

但manifest文件最重要的任务是向Android报告此应用程序的各个组件。丼例说明,一个activity可能声明如下:

图 1 Activity配置结构图

元素的name属性指定了实现此activity的Activity子类。icon和label 属性指向包含展示给用户的此activity的图标和标签的资源文件。其它组件也以类似的方法声明—元素用于声明service,元素用于声明broadcast receiver,而元素用于声明content provider。未在manifest文件中进行声明的activity、service以及content provider将不为系统所见,从而也就永不会被运行。然而,broadcast receiver既可以在manifest文件中声明,也可以在代码中动态创建(为BroadcastReceiver对象),并以调用Context.registerReceiver()的方式注册至系统。

1.4 Intent过滤器

一个Intent对象可以显式地指定一个目标组件。如果进行了返种指定,Android会找到这个组件(基于manifest文件中的声明)并激活它。但如果intent 没有显式地指定一个目标,Android就必须找到最合适的组件来响应此intent。这个过程是通过比较Intent对象和所有潜在目标的intent过滤器完成的。组件的intent 过滤器会通知Android它所能处理的intent类型。如同组件的其它必要信息一样,这些intent过滤器是在manifest文件中进行声明的。返里有一个对先前例子的扩展,其中加入了针对activity的两个intent过滤器:

图 2 Intent配置结构图

示例中的第一个过滤器——action“android.intent.action.MAIN”和

category“https://www.sodocs.net/doc/f75472019.html,UNCHER”的组合——是常见的一个。它标明

了此activity应该在应用程序启动器中显示,就是用户在屏幕上看到的此设备上可供启动的应用程序的列表。换句话说,这个activity是应用程序的入口点,是用户在启动器中选择运行这个应用程序后所见到的第一个activity。

第二个过滤器声明了此activity在一种特定类型的数据上可以执行的操作。

一个组件可以拥有任意数量的intent过滤器,每个都声明了一套不同的功能。

如果组件

没有包含任何过滤器,它只能被显式地指明作为目标组件的intent激活。对于在代码中创建并注册的broadcast receiver来说,intent过滤器将被直接实例化IntentFilter为对象。其它所有的过滤器都在manifest文件中设置。

Android开发入门教程经典解析-JAVA语言

Android入门教程之Java核心技术阶段初级课程,从知识分类来说,可以分为三个部分来说明: (一)基础语法: 讲解Java发展史,Java环境搭建,环境变量配置,Java程序的基本结构,java和javac命令的使用,Notepad++工具的使用,语法格式,变量和常量,二进制转换,运算符、表达式,分支结构和循环结构语句,数组与多维数组,冒泡排序,二分查找,随机生成一组不重复的数算法,通过模拟一个双色球案例,把基础语法容融会贯通,打下扎实的基础。 (二)面向对象: 讲解Java中的OOP/OOD/OOA的知识,深入讲解OOP的封装、继承、多态、抽象的概念与实际应用,涉及内容为类与对象的定义和关系,封装分别在Java EE开发和Android开发中的不同,对象的引用传递,对象的内存分配和GC,构造方法和匿名对象,如何开发和定义一个类,深入讲解String类的原代码原理内部实现、特性和内存管理,通过四种字符串连接时的场景分析来深入理解Java编译期和运行期的区别,String的相关操作方法;static 关键字,构造方法私有化,对象数组与动态数组的实现原理,链表数据结构,内部类及优缺点,在EE开发和Android开发的区别和经验;继承的思想,方法重写与重载,super关键字,抽象类、接口和多态的思想,以及真实环境中的应用,Object类,包装类与特性,包与修饰符;课程贯彻的设计模式有:单例模式、工厂模式、策略模式、适配器模式、模板方法模式、代理模式。以及OO设计中的六大原则。通过本节课程你可以彻底理解什么是面向对象编程,加以时日练习,必成大器。 (三)Eclipse与异常处理 异常的基本处理格式和5大关键字的联合使用,Java中异常处理的新特性,自定义异常类,编译时异常与运行时异常的区别,JVM对异常的处理过程,经过前两节课程共两周多的Notepad++写代码,已经达到了纯手写代码的目的,本节课程开始引入了99.9%的程序员都在使用的集成开发环境Eclipse,他对异常调试的强大支持,会让你叹为观止,当然Eclipse 不仅仅只有这些,在这里,你将一一学到。 Android入门教程之Java核心技术阶段中级课程,Java基础、面向对象、Java高级开发,讲解以下内容: (一)常用类库API与算法 讲解StringBuffer类的内部原理,分析原代码实现,与String的区别与应用经验,如何实现国际化程序,日期操作API,Comparable的两种实现,对象克隆,Arrays工具类、Math 工具类、Random类的使用,选择排序算法和二叉树数据结构实现,通过本节课程,你将学到常用类库API和工作中最最常见的排序算法和二叉树,本节过后,你的功力又增强了。 (二)IO与New IO

外文翻译-基于Android智能家居系统

通信工程学院 毕业设计外文翻译 毕业设计题目基于ANDRIO的智能家居 系统的设计与实现 外文题目UBIQUITOUS SMART HOME SYSTEM USING ANDROID APPLICATION 专业:通信工程 学号: 学生姓名: 指导教师姓名: 指导教师职称:副教授 日期:2015 年 1 月10 日

International Journal of Computer Networks & Communications (IJCNC) V ol.6, No.1, January 2014 基于Android应用的无处不在的智能家居系统 Shiu Kumar Department of Information Electronics Engineering, Mokpo National University, 534-729, Mokpo, South Korea 摘要 本文提出了一种灵活独立的,低成本的智能家居系统,它是基于Android应用与微web服务器通信,不仅仅提供交换功能。Arduino以太网的使用是为了避免使用个人电脑从而保证整个系统成本最低,语音激活时用来实现切换功能的。光开关,电源插头,温度传感器,湿度传感器,电流传感器,入侵检测传感器,烟雾/气体传感器和警报器等这些设备集成在系统中,表明了所提出的智能家居系统的有效性和可行性。经过检测,智能家居应用程序可以成功地进行智能家居操作,例如开关功能,自动环境监测,和入侵监测,在监测到有不法入侵后,系统会自动发送一个邮件,并响警笛。 关键字: Android智能手机,智能家居,物联网(loTs),远程控制 1.引言 随着移动设备受欢迎程度的不断增长和人们日常生活中对无处不在的先进的移动应用的功能需求不断增加,利用Web服务是提供远程访问服务的最开放和可互操作的方式,并且使应用程序能够彼此通信。一个有吸引力的市场产品自动化和网络化是忙碌的家庭和有生理缺陷的个人的代表。 loTs可以被描述为连接智能手机,网络电视,传感器等到互联网,实现人们之间沟通的新形势。过去几年中loTs的发展,创造了一个新层面的世界。这使得人们可以在任何时间,任何地点,联通任何期望的东西。物联网技术可用于为智能家居创建新的概念和广阔的空间,以提供智能,舒适的发展空间和完善生活质量。 智能家居是一个非常有前途的领域,其中有各种好处,如增加提供舒适性,更高安全性,更合理地使用能源和其他资源。这项研究的应用领域非常重要,未来它为帮助和支持有特殊需求老的人和残疾人士提供了强有力的手段。设计一个智能家居系统时需要考虑许多因素,该系统应该是经济实惠的,是可伸缩的,使得新的设备可以容易地集成到系统中,此外,它应该是用户友好的。 随着智能手机用户的急剧增加,智能手机已经逐渐变成了具备所有功能的便携式设备,为人们提供了日常使用。本文介绍了一种低成本的控制和监视家居环境控制的无线智能家居系统。利用Android设备,可以通过一个嵌入式微Web服务器与实际的IP连接,访问和控制电器和远程的其它设备,这可以利用任何支持Android的设备。Arduino Ethernet 用于微Web服务器从

(精品文献)Android外文翻译

本科毕业设计(论文)外文参考文献译文及原文 学院信息工程学院 专业测控技术与仪器 (光机电一体化方向) 年级班别 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)Activity

Java作为Android开发语言的原因

Java作为Android开发语言的原因 1 Java语言的影响及谷歌选择的原因 1.1 Java语言的影响 (1)JUnit 在这十年里,JUnit带来了测试驱动开发的普及浪潮。许多其它流行语言的单元测试版本也跟着被创造出来了,例如.NET、C、Python、Perl。 (2)Eclipse 刚进入20世纪,随着Java语言和它的API的成熟,EclipseIDE(集成开发环境)为程序员提供了一个帮助他们提高生产效率和融入到成长中的Java社区的环境。Eclipse也是第一个用SWT UI工具包的大型项目。Eclipse已经逐步向成为一个普及的集成开发环境的目标发展。现在它为集成平台插件提供了丰富的基础平台。 (3)Spring Spring框架在提高Java开发人员的生产效率方面扮演着一个重要的角色。它维持了简单和特点的平衡。Spring为Java开发人员提供了一套服务。这套服务提供了普遍使用的应用功能,例如数据访问和事务管理。作为Sun公司的企业JavaBean系统的竞争者,Spring为Java应用开发创造出了另外一个可选的简单的路径,同时也创造出了一个Java 应用开发思想上的健康竞争。 (4)Solr 多年来,Solr服务器(集成了Lucene搜索引擎)已经为web和企业应用提供了一个简单实用的搜索功能的解决方案。Solr 的特别之处在于它为强力和快速的Lucene搜索库提供了HTTP访问,使它能够成为任何系统的一部分,无论这系统是不是由Java实现。比其它项目好的地方,Solr已经使强力快速的搜索成为现代Web应用的一个可选项。 (5)Hudson and Jenkins 原名为Hudson,现在也叫Jenkins,这个持续集成工具是Java 开发设置的关键部分。Jenkins为软件项目提供了自动构建和测试。随着JUnit的测试持续集成,Jenkins在Java的平台上是敏捷研发成为可能。虽然Hudson和Jenkins现在集成在一起,但并没有偏离Kohsuke Kawaguchi的努力,Kohsuke使它成为世界级的持续集成平台,并提高了大部分Java研发的质量。 (6)Hadoop是著名的MapReduce模型的Java实现。它的强壮使得最大多数的“大数据”系统成为可能。通过降低从巨大的数据中抽取有价值的数据的成本,Hadoop 已经被大量使用,如Facebook用它来做海量数据分析,Yahoo!的个人和广告业务,还有很多其他的公司。 (7)Android Google选择用Java语言作为它十分流行的Android移动操作系统的编程语言。这个选择在整个件研发人员的社区中引起了新的关注。Android程序编译过程比普通Java程序要多经过一个步骤,将JVM二进制码转换成Dalvik二进制码。Google 已经可以利用Eclipse 为软件研发人员提供一个成熟的编写Android应用的开发环境。 1.2谷歌选择Java作为其开发Android的原因 Android支持使用Java作为编程语言来开发应用程序,而Android的Java开发方面从接口到功能,都有层出不穷的变化。考虑到Java虚拟机的效率和资源占用,谷歌重新设计了Android的Java,以便能提高效率和减少资源占用,因而与J2ME等不同。其中Activity等

Android手机外文翻译---应用程序基础Android Developers

英文原文及译文 Application Fundamentals Android applications are written in the Java programming language. The compiled Java code —along with any data and resource files required by the application —is bundled by the aapt tool into an Android package, an archive file marked by an .apk suffix. This file is the vehicle for distributing the application and installing it on mobile devices; it's the file users download to their devices. All the code in a single .apk file is considered to be one application. In many ways, each Android application lives in its own world: 1. By default, every application runs in its own Linux process. Android starts the process when any of the application's code needs to be executed, and shuts down the process when it's no longer needed and system resources are required by other applications. 2. Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications. 3. By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only to that user and only to the application itself — although there are ways to export them to other applications as well. It's possible to arrange for two applications to share the same user ID, in which case they will be able to see each other's files. To conserve system resources, applications with the same ID can also arrange to run in the same Linux process, sharing the same VM. Application 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

如何向android的setting语言列表中添加一门语言

如何向android的setting语言列表中添加一门语言(已经解决) 看了下,android2.2系统有越南语的字库,所以支持越南语,但setting中语言列表里没有越南语选项,起初我在LocalePicker.java的onCreate方法的133行做了如下修改: 1.mLocales = new Loc[finalSize+1]; 2.for (int i = 0; i < finalSize ; i++) { 3.mLocales[i] = preprocess[i]; 4.} 5.Locale temp = new Locale("vi", "VN");//vi是越南语 6.mLocales[finalSize] = new Loc(toTitleCase(getDisplayName(temp)), temp); 7.Arrays.sort(mLocales); 复制代码 重新编译后,语言列表里有了越南语,但点击后系统语言还是默认的英文,也就是说系统语言没有更改成功,我再看了下/data/property/目录下关于语言和国家的两个属性文件都是修改成功了的,再继续往下跟代码,但没有所获,google了一下,搜到了一篇关于android2.1 架构解析之语言定制的帖子(https://www.sodocs.net/doc/f75472019.html,/gigatron/blo ... c8ab20843bd0e24445d,有兴趣的朋友可以看下),里面说语言选择列表在external/icu4c/stubdata/Android.mk中配置,我在这里面添加了越南语,最后返回上一级,查看readme.txt,官方已经给出说明,改动后需要将语言配置的txt转成dat,可是在run icu_dat_generator.py 4.2这个命令时一直报错,到现在还没弄好,希望有涉及过这方面的朋友分享下经验,谢谢! 问题已经解决,解决步骤开始写在回复里,现在直接写到该位置吧: 第一种:修改配置文件 位置:build/target/product/languages_full.mk| languages_small.mk,这两个文件里头,有PRODUCT_LOCALES := en_US en_GB fr_FR it_IT es_ES es_US 这样的片段,其实setting中语言选择列表的数据源头就来源于此,既然找到了源头,那只要在之后加上我们想要的语言即可,比如要加越南语只要在后面加上“vi_VN”即可,但细心的同学打开这两个文件比较的时候会发现一个问题: 里面都有PRODUCT_LOCALES :=这样的片段,只是languages_small.mk 的语言要比前者少些,聪明,这就是答案,从命名上也可发现一个full一个small,当我们不需要更多的语言时候,那languages_small.mk里面的语言就可以满足,而且语言少,生成的image所占用的空间也会相对小些,没验证过哈,只是根据同目录下full.mk里的注释“Get a list of languages. We use the small list to save space on smaller devices.”推测的。 好了,接下来,会有一个问题就是在哪个地方去设置full还是small呢?刚提到一个full.mk的文件,这里面有这样的片段:$(call inherit-product, build/target/product/languages_small.mk),后者路径就是我们要设置的地方。好了,改好后,得整个make下,这个得花些时间,好多模块都是重新编译。 第二种:编码方式修改 Android里一个listview会对应一个数据数组,那我们只需在这个数组里按格式添加我们所需要的数据就行了,我们的目标是com.android.settings.LocalePicker.java,在

基于安卓的大学生记账管理系统的设计与实现-外文翻译译文和原文

基于安卓的大学生记账管理系统的设计与实现-外文翻译译 文和原文 毕业设计外文文献翻译 院系: 计算机与信息工程学院年级专业: 12软件工程(金融服务)2 姓名: 学号: An Analysis of Personal Financial Lit Among 附件: College Students Among College Students 指导老师评语: 指导教师签名: 年月日 大学生个人理财知识分析 大学生个人理财知识分析 这项研究调查了924名大学生审视自己的个人财务知识;调查了学生的财务知识与学生的特性之间的关系,和理财知识对学生的意见和决定的影响。结果表明,参与者回答问题的正确性为53,。所调查的人包括非经营性专业、妇女、在下层阶级行列的学生、30岁以下并且很少有工作经验的人、知识水平较低者。懂得较少财务知识的学生往往有错误的观点和作出不正确的决定。结论是:大学生不太了解个人理财。低的财务知识水平会限制他们做出明智决策的能力。 I. 介绍 管理个人财务的能力在当今世界已经变得越来越重要。人们必须计划为他们的退休和子女的教育长期投资。他们还必须决定短期储蓄和借贷一个假期,向下支付

房子,汽车贷款和其他大件物品。此外,他们还必须管理自己的医疗保险和人寿保险的需求。 不幸的是,研究表明,美国人有个人认识不足财政(EBRI,1995年,毕马威会计师事务所,1995年; PSRA,1996年,1997年,奥本海默基金/女孩公司,1997年;先锋集团/货币杂志,1997年)。他们未能作出正确决策因为他们还没有收到良好的个人理财教育(HSR,1993年,希拉,1993;奥尼尔,1993年)。 这项研究有三个目的。首先,它提供大学生个人理财素养的证据。其次,它会检查为什么一些大学生相对比别人有更多的理财知识。该分析可以帮助我们识别出大学生所拥有决定能力水平的因素。第三个目的是检查学生的知识如何影响他/她的意见和个人财务问题上的决定。 本文的结构安排如下。第二部分回顾了以前对金融知识的研究。第三部分是讨论方法。第四部分是提出的结果。第五部分总结全文。 II. 文献回顾 大部分以前的研究都是由在金融服务行业的从业人员进行。他们专注于资金管理和投资有关的问题。这个重点与会计师财务策划师的调查结果一致,说明这些问题是个人理财规划的重要领域(NEFE,1993-1996)。这些研究结果表明,参与的调查者回答调查问题的正确率普遍只有不到60,。 此前高中生的研究均发现,他们在个人财务的基本知识上未受到良好的教育,并且知识贫乏(巴肯,1967; CFAJAMEX,1991; HSR,1993; Langrehr,1979; NAEP,1979)。在对来自63所学校的1509高中学生的调查研究中,曼德尔(1997)报告了一个平均正确的比分,57,在收入、资金管理、储蓄、投资和消费等领域。他的结论是:学生们离开学校时没有做出关键决策影响他们生活的能力。 难道成年人对个人理财和投资有一个很好的控制,几个结果研究表明,他们并 1

安卓原生开发语言及优势分析

时代的发展和进步督促着我们一步步前进,只有不断的创新,企业才能进步发展。我们着眼于未来,积极发掘市场需求,这样,就可以使我们的企业走向长期的成功和繁荣。shenh uax2 AndroidAPP是一种手机应用软件,是使用在安卓手机上或者是Android系统的第三方应用程序。APP的英文Application的简称,通常是指iphone,安卓等手机应用软件,现在的APP多指智能手机的第三方应用程序。 目前国内的Android APP商店众多,新的十大安卓应用市场排名:360手机助手、百度手机助手、应用宝、豌豆荚、小米商店、安卓市场、91市场、淘宝手机助手、安智市场、移动MM市场。 安卓原生开发优势 1、Android是用户量多的移动操作系统 新中国智能手机市场报告, 2015年第一季度中国智能手机出货量同比增长了17%,总计达到1.1亿部。庞大的手机用户量为开发提供了良好的发展前景。 2、Android APP 推广相对容易 相较于苹果手机用户,安卓用户的下载就相对容易非常多,用户不仅可以通过应用商店下载您的应用,同时运营商能够通过二维码推广为用户提供推广途径,吸引更多用户下载。 3、Android 系统开放性高 相对苹果系统的全封闭式,安卓系统的高度开放,给了开发者相当高的开发自由度,您的应用可以更加接近您所想所要的。 4、安卓原生开发开发语言 安卓应用软件开发语言有C语言和其他语言,但是主流的开发语言是Java语言,使接口到功能,都有层出不穷的变化。提高了软件的交互的可能性是Java的特性,可以说安卓手机几乎所有的应用程序都是利用Java语言来进行编写的。使用Java语言开发的软件的程序库、数据库、运行库都是Android手机软件的一大特点。Java语言自身的优点也有很多,所以安卓应用软件的开发应用到了Java的核心类的知识量,这也让使用Java语言开发的安卓软件具备优势。 1、Java语言是发展快的程序语言,具有面向对象的特点,比较通俗易懂; 2、Java语言的显著特点就是简单,继承了C++语言的先进精华,是计算机程序语言发展的一大进步; 3、Java语言拥有独立的体系结构,可以不受限制,随意在任何系统当中运行,所以体系结构的中立决定了Java语言可以在不同的计算机结构中得以运行。使用Java语言开发的不同程序在不同结构的计算机显示的语言位数却是统一的。

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-footprint

(完整word版)按键精灵Android版MQ语言基础说明

按键精灵Android版:MQ 语言 MQ是按键精灵针对旗下移动产品而设计的全新脚本开发语言。语言支持全中文阅读脚本,上手简单,易学易用。MQ语言的基本特性如下: 1 数据类型 在MQ语言里,数据类型包括如下5种: Null : 不包含任何有效数据; Boolean:仅包含True和False两个常数; Integer:32位有符号整数,范围为-2,147,483,648 到2,147,483,647 之间; Float:双精度浮点数,负数范围从-1.79769313486232E308 到 -4.94065645841247E-324,正数范围从4.94065645841247E-324 到 1.79769313486232E308; String : 字符串。 MQ语言为动态类型,即定义变量时并不指定类型,在给变量赋值时才确定类型,并且类型随时可以通过赋值操作而变化。 常量 MQ语言中,用户可直接在脚本内写入没有命名的常量的,具体类型与写法如下: 整数型:可直接输出整数数字,如100;亦可加&H前缀,表明该常量为16进制数字,如&H64。浮点型:可直接输出小数点数字,如3.1415;亦可采用E分隔整数和底数部分,如314.15e-2。字符串型:凡采用一对双引号包含的内容均被视为字符串型常量。其中允许使用转义字符包括有:'\b' (退格),'\f' (表单),'\n' (换行),'\r' (回车),'\t' (横向制表),'\v' (纵向制表),'\\' (反斜杠),'\" '(双引号),以及'\' '(单引号)。另外也支持反斜杠

加数字来描述一个字符。(注意,如果需要在这种描述方法后接一个是数字的字符,那么反斜杠后必须写满三个数字)。 MQ语言中有一下已经预先定义好的常量,目标包括True和False(不区分大小写),今后还会增加。 变量 MQ语言的命名方式如下: 变量名不区分大小写,同时关键字(如If、Dim)与子程序的名字也无须区分大小写。 变量名、关键字及子程序的命名同时支持中文及英文,除了第一个字母外,后续内容还可以用数字。 变量在使用前必须用Dim语句定义,但Dim语句不必指定类型。声明多个变量时,使用逗号分隔变量。例如:Dim Top, Bottom, Left, Right, 上, 下, 左2, 右1。 变量的作用域由声明它的位置决定。如果在子程序中声明变量,则只有该子程序中的代码可以访问或更改变量值,此时变量具有局部作用域并被称为局部变量。如果在子程序之外声明变量,则该变量可以被当前脚本的所有子程序所识别,称为全局变量。 变量还可以定义为数组的形式,数组可以是一维的,也可以是多维的,数组的每个维度的索引都是从0开始的正整数,当定义一维数组时,可以指定数组的初始元素个数,也可以不指定。如:Dim Array() Dim Array(10) 上述例子都可以定义一个一维数组。但即使指定了数组的初始元素个数,以后也可以随时增加新的元素(直接访问新的元素即可)。当定义多维数组的时候,则必须指定数组在每个维度的初始元素个数,各个维度的初始元素个数之间用逗号分隔,如:

Android应用架构外文翻译

Android Application Architecture author:Lars V ogel 1、AndroidManifest.xml The 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. 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 the

android的多国语言适配

android多国语言文件夹 android多国语言文件夹文件汇总如下:(有些语言的书写顺序可能跟中文是相反的)中文(中国):values-zh-rCN 中文(台湾):values-zh-rTW 中文(香港):values-zh-rHK 英语(美国):values-en-rUS 英语(英国):values-en-rGB 英文(澳大利亚):values-en-rAU 英文(加拿大):values-en-rCA 英文(爱尔兰):values-en-rIE 英文(印度):values-en-rIN 英文(新西兰):values-en-rNZ 英文(新加坡):values-en-rSG 英文(南非):values-en-rZA 阿拉伯文(埃及):values-ar-rEG 阿拉伯文(以色列):values-ar-rIL 保加利亚文: values-bg-rBG 加泰罗尼亚文:values-ca-rES 捷克文:values-cs-rCZ 丹麦文:values-da-rDK 德文(奥地利):values-de-rAT 德文(瑞士):values-de-rCH 德文(德国):values-de-rDE 德文(列支敦士登):values-de-rLI 希腊文:values-el-rGR 西班牙文(西班牙):values-es-rES 西班牙文(美国):values-es-rUS

芬兰文(芬兰):values-fi-rFI 法文(比利时):values-fr-rBE 法文(加拿大):values-fr-rCA 法文(瑞士):values-fr-rCH 法文(法国):values-fr-rFR 希伯来文:values-iw-rIL 印地文:values-hi-rIN 克罗里亚文:values-hr-rHR 匈牙利文:values-hu-rHU 印度尼西亚文:values-in-rID 意大利文(瑞士):values-it-rCH 意大利文(意大利):values-it-rIT 日文:values-ja-rJP 韩文:values-ko-rKR 立陶宛文:valueslt-rLT 拉脱维亚文:values-lv-rLV 挪威博克马尔文:values-nb-rNO 荷兰文(比利时):values-nl-BE 荷兰文(荷兰):values-nl-rNL 波兰文:values-pl-rPL 葡萄牙文(巴西):values-pt-rBR 葡萄牙文(葡萄牙):values-pt-rPT 罗马尼亚文:values-ro-rRO 俄文:values-ru-rRU 斯洛伐克文:values-sk-rSK 斯洛文尼亚文:values-sl-rSI

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

安卓应用开发基础论文中英文对照 资料外文翻译文献 中英文对照资料外文翻译文献安卓应用开发基础在Java编程语言编写的Android应用程序的Android的SDK工具编译代码以及与任何数据和到一个Android的包,一个归档文件档案资源的.apk后缀,所有的在一个单一的代码.apk文件被认为是一个应用程序,是Android的文件,供电设备来安装应用程序。一旦安装在设备上,每个Android应用程序的生命在它自己的安全沙箱:而Android操作系统是一个多用户Linux系统中,每个应用程序是一个不同的用户。默认情况下,每个应用程序的系统分配一个唯一的Linux用户ID,系统设置所有的应用程序中的文件权限,以便只有用户ID分配给该应用程序可以访问它们。每个进程都有它自己的虚拟

机,因此应用程序的代码在从其他应用程序隔离运行。默认情况下,每个应用程序运行在它自己的Linux进程。Android的启动过程时,应用程序的任何组件需要被执行,然后关闭该进程时,它不再需要或恢复时,系统必须为其他应用程序的内存。这样一来,Android系统实现了最小特权原则,也就是说,每个应用程序,默认情况下,只能访问的组件,它需要做的工作,没有更多,这将创建一个非常安全的环境,使应用程序无法访问的,这就是它没有给予许可制度的部分。但是,有一个应用程序的方法与其他应用程序和应用程序访问系统服务的数据:这有可能为两个应用程序安排共享相同的Linux用户ID,在这种情况下,它们能够相互访问的文件。为了节约使用相同的用户ID系统资源,应用程序还1 可以安排运行在相同的Linux进程和共享同一个VM。应用程序可以请求访问权限,如用户的联

相关主题