資源描述:
《外文翻譯-Android Application Fundamentals》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在教育資源-天天文庫。
1、AndroidApplicationFundamentalsAndroidapplicationsarewrittenintheJavaprogramminglanguage.TheAndroidSDKtoolscompilethecode—alongwithanydataandresourcefiles—intoanAndroidpackage,anarchivefilewithan.apksuffix.Allthecodeinasingle.apkfileisconsideredtobeoneapplicationandisthefilethatAn
2、droid-powereddevicesusetoinstalltheapplication.Onceinstalledonadevice,eachAndroidapplicationlivesinitsownsecuritysandbox:·TheAndroidoperatingsystemisamulti-userLinuxsysteminwhicheachapplicationisadifferentuser.·Bydefault,thesystemassignseachapplicationauniqueLinuxuserID(theIDisus
3、edonlybythesystemandisunknowntotheapplication).ThesystemsetspermissionsforallthefilesinanapplicationsothatonlytheuserIDassignedtothatapplicationcanaccessthem.·Eachprocesshasitsownvirtualmachine(VM),soanapplication'scoderunsinisolationfromotherapplications.·Bydefault,everyapplicat
4、ionrunsinitsownLinuxprocess.Androidstartstheprocesswhenanyoftheapplication'scomponentsneedtobeexecuted,thenshutsdowntheprocesswhenit'snolongerneededorwhenthesystemmustrecovermemoryforotherapplications.Inthisway,theAndroidsystemimplementstheprincipleofleastprivilege.Thatis,eachapp
5、lication,bydefault,hasaccessonlytothecomponentsthatitrequirestodoitsworkandnomore.Thiscreatesaverysecureenvironmentinwhichanapplicationcannotaccesspartsofthesystemforwhichitisnotgivenpermission.However,therearewaysforanapplicationtosharedatawithotherapplicationsandforanapplicatio
6、ntoaccesssystemservices:·It'spossibletoarrangefortwoapplicationstosharethesameLinuxuserID,inwhichcasetheyareabletoaccesseachother'sfiles.Toconservesystemresources,applicationswiththesameuserIDcanalsoarrangetoruninthesameLinuxprocessandsharethesameVM(theapplicationsmustalsobesigne
7、dwiththesamecertificate).·Anapplicationcanrequestpermissiontoaccessdevicedatasuchastheuser'scontacts,SMSmessages,themountablestorage(SDcard),camera,Bluetooth,andmore.Allapplicationpermissionsmustbegrantedbytheuseratinstalltime.第20頁,共20頁ThatcoversthebasicsregardinghowanAndroidappl
8、icationexistswithinthesystem.Therestofth