Application Fundamentals
来源:互联网 发布:电脑自动打开软件 编辑:程序博客网 时间:2024/05/22 08:13
Application Fundamentals
@editor William Yi
@date 8.14.2016
The process of how an app runs:
written(java language) --> compile(Android SDK tools) --> APK(an Android package) --> install(.apk file)
APP: Application
APK: Android Package, one APK file contains all the contents of an Android app and is the file that Android-powered devices use to install the app.
API: Application Programming Interface, is a set of routine definitions, protocols, and tools for building software and applications.
protocols: is a set of rules for exchanging information between computers.
Once installed on a device, each Android app lives in its own security sandbox:
The Android operating system assigns each app an unique Linux user ID. Meanwhile, each process has its own VM(virtual machine), so the app code can runs in isolation from other apps.
In this way, the Android system implements the principle of least privilege. It means every app just get the permissions which are needed for itself.
How an app share data with other apps?
- Arrange for two apps to share the same Linux user ID (including the same Linux process and the same VM)
- Request permission to access device data
App Components
Here are four important types of app components:
A unique aspect of the Android system is that any app can start another app’s component.
An example: if you want the user to capture a photo with the device camera,there’s probably another app that does that and your app can use it, instead of developing an activity to capture a photo yourself. You don’t need to incorporate or even link to the cod from the camera app. Instead, you can simply start the activity in the camera app that captures a photo. When complete, the photo is even returned to your app so you can use it. To the user, it seems as if the camera is actually a part of your app.
Activating Components
activity, services and broadcast receivers are activated by an asynchronous message called an intent.
An intent is created with an Intent object.
An intent can be either explicit or implicit, which means it can define a message to activate either a specific component or a specific type of component.
content provider is activated when targeted by a request from a ContextResolver. The component that is performing transactions with the provider doesn’t need to and instead calls methods on the ContextResolver object because the content resolver handles all direct transactions with the content provider.
There are separate methods for activating each type of component, it’s functions may seems a little hard to handle, so I will refer to it before long.
Remain to be solved
The Manifest File
Things the Manifest File(AndroidManifest.xml) can do:
- Give the existing component to the system
- Identify any user permissions the app requires
- Declare the minimum API level
- Declare hardware and software features required by the app
- API libraries the app needs to be linked against
More details: file:///C:/Users/dell1/AppData/Local/Android/sdk/docs/guide/components/fundamentals.html#Manifest
App Resources
An Android app can provide resources separate from your source code.
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Application Fundamentals
- Android - Application Fundamentals.
- Android Basics:Application Fundamentals
- [android]Application Fundamentals
- Application Fundamentals 应用程序基本原理
- Application Fundamentals 应用基础
- 应用程序基本原理(Application Fundamentals)
- 应用基础-Application Fundamentals
- Trouble-Shooting:CRS未启动导致RAC无法启动的对应方法
- HDU OJ 5283 Senior's Fish
- 【Objective-C】栈(stack)和堆(heap)的区别
- Meet Android Studio
- STL算法(14)——for_each()
- Application Fundamentals
- 勾股定理一日一证连载72
- 2016.08.11【初中部 NOIP提高组 】模拟赛C题解
- 100以内加减乘除的计算题
- 如何使用New Relic监控基于Docker的应用程序
- 提高ASP.NET应用程序性能的十大方法
- RAC下Archivelog变更方法
- C#:去掉dataGridView行前面的三角符合
- 解决双硬盘安装Ubuntu选择启动菜单后黑屏的问题