【正文】
功能,該系統(tǒng)一旦啟動(dòng) BootReceiver 通知從廣播系統(tǒng)啟動(dòng)。每個(gè)啟動(dòng)的 FriendViewer 將會(huì)列出了所有的朋友和他們的地理坐標(biāo), FriendMap 顯示他們在地圖上的位置。盡管我們可以在這些組件內(nèi) 放置在 FriendTracker 應(yīng)用,但是我們?nèi)匀粍?chuàng)建了一個(gè)單獨(dú)的應(yīng)用程序來展示跨應(yīng)用的溝通。 Component Interaction 該組件交互的主要機(jī)制是一個(gè) intent ,這是一個(gè)簡單的消息對象,其中包含一個(gè)目的地 23 組件的地址和數(shù)據(jù)。 Android 框架來通知這些方法的調(diào)用開始執(zhí)行在目標(biāo)應(yīng)用程序代碼。簡單地說, Intent 對象定義的“ Intent”以執(zhí)行“ action”。開發(fā)人員可以解決一個(gè)目標(biāo)組件使用其應(yīng)用的空間,他們也可以指定一個(gè)隱含的名稱。 這個(gè)隱含的名字被稱為動(dòng)作字符串因?yàn)樗厥獾念愋偷恼埱髣?dòng)作。在接收端的接收者,開發(fā)者使用一 intent 過濾器來定制特殊的動(dòng)作字符串。 圖 2 顯示了組件之間的 FriendTracker 和 FriendViewer 應(yīng)用程序和組件的交互作 用在應(yīng)用程序中定義為基礎(chǔ)的 Android 發(fā)布的一部分。為了簡單起見,我們稱這個(gè)為件間通信( ICC)。對于開發(fā)人員, ICC的功能相同無論目標(biāo)是在相同或不同的應(yīng)用與界定將在下文的安全規(guī)則中說明。每個(gè)組件類型支持自己的類型 例如,當(dāng) FriendViewer 開始 FriendMap 的 FriendMap 活動(dòng)出現(xiàn)在屏幕上。 Action 的綁定組件之間建立連接,使啟動(dòng)執(zhí)行的服務(wù)定義的 RPC。 Understand android security the next generation of open operating systems won’t be on desktops or mainframes but on the small mobile devices we carry every day. The openness of these new environments will lead to new applications and markets and will enable greater integration with existing online services. 24 However, as the importance of the data and services our cell phones support increases, so too do the opportunities for vulnerability. It’s essential that this next generation of platforms provide a prehensive and usable security by the Open Handset Alliance (visibly led by Google), Android is a widely anticipated open source operating system for mobile devices that provides a base operating system, an application middleware layer, a Java software development kit (SDK), and a collection of system applications. Although the Android SDK has been available since late 2021, the frst publicly available Androidready “G1” phone debuted in late October 2021. Since then, Android’s growth has been phenomenal: TMobile’s G1 manufacturer HTC estimates shipment volumes of more than 1 million phones by the end of 2021, and industry insiders expect public adoption to increase steeply in 2021. Many other cell phone providers have either promised or plan to support it in the near future. A large munity of developers has anized around Android, and many new products and applications are now available for it. One of Android’s chief selling points is that it lets developers seamlessly . extend online services to phones. The most visible example of this feature is—unsurprisingly—the tight integration of Google’s Gmail, Calendar, and Contacts Web applications with system utilities. Android users simply supply a username and password, and their phones automatically synchronize with Google services. Other vendors are rapidly adapting their existing instant messaging, social works, and gaming services to Android, and many enterprises are looking for ways to integrate their own internal operations (such as inventory management, purchasing, receiving, and so forth) into it as desktop and server operating systems have struggled to securely integrate such personal and business applications and services on a single platform。 the ponents themselves are classifed by their ponent types. An Android developer chooses from predefned ponent types depending on the ponent’s purpose (such as interfacing with a user or storing data).Component TypesAndroid defnes four ponent types:Activity? ponents defne an application’s user interface. Typically, an application developer defnes one activity per “screen.” Activities start each other, possibly passing and returning values. Only one activity on the system has keyboard and ocessing focus at a time。 however, the specifc activity chosen on launch is marked by meta information in the manifest. In the FriendTracker application, for example, the FriendTrackerControl activity is marked as the main user interface entry point. In this case, we reserved the name “FriendTracker” for the service ponent performing the core application FriendTracker application contains each of the four ponent types. The FriendTracker service polls an external service to discover friends’ locations. In our example code, we generate locaFriendTracker application BootReceiver Broadcast receiver ActivityFriendTracker FriendProvider Content provider Service FriendTracker control FriendViewer application FriendReceiver Broadcast receiver Activity FriendTracker Activity FriendViewer Figure 1. Example Android application. The FriendTracker and FriendViewer applications consist of multiple ponents of different types, each of which provides a different set of functionalities. Activities provide a user interface, services execute background processing, 27 content providers are data storage facilities, and broadcast receivers act as mailboxes for messages from other randomly, but extending the ponent to interface with a Web service is straightforward. The FriendProvider content provider maintains the most recent geographic coordinates for friends, the FriendTrackerControl activity defnes a user interface for starting and stopping the tracking functionality, and the BootReceiver broadcast receiver obtains a notifcation from the system once it boots (the application uses this to utomatically start the FriendTracker service).The FriendViewer application bis primarily concerned with showing information about friends’ locations. The FriendViewer activity lists all friends and their geographic coordinates, and the FriendMap activity displays them on a map. The FriendReceiver broadcast receiver waits for messages that indicate the physical phone is near a particular friend and displays a message to the user upon such an event. Although we could have placed these ponents within the FriendTracker application, we created a separate application to demonstrate crossapplication munication. dditionally, by separating the tracking and user interface logic, we can c