因仑“3+1”工程特种兵精英论坛

标题: Dev Guide_Android Basics_Application Fundamenta [打印本页]

作者: leixiaofeng    时间: 2015-3-29 10:51
标题: Dev Guide_Android Basics_Application Fundamenta

(0)

Application Fundamentals

Android applications are written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, an archive file with an .apksuffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.

应用程序原理

Android 应用程序是用java语言写的。Android SDK工具把代码数据和资源文件都编译成一个以.apk为后缀的Android存档文件包。应用程序的所有代码都在一个.apk文件里,并且它可以安装在Android平台。


Once installed on a device, each Android application lives in its own security sandbox:

每个安装在设备上的应用程序都运行在它自己的安全区间内:

因为Android操作系统是一个多用户的操作系统,所以每个应用程序都是一个不同的用户。

默认的,系统分配给每个应用程序一个唯一的Linux用户ID(ID只对系统使用,对应用程序不可见)。系统在一个应用程序内为所有的文件设置了权限,所以只有被分配了用户ID的应用程序才能访问它们。

每个进程有自己的虚拟机,所以每个应用程序的运行都是相互隔离的。

默认的,每个应用程序都在自己的Linux进程下运行。当应用程序的组件需要执行的时候,Android开启了进程,当不再需要,或者必须为其他应用程序回收内存时,关闭了进程。







欢迎光临 因仑“3+1”工程特种兵精英论坛 (http://bbs.enlern.com/) Powered by Discuz! X3.4