Android外文文献翻译

上传人:hs****ma 文档编号:458624035 上传时间:2022-09-09 格式:DOC 页数:19 大小:114.50KB
返回 下载 相关 举报
Android外文文献翻译_第1页
第1页 / 共19页
Android外文文献翻译_第2页
第2页 / 共19页
Android外文文献翻译_第3页
第3页 / 共19页
Android外文文献翻译_第4页
第4页 / 共19页
Android外文文献翻译_第5页
第5页 / 共19页
点击查看更多>>
资源描述

《Android外文文献翻译》由会员分享,可在线阅读,更多相关《Android外文文献翻译(19页珍藏版)》请在金锄头文库上搜索。

1、An droid Applicati on Fun dame ntalsAn droid applicatio ns are writte n in the Java program ming Ian guage. The An droid SDK tools compile the code along with any data and resource file into an An droid package, an archive an .apk suffix. All the code in a single .apk considered to be one applicatio

2、n and is the An droid-powered devices use to in stall the applicatio n.Once in stalled on a device, each An droid applicati on lives in its own security san dbox:The An droid operati ng system is a multi-user Linux system in which each applicatio n is a differe nt user.By default, the system assigns

3、 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 a

4、pplications code runs in isolation from other applicati ons.By default, every applicatio n runs in its own Linux process. An droid starts the process whe n any of the applicati ons comp onents n eed to be executed, the n shuts dow n the process whe n its no Ion ger n eeded or whe n the system must r

5、ecover memory for other applicati ons. In this way, the An droid system impleme nts thepri nciple 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 en vir onment in which an applicati o

6、n cannot access parts of the system for which it is not give n permissi on.However, there are ways for an applicati on to share data with other applicati ons and for an applicati on to access system services:Its possible to arrange for two applicati ons to share the same Linux user ID, in which case

7、 they are able to access each others files. To con serve system resources, applicati ons with the same user ID can also arrange to run in the same Linux process and share the same VM (the applications must also be signed with the same certificate).An applicatio n can request permissi on to access de

8、vice data such as the users con tacts, SMS messages, the mountable storage (SD card), camera, Bluetooth, and more. All applicatio n permissi ons must be gran ted by the user at in stall time.That covers the basics regardi ng how an An droid applicati on exists withi n the system. The rest of this do

9、cume nt in troduces you to:1、The core framework components that define your application.2、The manifest which you declare components and required device features for your applicati on.3、Resources that are separate from the application code and allow your application to gracefully optimize its behavio

10、r for a variety of device con figurati ons.Applicati on Comp onentsApplicatio n comp onents are the esse ntial build ing blocks of an An droid applicati on. Each comp onent is a differe nt point through which the system can en ter your applicati on. Not all comp onents are actual entry points for th

11、e user and some depe nd on each other, but each one exists as its own entity and plays a specific roeach one is a unique building block that helps define your applications overall behavior.There are four differe nt types of applicati on comp onen ts. Each type serves a disti net purpose and has a di

12、stinct lifecycle that defines how the component is created and destroyed.Here are the four types of applicati on comp onen ts:ActivitiesAn activity represe nts a sin gle scree n with a user in terface. For example, an email application might have one activity that shows a list of new emails, another

13、 activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experie nee in the email applicati on, each one is in depe ndent of the others. As such, a different application can start any one of these activities (if the email a

14、pplication allows it). For example, a camera application can start the activity in the email applicati on that composes new mail, in order for the user to share a picture.An activity is implemented as a subclass oActivity and you can leann more about it in the Activities developer guide.ServicesA se

15、rviceis a comp onent that runs in the backgro und to perform long-running operatio ns or to perform work for remote processes.A service does not provide a user in terface. For example, a service might play music in the background while the user is in a different application, or it might fetch data o

16、ver the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to in teract with it.A service is implemented as a subclass of Service and you can learn more about it in the Services developer guide.Content providersA content provider man ages a shared setof applicatio n data. You can store the data in the , an SQLite database, on

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 活动策划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号