{$cfg_webname}
主页 > 外文翻译 > 计算机翻译 >

Android应用程序基础知识

来源:56doc.com  资料编号:5D25122 资料等级:★★★★★ %E8%B5%84%E6%96%99%E7%BC%96%E5%8F%B7%EF%BC%9A5D25122
资料以网页介绍的为准,下载后不会有水印.资料仅供学习参考之用. 帮助
资料介绍

Android应用程序基础知识(中文5600字,英文3200字)
Android应用程序是用Java编程语言编写的。 Android SDK工具将代码以及任何数据和资源文件编译到Android软件包中,后者是一个带有.apk后缀的存档文件。 单个.apk文件中的所有代码都被视为一个应用程序,是Android驱动的设备用于安装应用程序的文件。
安装在设备上后,每个Android应用程序都位于自己的安全沙箱中:
Android操作系统是一个多用户Linux系统,每个应用程序都是不同的用户。
默认情况下,系统为每个应用程序分配一个唯一的Linux用户ID(该ID仅由系统使用,并且应用程序不知道)。 系统为应用程序中的所有文件设置权限,以便只有分配给该应用程序的用户ID才能访问它们。
每个进程都有自己的虚拟机(VM),因此应用程序的代码与其他应用程序隔离运行。
默认情况下,每个应用程序都在自己的Linux进程中运行。 当需要执行任何应用程序的组件时,Android会启动该过程,然后在不再需要该过程时或系统必须为其他应用程序恢复内存时关闭该过程。
通过这种方式,Android系统实现了最小特权原则。 也就是说,默认情况下,每个应用程序只能访问其工作所需的组件,而不能访问它们。 这创建了一个非常安全的环境,在该环境中,应用程序无法访问未获得权限的系统部分。
但是,有一些方法可以让应用程序与其他应用程序共享数据,并为应用程序访问系统服务:
Android 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 .apk suffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.
    Once installed on a device, each Android application lives in its own security sandbox:
The Android operating system is a multi-user Linux system in which each application is a different user.
By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.
Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications.
By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.
In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission.
    However, there are ways for an application to share data with other applications and for an application to access system services:

推荐资料