`
weiweirenhong
  • 浏览: 32715 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
社区版块
存档分类
最新评论

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《翻译:Android应用由Java代码编写,编译生成的Java字节代码和相关的数据或资源文件被打包成一个后缀是apk的归档文件》. 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:翻译:大多数情况下,每个Android应用生存在自身世界中

   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.《翻译:默认场合,每个Android应用都将运行在自己独立的Linux进程中,一旦某个应用中的某段代码需要被执行,Android系统将启动一个Linux进程。对于被启动的Linux进程,Android系统也会在不需要该进程的时候或是系统资源需要被其他应用占用的时候关闭已启动的Linux进程。》

  Each process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications.《翻译:每个Linux进程拥有自己的虚拟机,所以所有的应用程序在运行过程中是相互隔离的。》

  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.《翻译:默认场合,每个应用都被系统分配一个唯一的Linux用户ID,该应用所关联的所有文件只能被该user ID所见,尽管是有办法可以使得多个应用可以共享资源或数据文件。》

  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.《翻译:要使得两个应用程序共享同一个Linux user ID也是可能的,一旦这样,那么两个应用就可以共享资源文件,这时候还可以使得两个应用在同一个Linux进程中运行,共享使用同一个虚拟机。》 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics