Android学习笔记:框架 - 应用程序原理1/5 - 综述
来源:互联网 发布:钢板下料软件 编辑:程序博客网 时间:2024/06/04 22:46
Android有以下重要类
- 1. Activity
2. Service
3. BroadcastReceiver
4. ContentProvider
5. Intent
本文档分以下4部分
- Application Components
- Activating components: intents
- Shutting down components
- The manifest file
- Intent filters
- Activities and Tasks
- Affinities and new tasks
- Launch modes
- Clearing the stack
- Starting tasks
- Processes and Threads
- Processes
- Threads
- Remote procedure calls
- Thread-safe methods
- Component Lifecycles
- Activity lifecycle
- Service lifecycle
- Broadcast receiver lifecycle
- Processes and lifecycles
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:
- 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.
- Each process has its own Java virtual machine (VM), so application code runs in isolation from the code of all other applications.
- By default, each application is assigned a unique Linux user ID. Permissions are set so that the application's files are visible only that user, 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.
Android应用程序用Java语言编写。编译过的Java代码 — 包括程序所需的任何数据和资源文件 — 被AAPT TOOL捆绑进一个Android包,一个.apk后缀
标识的压缩文件。
通过该文件将应用程序发布并安装到移动设备上;它就是用户下载到他们设备上的文件。所有的代码都在一个简单的.apk文件里,并被当作一个应用程序。
不管怎么说,每个Android应用程序都生活在它自己的世界里:
- 默认的,所有应用程序运行在自己的Linux进程里。当任何的应用程序代码需要执行时,Android将启动这些进程,当它不再被需要而且其他应用程序需要系统资源时,Android将结束该进程。
- 每个进程有它自己的Java虚拟机,所以应用程序代码都是独立与其他所有应用程序代码运行的。
- 默认的,每个应用程序都被指定了一个唯一的Linux用户ID。设置了权限,使该应用程序文件仅对该用户,该应用程序自己可见 — 尽管这儿也有方法将它们导入到其他应用程序里。
两个应用程序分享相同的用户ID也是可能的,在这种情况下它们将能看到对方的文件。为节约系统资源,拥有相同ID的应用程序也可以运行在相同的Linux进程里,分享相同的虚拟机。
- Android学习笔记:框架 - 应用程序原理1/5 - 综述
- Android应用框架原理学习笔记
- android开发学习笔记(6)android应用程序框架
- Android学习笔记(一):Android应用程序框架
- V4L2应用程序框架学习笔记
- android多媒体框架综述
- Spring FrameWork学习笔记(一)Spring框架综述
- 学习笔记1:Android 的应用程序组件
- 【Android学习笔记1】应用程序核心理解
- GAN学习笔记(1):GAN综述
- CloudStack学习笔记-综述
- Symbian学习笔记(3):应用程序框架
- android学习笔记-应用程序结构
- Android动画学习综述
- springmvc学习笔记(1)-框架原理和入门配置
- springMVC+Mybatis 学习笔记-【1】Mybatis的框架原理
- springmvc学习笔记(1)-框架原理和入门配置
- android应用程序框架层创建的应用程序进程学习
- JAVA属性编辑器
- wait(), notify() and notifyAll() in Java
- 如何将UITableViewDelegate和UITableViewDataSource从UITableViewController中分离出来?
- ZOPE plugins
- select列表双向选择
- Android学习笔记:框架 - 应用程序原理1/5 - 综述
- ArcGIS Explorer 9.3 二次开发---搭建环境
- NO.39 对Arch3中转译资源文件CMD的改进(native2ascii)
- 发牢骚了
- CListCtrl行高的修改
- 基于比较的排序都逃脱不了NlogN的宿命
- http://docs.zope.org/zope2/zope2book/ZopeArchitecture.html
- 解决unix网络编程(第三版)的源代码编译的问题 -connect dennied
- SDP中Video属性fmtp的含义,比如a=fmtp:34 QCIF=1;CIF=1