201241640 六、發明說明: 相關申請案的交又引用 本申請案主張美國臨時專利申請案序列號第 61/442,701 號、第 61/442,713 號、第 61/442 735 號第 61/442,740號及第61/442,753號之優先權,該等美國臨 時專利申請案之每一者於2011年2月14曰提出申請且 以引用之方式併入本文。本申請案係關於美國專利申請 案代理人檔案號第33U96 〇2號、第332297 〇2號、第 332339.02號及第33234〇 〇2號,該等美國專利申請案被 轉讓給本發明之受讓人且以引用之方式併入本文。 【發明所屬之技術領域】 本發明係關於行動裝置上的休眠背景應用程式。 【先前技術】 在現代行動裝置上,若應用程式正在運行且隨後在前 臺中由另一應用程式或經驗替換,則第一應用程式被停 用且該應用程式的程序由作業系統終止。舉例而言,若 使用者按壓開始按鈕或若裝置逾時使得鎖定螢幕被佔 用,則可停用應用程式。 在一個系統中,使用者可返回至應用程式以自使用者 離開該應用程式處繼續應用程式任務/經驗。然而,當返 回至由作業系統終止的應用程式時,使用者需要等待裝 201241640 置應用程式框架初始化,且使用者需要等待應用程式本 身載入保存狀態且恢復先前經驗。以此方式恢復可顯得 相對緩慢且因此提供有些不合意之使用者體驗。 【發明内容】 此發明内容以簡化形式介紹選定代表性概念,概念在 下文貫施方式中進行進一步描述》此發明内容並非意欲 指出主張標的之關鍵特徵結構或基本特徵結構,也並非 意欲以限制主張標的之範疇的任何方式使用。 簡言之’本文所述標的之各種態樣經導引朝向技術, 藉由技術自運行(例如前臺)狀態移動應用程式進入休 民狀^在休眠狀態下應用程式程序保持在記憶體中。 另外’維持㈣資料及執行上下文#訊與應用程式相關 ,從而允許以(例如 y ’八义 ’行--^々八/IT /1¾ π往八 ㈣至運行狀態。在—個態樣中,自運行狀態移動應用 =式進人休眠狀態之步骤包括暫停持續時間以允許應用 程式為休眠狀態做準備,例如,自記憶體保存資料、關 閉任何開啟檔案等。 逆仃狀態移動 一〜…主您用桎式進入休眠 狀I括:自應用程式 提供至應W 次拆離至〃個資源、暫停由資源 取消要求、::之至少一個更新通知、取消至少-個可 ,、暫停至少—個非可取消要求、停止至少一個 線程及/或釋放 一 個 ^ 一個應用程式資源(例如經分配至應 201241640 用程式之記憶體)。 為了自休眠狀態啟動應用程式回至運行狀態下之前臺 應用程式,存取狀態資料及執行上下文資訊,且將至少 一個資源附接於應用程式。亦描述:恢復由資源提供至 應用程式之至少一個更新通知、運行至少一個可取消要 求之故障路徑、恢復至少一個非可取消要求、發射至少 一個通知、重新建立及恢復至少一個線程及/或重新建立 至少一個應用程式資源。 在一態樣中,資源監控器經配置以評估當應用程式處 於休眠狀態時,應用程式是否使用超越允許之臨界值之 至少—個資源(例如CPU)。若如此,殼經配置以自休 眠狀態移動應用程式進入另一狀態,在另一狀態下應用 程式之程序不保持在記憶體中。 其他優點由以下詳細描述結合圖式審視時可更加明 白0 【實施方式】 本文所述技術之各種態樣通常經導引朝向技術,在該 技術中行動裝置或類似物將應用程式維持於休眠狀態, 休眠狀態通常對應於當處於背景中時麵執行任何代碼 U用m此’包含(例如Windows⑧電話)應用 程式平臺之殼組件/框架將應用程式 狂八私序保持在記憶體 中且維持應用程式之狀態及執行上 j上卜文,但是不允許程 201241640 序運仃。舉例而言,殼可在背景應用程式内懸置線程活 動。當使用者將應用程式帶至前臺時,休眠背景應用程 式恢復能力以執行代碼。 在一個實施中,當停用應用程式時,作業系統不終止 應用程式之程序。反而,應用程式可進人背景中且保持 常駐在記憶體中。此舉消除了對重新初始化應用程式且 重新載入狀態之需要 +輿& 要此舉含地意謂更快的應用程式 恢復時間。 應瞭解,本文任何實例為非限制性。對於一個實例, j Windows⑧行動裝置作業環境之上下文中描述示例性 貫施及休眠應用程式,然而此僅用於說明之目的,且其 ^作業環境可受益於如本謂述之休眠應用㈣狀態概 二因此本發明不受限於本文所述之任何特定實施例、 ·'、樣概念、結構、功能或實例。更恰當地說,本文所 述之任何實施例、態樣、概念、結構、功能或實例為非 限制性’且通常本發明可用於在計算及應用程式/任務交 換中提供權益及優點的各種方式。 第1圖為圖示行動裝置環境中各種示例性組件之通用 方塊圖。複數個應用程式由殼1G2(應用程式框架)控 制’殼102提供對褒置資源之存取,裝置資源包括互斥 資源1〇4(例如顯示器)及共享資源108 (例如記憶體、 網路等)’互斥資源1G4itf僅可由一個應用程式(通常 僅由前臺應用程式1G6)存取,共享諸1G8可被前臺 應用程式106及其他應用程式使用。 201241640 如第1圖中所例證,一或更多個應用程式為墓碑應用 程式ll〇i-ll〇m。更特定言之,在習知行動裝置中,在應 用程式不再為前臺應用程式之後即刻終止應用程式。在 先前裝置中,應用程式保持終止(例如方塊i 12)且必 須如新實例一樣完全重新啟動(launch ) ^在一些更現代 行動裝置中,若使用者體驗(user eXperience; υχ ,包括 使用者介面組件)向使用者提供機制以導航回應用程式 實例,則每一應用程式可代之以與終止應用程式相反之 墓碑應用程式,此舉意指給應用程式提供機遇以保存狀 態,在保存狀態之後,拆卸程序且在應用程式堆疊上保 留程序先前存在之標誌。 本文所述技術經導引朝向維持一或更多個應用程式作 為休眠應用程式114ι-ΐΐ4η’其中結合維持應用程式之關 聯狀態及執行上下文,將休眠應用程式(例如休眠應用 程式之程序)保持為常駐於記憶體中。此舉允許休眠應 用程式更快速地啟動(相對於墓碑應用程式)至前臺運 行狀態。 第2圖為圖示一旦使用者啟動應用程式(方塊222 ) 且應用程式進入運行狀態224的應用程式之示例性狀態 的狀態圖。在此實例中,應用程式保持處於運行狀態224 下’直到使用者採用使用者互動、導航相關作用,即反 向導航作用(方塊226,例如反向傳遞堆疊中應用程式 或關閉應用程式作用)或正向導航作用(方塊228 ),諸 如按壓開始按鈕’反向導航作用回應關閉應用程式,正 201241640 向導航作用停用應用程式。 田u應用程式時’殼/框架通知應用程式且暫停持續 間(例如長達十秒)以給應用程式時間為變成休眠應 用耘式做準備。舉例而言,給應用程式時間以保存記憶 體、關閉任何開啟檔案等。 在第2圖中由暫停狀態23〇描繪暫停,當暫停完成(方 塊234)時’暫停狀態230進人休眠狀態236。倘若在到 達整個暫停時間之前’使用者返回應用程式(啟動,方 塊240 ) ’應用程式返回運行狀態224。 殼102偵測何時停用應用程式,且移動應用程式進入 休眠狀態236。當㈣應用程式時,# 1()2執行某些作 業以確保休眠應用程式不能干擾新前臺應用程式。舉例 而言,殼102取消任何可取消要求、可阻礙應用程式介 面(application pr〇gram interface; Αρι)利用、解除附接於 分用應用紅式之互斥硬體資源且懸置由應用程式建立或 代表應用程式之線程。殼懸置應用程式之線程活動且防 止背景應用程式消耗CPU週期數。藉由此行為,休眠背 景應用程式起作用如同程序由作業系統終止且不繼續使 用裝置之電池或放慢裝置前臺活動。 應注意對於效能/感知效能,該等作業之一些可與準備 新前臺應用程式平行。舉例而言,殼可在暫停時間期間 給新應用程式顯示器資源,以便使用者不須等待滿十秒 以感知新前臺應用程式之改變。例如假使使用者不注意 地按壓開始按紐且例如想返回正在運行之應用程式,可 201241640 不必給前臺應用程式即刻提供攝影機資源。 殼自停用應用程式拆離資源。該等資源之實例包括振 動控制器、聲音及媒體播放機、照片/視訊攝影機'測位 服務、感測器、網路等。藉由此行為,在休眠狀態236 下’休眠背景應用程式起作用如同程序由作業系統終止 且不繼續使用裝置資源或防止前臺中之應用程式使用該 等資源。 殼可自休眠背景應用程式解除記憶體資源以最小化作 業系統中之記憶體佔據面積。應用程式記憶體佔據面積 越小,能常駐在記憶體中之休眠背景應用程式之數目越 大,且可因此越快速地恢復休眠背景應用程式。 殼102例如經由資源監控器組件12〇 (第i圖,資源 監控器組件120併入殼102中或轉接至殼102)亦可藉 由休眠應用程式監控至少一個資源之使用(例如cpu‘ 用)。更特定言之’-般目標為休眠應用程式執行非重要 活動’包括無代碼運行;然而—些代碼(例如第一方本 端應用程式)可繼續運行代碼1此,在允許為變成休 眠做準備之十秒時Pa1之後,殼可執行資源非使用。為此, -二穴I肀仟,檢i 每-休眠應用程式之㈣使用1仍處於休眠且存在_ 些CPU使用.,(例如’㈣使用>〇或某-其他允許: 技界值),則休眠應用程式移動至墓碑狀態、238(第 圖)。此可不考慮其他狀態進行檢查(例如不僅在裝置 電話閒置時)。另外,可使用漸進式拉緊政策,例;,臣 10 201241640 界值可為非零的且隨時間降低。 右有必要,諸如當作業系統到達記憶體之外條件時, 殼可例如藉由墓碑終止休眠背i應用程式之程序或藉由 不維持狀態/標誌來完全終止。此釋放記憶體資源(及任 何其他共享資源)以用於前臺中之應用程式。 總言之’當暫停時,系統殼作業以自應用程式下拆離 互斥使用資源且自應用程式下拆離共享使用資源。殼暫 停資源提供至應用程式之更新通知。對於擱置之可取消 要求n肖可取消要求;暫停任何非可取消要求或給 任何非可取消要求完成通知。停止代表應用程式而建立 之程序中(程序中)本端線程,且若有可能,停止代表 應用程式而建立之任何程序外(程序外)本端線程。釋 放可容易且快速重新建立之任何應用程式資源。 借助於自休眠狀態啟動/恢復應用程式’在應用程式啟 動之後,框架恢復應用程式線程且運行經取消之要求之 正常故障路徑,且附接代表應用程式之資^更特定言 之田恢復時,系統殼作業以重新附接互斥使用資源且 復原互斥使用資源之狀態。若有可能,重新附接共享使 用資源且復原共享制資源之狀態。恢復㈣提供至應 用程式之更新通知。對於經取消之可取消要求,運行應 孝式中之正常故障路徑。恢復任何非可取消要求,且 發射任何擱置完成通知。殼重新建立/恢復代表應用程式 =建立之任何程序中本端線程及視需要代表應用程式而 立之任何程序外本端線程。亦視需要重新建立釋放資 201241640 源。 第3A圖至第4B圖為經導引朝向Wind〇ws②行動裝置 環境之順序圖,圖通常圖示事件如何觸發各種組件^參 與停用應用程式至休眠狀態及自休眠狀態啟動應用程 式。第3A圖圖示正向導航情境之控制流組合之實例, 在正向導航情境中,應用程式正在啟動同時應用程式(先 前在前臺中)被停用(第3B圖)。第4A圖及第4b圖為 圖示控制流組合之實例之順序圖,控制流用於恢復啟動 之應用程式(第4A圖)及關閉應用程式(第4b圖)。 在第3A圖至第4B圖中,殼1〇2包含代管一或更多個 客戶端程序(例如每一應用程式之taskh〇st exe33〇)之 伺服器。為了開始啟動之任務(第3 A圖),殼執行管理 器331與客戶端執行管理器332通訊,客戶端執行管理 器332又發訊號至任務代管組件334。在第3a圖至第 4D圖中,任務代管組件334與訊框組件336通訊,訊框 、·且件3 3 6處理藉由應用程式導航暴露之頁面,例如將先 月j頁面放於堆疊上用於導航、管理緩衝器(包括使用内 部飛濺應用程式來分配影像緩衝器)等。當使用者經由 頁面互動時’訊框組件產生事件。此示例:環境中使用 之SLM/XNA、组件338及CLR也件34〇分別代表201241640 VI. INSTRUCTIONS: RELATED APPLICATIONS RELATED APPLICATIONS STATEMENT OF RELATED APPLICATIONS STATEMENT OF STATEMENT OF STATEMENT OF RELATED APPLICATIONS STATEMENT OF RELATED APPLICATIONS RELATED APPLICATIONS Serial Nos. 61/442,701, 61/442,713, 61/442,735, 61/442,740, and 61 </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> </ RTI> <RTIgt; The present application is related to U.S. Patent Application Serial No. 33 U96 〇2, No. 332297 〇2, No. 332339.02, and No. 33234〇〇2, which are assigned to the assignee of the present invention. This is incorporated herein by reference. TECHNICAL FIELD OF THE INVENTION The present invention relates to a sleep background application on a mobile device. [Prior Art] On a modern mobile device, if an application is running and then replaced by another application or experience in the foreground, the first application is stopped and the application's program is terminated by the operating system. For example, if the user presses the start button or if the device is overtime, the lock screen is occupied, the application can be deactivated. In one system, the user can return to the application to continue the application task/experience from the user leaving the application. However, when returning to an application terminated by the operating system, the user needs to wait for the 201241640 application framework to be initialized, and the user needs to wait for the application itself to load the saved state and restore the previous experience. Restoring in this manner can be relatively slow and thus provides a somewhat undesirable user experience. The Summary of the Invention This Summary is provided to introduce a selection of concepts in a simplified form. The concept is further described in the following description. This summary is not intended to identify the key features or basic features of the subject matter, and is not intended to limit the claim. Any form of use of the subject matter. Briefly, the various aspects of the subject matter described herein are directed toward the technology, by the technology self-running (e.g., foreground) state mobile application to enter the occupant's state. The application program remains in memory during sleep. In addition, the 'maintenance (4) data and execution context # is related to the application, thus allowing (for example, y 'eight meaning' line - ^ 々 eight / IT / 13⁄4 π to eight (four) to the running state. In the same way, The self-running mobile application=step of entering the sleep state includes suspending the duration to allow the application to prepare for the sleep state, for example, saving data from the memory, closing any open files, etc. The reverse state moves one ~ ... the main you Use the 桎 to enter the dormant form I: from the application provided to the detachment to the resource, the suspension of the resource cancellation request, at least one update notification, the cancellation of at least one, the suspension of at least one non Can cancel the request, stop at least one thread and/or release an application resource (for example, the memory allocated to the application should be 201241640). In order to start the application from the sleep state and return to the running state before the application, save Take status data and execute context information, and attach at least one resource to the application. Description: Recovery is provided by the resource to the application At least one update notification, running at least one fail-safe path, recovering at least one non-cancellable request, transmitting at least one notification, re-establishing and restoring at least one thread, and/or re-establishing at least one application resource. In this case, the resource monitor is configured to evaluate whether the application uses at least one resource (such as a CPU) that exceeds the allowable threshold when the application is in a sleep state. If so, the shell is configured to move the application from sleep. Entering another state, the program of the application is not kept in the memory in another state. Other advantages are more clearly understood from the following detailed description in conjunction with the drawing. [Embodiment] Various aspects of the techniques described herein are generally Guided to technology in which a mobile device or the like maintains the application in a dormant state, which typically corresponds to executing any code U when in the background, using this 'included (eg, Windows 8 phone) application platform The shell component/frame keeps the application mad eight private order In the body and maintain the state of the application and execute the above, but the program 201241640 is not allowed. For example, the shell can suspend thread activity in the background application. When the user brings the application to the foreground The sleep background application resilience is executed to execute the code. In one implementation, when the application is deactivated, the operating system does not terminate the application program. Instead, the application can enter the background and remain resident in memory. This eliminates the need to reinitialize the application and reload the state. +舆& This means faster application recovery time. It should be understood that any of the examples in this article are non-limiting. For an example, An exemplary implementation and dormant application is described in the context of a Windows 8 mobile device operating environment, however, this is for illustrative purposes only, and its operating environment may benefit from a dormant application (four) state as described herein. It is not intended to be limited to any particular embodiments described herein, such as a concept, structure, function, or example. Rather, any embodiment, aspect, concept, structure, function, or example described herein is non-limiting' and generally the invention can be used in various ways to provide benefits and advantages in computing and application/task exchange. . Figure 1 is a general block diagram illustrating various exemplary components in a mobile device environment. A plurality of applications are controlled by shell 1G2 (application framework) to provide access to the set resources, including mutually exclusive resources 1〇4 (eg, display) and shared resources 108 (eg, memory, network, etc.) The 'mutually exclusive resource 1G4itf can only be accessed by one application (usually only by the foreground application 1G6), and the shared 1G8 can be used by the foreground application 106 and other applications. 201241640 As illustrated in Figure 1, one or more applications are tombstone applications ll〇i-ll〇m. More specifically, in the conventional mobile device, the application is terminated immediately after the application is no longer the foreground application. In previous devices, the application stays terminated (eg, block i 12) and must be completely restarted as in the new instance. ^ In some more modern mobile devices, if the user experience (user eXperience; υχ, including the user interface The component) provides the user with a mechanism to navigate back to the application instance. Each application can be replaced with a tombstone application that is the opposite of the terminated application. This means giving the application an opportunity to save the state after saving the state. , remove the program and keep the pre-existing logo on the application stack. The techniques described herein are directed to maintaining one or more applications as dormant applications 114 ΐΐ ΐΐ η η 其中 其中 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 维持 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠 休眠Resident in memory. This allows the hibernate application to start up faster (as opposed to the tombstone application) to the foreground operating state. Figure 2 is a state diagram illustrating an exemplary state of an application once the user launches the application (block 222) and the application enters the operational state 224. In this example, the application remains in the running state 224 until the user uses user interaction, navigation related effects, ie reverse navigation (block 226, such as back-delivering the application in the stack or closing the application) or Forward navigation (block 228), such as pressing the start button 'reverse navigation response to close the application, 201241640 disables the application to navigation. When the application is used, the shell/frame informs the application and pauses for a duration (for example, up to ten seconds) to prepare the application time to become a dormant application. For example, give the application time to save the memory, close any open files, and so on. In Figure 2, the pause is depicted by the pause state 23, and when the pause is complete (block 234), the pause state 230 enters the sleep state 236. If the user returns to the application (startup, block 240) before the entire pause time is reached, the application returns to the operational state 224. The shell 102 detects when the application is deactivated and the mobile application enters a sleep state 236. When (4) the application, #1()2 performs some jobs to ensure that the hibernate application does not interfere with the new foreground application. For example, the shell 102 cancels any unrequestable request, can block the application interface (application pr〇gram interface; Αρι), unlink the mutually exclusive hardware resources attached to the application application, and the suspension is established by the application. Or a thread that represents an application. The shell suspends the application's thread activity and prevents the background application from consuming CPU cycles. By this behavior, the sleep background application functions as if the program was terminated by the operating system and the battery of the device is not used or the device is slowed down for foreground activity. It should be noted that for performance/perceived performance, some of these operations may be parallel to preparing a new foreground application. For example, the shell can give new application display resources during the pause time so that the user does not have to wait ten full seconds to sense changes to the new foreground application. For example, if the user presses the start button inadvertently and for example wants to return to the running application, 201241640 does not have to provide the camera resource immediately to the foreground application. The shell detaches the resource from the deactivated application. Examples of such resources include vibration controllers, sound and media players, photo/video cameras' location services, sensors, networks, and the like. By this behavior, the hibernate background application functions in the sleep state 236 as if the program was terminated by the operating system and does not continue to use device resources or prevents applications in the foreground from using the resources. The shell can free memory resources from the sleep background application to minimize the memory footprint in the job system. The smaller the application memory footprint, the larger the number of sleep background applications that can reside in memory, and the faster the sleep background application can be recovered. The shell 102 can also monitor the use of at least one resource (eg, cpu' by the hibernation application, for example via the resource monitor component 12 (i, the resource monitor component 120 is incorporated into the shell 102 or transferred to the shell 102) ). More specifically, 'the general goal is to perform non-essential activities for hibernate applications' including codeless operations; however, some code (such as first-party native applications) can continue to run code 1 this, allowing for preparation to become dormant After 10 seconds of Pa1, the shell executable resources are not used. To do this, - two-hole I 肀仟, check i per-hibernate application (4) use 1 is still dormant and there are _ some CPU use., (eg '(four) use > 〇 or some - other allow: technical value) , the hibernate application moves to the tombstone state, 238 (figure). This can be checked regardless of other conditions (for example, not only when the device phone is idle). In addition, a progressive tightening policy can be used, for example; the threshold of 2012 10,416 can be non-zero and decreases over time. Right is necessary, such as when the operating system reaches a condition other than the memory, the shell can be completely terminated, for example, by terminating the program of the dormant application or by not maintaining the status/flag. This frees memory resources (and any other shared resources) for use in applications in the foreground. In summary, when suspended, the system shell is detached from the application by the application and the shared use resources are detached from the application. The shell suspends resources to provide update notifications to the application. For a hold, the request can be cancelled. The request can be cancelled; any non-cancellable request can be suspended or any non-cancellable request can be completed. Stop the local thread (in the program) that is created on behalf of the application, and if possible, stop any off-program (out-of-program) local thread created on behalf of the application. Release any application resources that can be easily and quickly re-established. Starting/restoring the application by self-sleeping state' After the application is launched, the framework restores the application thread and runs the normal failure path of the cancelled request, and attaches the resource representing the application to the specific domain. The system shell job reattaches the state of the mutually exclusive use of resources and restores the mutually exclusive use of resources. If possible, reattach the shared usage resources and restore the state of the shared resources. Recovery (4) Provides an update notification to the application. For canceled cancellation requirements, run the normal failure path in the filial style. Restore any non-cancellable request and transmit any hold completion notice. Shell Re-establish/Restore represents the application = any local program thread in any program created and any external program thread that is required to represent the application. The source of the 201241640 release is also re-established as needed. Figures 3A through 4B are sequential diagrams directed toward the Wind〇ws2 mobile device environment. The diagram generally illustrates how events trigger various components to participate in deactivating the application to sleep and to initiate the application from the sleep state. Figure 3A illustrates an example of a control flow combination for a forward navigation scenario in which the application is launching while the simultaneous application (previously in the foreground) is deactivated (Fig. 3B). Figures 4A and 4b are sequence diagrams showing examples of control flow combinations for restoring the launched application (Fig. 4A) and closing the application (Fig. 4b). In Figures 3A through 4B, the shell 1〇2 contains servers hosting one or more client programs (e.g., taskh〇st exe33〇 for each application). In order to initiate the task (Fig. 3A), the shell execution manager 331 communicates with the client execution manager 332, which in turn sends a signal to the task escrow component 334. In Figures 3a through 4D, the task hosting component 334 communicates with the frame component 336, and the frame, and the device 336 processes the exposed pages by the application, for example, placing the first month j page on the stack. Used to navigate, manage buffers (including using an internal splash application to allocate image buffers). The frame component generates an event when the user interacts via the page. This example: SLM/XNA, component 338, and CLR used in the environment are also represented by 34〇
Silverlight®-based及共用語言運行時間。應用程式代碼 經经由應用程式組件3 4 2表示。 示例性作業環境 第5圖圖不適當行動裝置5〇〇之實例,本文所述標的 12 201241640 之態樣可在該行動裝置500上實施。行動裝置5〇〇僅為 裝置之一個實例且不意欲暗示對於本文所述標的之態樣 的使用或功旎範疇的任何限制。行動裝置5〇〇既不應理 解為具有任何相依性亦不應理解為具有與示例性行動裝 置5 00中圖不之任何組件之一者或組件之組合有關的要 求。 參閱第5圖,實施本文所述標的之態樣的示例性褒置 包括行動裝置500。在一些實施例中,行動裝| 5〇〇包 含蜂巢式電話'允許與其他人語音通訊之手持裝置、— 些其他語音通訊裝置或類似裝置。在該等實施例中,行 動裝置500可裝備用於攝像之攝影機,雖然在其他實施 例中可不要求此攝影機。在其他實施射,行動裝置5〇〇 可包含個人數位助理(PDA);手持遊戲裝置;筆記型電 腦,印表機;包括機上各、诚;鱗+ 匕彷铖上凰媒體中心之設備或其他設備; 其他行動裝置或類似裝置。在並 > 八他貫施例中’行動裝置 500可包含通常視為非行動之梦 初 < 衷置,諸如個人電腦、伺 服器或類似裝置。 行動裝置500之組件可句枯^ 什』巴括但不限於處理單元5〇5、 系統記憶體5 1 0及匯流排5 1 5,箱j 拼15匯流排515將包括系統 s己憶體5 1 0之各種系統組件輕接?虑押【a 柄丧主處理早兀505。匯流 排515可包括匯流排結構之若 行〜右卞頰型之任何匯流排結 構,匯流排結構包括記憶體匯户虫 i ° U卜記憶魅制器、周 邊匯流排及使用各種匯流排架槿Φ + 2 木構中之任何匯流排架構的 區域匯流排及類似匯流排結構。 再匯流排515允許資料在 13 201241640 500之各種組件之間進行傳送。 行動裝置 仃動襞置500可包括各種電腦可讀取媒體。電腦可讀 苇體可為可由行動裝置500存取之任何可用媒體,且 L括揮發性及非揮發性媒體以及可移除及非可移除媒 體《藉Φ舉例且非限制之方式,冑月遂可讀取媒體可包含 電腦儲存器媒體及通訊媒體。電腦儲存器媒體包括揮發 ,及非揮發性媒體、可移除及非可移除媒體,媒體以任 可方法或技術貫施以用於儲存諸如電腦可讀取指令、資 料#。構、程式模組或其他f料之f訊1腦儲存器媒體 包括但不限於RAM、R0M、EEPROM、快閃式記憶體或 、。己隐體技術、CD-R〇M、數位多功能光碟(DVD)或 ’、他光碟儲存H、磁卡、磁帶、磁碟儲存^或其他磁性 儲存器裝置,或可肖來儲存所要資訊且可由行動裝置 5〇〇存取之任何其他媒體。 通訊媒體通常實施電腦可讀取指令、資料結構、程式 模組或調t資料訊號諸如載纟或其他傳輸機财之其他 資料且包括任何貧訊遞送媒體。術語「調變資料訊號」 意4曰號特&之-或更多者被設定或改變以編碼訊號中 資訊的訊號。藉由舉例且非限制之方式,通訊媒體包括 諸如有線網路或直接有線連接之有線媒體,及諸如聲 波、RF、Bluet00t_、無線USB、紅外線、娜丨、^ΜΑχ 及其他無線媒體之無線媒冑。上述㈣之任何組合亦應 包括在電腦可讀取媒體範疇内。 系統記憶體510包括以揮發性及/或非揮發性記憶體 201241640 形式之電腦儲存器媒體且可包括唯讀記憶體(R〇M)及隨 機存取兒憶體(RAM)。在諸如蜂巢式電話之行動裝置 上’雖然作業系統代碼520有時包括在ROM内,但是 在其他實施例中對此不作要求。類似地,雖然應用程式 525又經㊉置放於RAM内,但是在其他實施例中應用程 式可置放於ROM内或其他電腦可讀取記憶體内。堆積 530向記憶體提供與作業系統52〇及應用程式525相關 聯之狀態。舉例而言m统別及應用程式525可 在忒作業系統520及該應用程式525作業期間在堆積 530中儲存變量及資料結構。 灯動裝置500亦可包括其他可移除/非可移除記憶 體、揮發性/非揮發性記憶體。藉由舉例之方式,第5圖 圖不陕閃s己憶卡535、硬碟機536及記憶棒537。舉例而 言’硬碟機536可經小型化以配適在記憶體插槽内。行 動裝置500可經由可移除記憶體介面53 1與該等類型之 非揮發性可移除記憶體介面連接,或行動裝置5⑽可經 由通用串寵流排(USB)、IEEE 5394、—或更多個有線 埠540或一或更多個天線⑹來連接。在該等實施例中, 可移除記憶體裝置535至537可經由一或更多個通訊模 組532與订動裝置介面連接。在一些實施例中,並非所 有該等類型記憶體可包括在單個行動裝置p在其 施例中’ S玄等及其他類型之可移除記憶體之一或更 可包括在單個行動裝置上。 在一些實施財’硬碟冑536可以更永久地附接之方 15 201241640 式連接於行動裝置500。舉例而言,硬碟機536可連接 諸如平行先進技術附件(parallel advanced technology attachment; PATA)、串列先進技術附件(sedai advanced technology attachment; SATA)或另外之介面,介面可連 接至匯流排515。在該等實施例中,移除硬驅動可涉及 移除行動裝置500之蓋件及移除螺絲或在行動裝置5〇〇 内連接硬驅動536至支撐結構的其他扣件。 上文已淪述且在第5圖中圖示之可移除記憶體裝置 535至537及可移除記憶體裝置535至537之關聯電腦 儲存器媒體提供對電腦可讀取指令、程式模組、資料結 構及行動裝置500之其他資料的儲存。舉例而言,一或 更多個可移除記憶體裝置535至537可儲存由行動裝置 500採用之影像、語音記錄、接觸資訊、程式、程式資 料等。 使用者可經由諸如小鍵盤541及麥克風542之輸入裝 置鍵入命令及資訊至行動裝置5〇〇中。在一些實施例 中,顯示器543可為觸敏螢幕且可允許使用者在觸敏螢 幕上鍵入命令及資訊。小鍵盤541及顯示器543可經由 耦接至匯流排515之使用者輸入介面55〇連接至處理單 兀,但亦可由諸如一或更多個通訊模組幻2及一或 更多個有料54G之其他介面及匯流排結構來連接。運 動偵測552可用來決定利用裝置5〇〇進行之筆勢。 舉例而言,使用者可經由向麥克風542内講話及經由 在小鍵盤54丨或職顯示器543上鍵人之文本訊息與其 16 201241640 他使用者通訊。音訊單元555可提供電氣訊號以驅動揚 聲器544以及接收且數位化自麥克風以2接收之音訊訊 號。 行動裝置500可包括視訊單元56〇,視訊單元56〇提 供訊號以驅動攝影機561。視訊單元56〇亦可接收由攝 影機561獲得之影像且提供該等影像至處理單元5〇5及/ 或包括在行動裝置500上之記憶體。由攝影機561獲得 之影像可包含視訊、不形成視訊之一或更多個影像或視 訊及一或更多個影像之某一組合。 一或更多個通訊模組532可提供訊號至一或更多個天 線565且可自一或更多個天線565接收訊號。一或更多 個天線565之一者可傳送且接收蜂巢式電話網路之訊 息。另一天線可傳送且接收Bluet〇〇th⑧訊息。又一天線 (或共享天線)可經由無線乙太網路標準傳送且接收網 路訊息。 更進一步,天線提供基於位置之資訊,例如全球定位 系統(global positioning system; GPS)介面及機制 572 之 GPS δίΐ*號。又’ GPS機制572使得對應之用於處理之gps 資料(例如時間及座標)可用。 在一些實施例中,單個天線可用來傳送及/或接收多於 一種網路類型之訊息。舉例而言,單個天線可傳送且接 收語音及封包訊息。 當在網路環境中作業時,行動裝置500可連接至一或 更夕個遠端裝置。遠端裝置可包括個人電腦、伺服器、 17 201241640 路由器、網路PC、蜂巢式電話、媒體播放裝置、同級裝 置或其他共用網路節點,且遠端裝置通常包括上文相對 於行動裝置500所述之一些或所有元件。 本文所述標的之態樣可盘士旦甘2 〜银』興大里其他通用或特殊用途計 算系統環境或配置-起作業。可適於與本文所述標的之 態樣-起使用之熟知計算系統、環境及/或配置之實Μ 括但不限於個人電腦、词服器電腦、手持或膝上型裝置、 多處理器系統、基於微控制器之系統、機上盒、可程式 消費電子裝置、網路PC、迷你電腦、主機電腦、包括任 何上述系統或裝置之分散式計算環境及類似物。 本文所述標的之態樣可在由行動裝置執行之諸如程式 模組之電腦可執行指令的一般上下文中描述。通常,程 f模組包括常式、程式'物件'組件、資料結構等,該 專程式模組執行特定任務或實施特定抽象資料類型。本 文所述標的之態樣亦可實踐於分散式計算環境中,在分 散式計算環境巾由、㈣通⑽路鏈接之遠端處理裝置^ 行任務。在分散式計算環境中,程式模組可定置於包括 記«儲存器裝置之本端電腦館存器媒體及遠端電腦儲 存裔媒體兩者令。 此外’雖然本文可使用術語伺服器,但是應認識到, 此術語亦可涵蓋客戶端、分佈在-或更多個電腦上之一 或更户個程序之集合、—或更多個單獨錯存器、一 或更多個其他裝置之集合、上述一或更多個者之組合及 類似物。 18 201241640 結論 儘管本發明易受各種修改及替代結構的影響,但是本 發明之某些圖示之實施例圖示於圖式中且在上文中進行 了詳細描述。然而應理解,並非意欲將本發明限制為揭 示之特定形式’而是相反地,本發明意欲涵蓋落入本發 明之精神及範疇内之所有修改、替代結構及均等物。 【圖式簡單說明】 本發明藉由舉例之方式進行圖示且不受限於隨附圖 式’其中相同元件符號代表相同元件且其中: 第1圖為描繪由作業系統殼代管之處於不同狀態下之 不例性應用程式之方塊圖,該等示例性應用程式包括處 於休眠狀態下之應用程式。 第2圖為圖示應用程式之示例性狀態及在該等狀態之 間的變遷之狀態圖’該等示例性狀態包括休眠狀態。 第3A圖為描纷當啟動應用程式時,組件間之示例性 事件流/控制之順序/控制圖。 第3B圖為描繚當停用應用程式時,組件間之示例性 事件流/控制之順序/控制圖。 第4A圖為描繪當自休眠狀態恢復停用之應用程式 時組件間之不例性事件流/控制之順序/控制圖。 第4B圖為描繪當關閉應用程式時,組件間之示例性 事件流/控制之順序/控制圖。 第5圖為描繪示例性非限制性計算系統或作業環境之 19 201241640 方塊圖,例如在行動電話裝置之實例中 各種實施例之一或更多個態樣。 可貫施本文所述 【主要元件符號說明】 102 106110, 112 H4n 222 226 230 236 240 331 334 338 342 505 515 525 531 殼 前臺應用程式 墓碑應用程式 方塊 休眠應用程式 方塊 方塊 暫停狀態 休眠狀態 方塊 殼執行管理器 任務代管組件 SLM/XNA 組件 應用程式組件 處理單元 匯流排 應用程式 可移除記憶體介面 535 537 541 543 550 555 561 快閃記憶卡 記憶棒 小鍵盤 顯示器 使用者輸入介面 音訊單元 攝影機 GPS機制 104 108n〇m 114, 120 224 228 234 23B 330 332 3 3 6 340 500 510 520 530 532 536 540 542 544 552 560 565 互斥資源 共享資源 墓碑應用程式 休眠應用程式 資源監控器組件 運行狀態 方塊 方塊 墓碑狀態 taskhost.exe 客戶端執行管理器 訊框組件 CLR組件 行動裝置 系統記憶體 作業系統代碼 堆積 一或更多個通訊模 組 硬碟機 一或更多個有線槔 麥克風 揚聲器 運動偵測 視訊單元 一或更多個天線 20 572Silverlight®-based and shared language runtime. The application code is represented via application component 3 4 2 . Exemplary Operating Environment FIG. 5 illustrates an example of an inappropriate mobile device 5, and the aspect of the subject 12 201241640 described herein may be implemented on the mobile device 500. The mobile device 5 is merely an example of a device and is not intended to suggest any limitation as to the use or scope of the subject matter described herein. The mobile device 5 should not be construed as having any dependency and should not be construed as having a requirement relating to any one or combination of components of any of the components illustrated in the exemplary mobile device 500. Referring to Figure 5, an exemplary device that implements the aspects of the subject matter described herein includes a mobile device 500. In some embodiments, the mobile device includes a cellular telephone 'handheld device that allows voice communication with others, some other voice communication device or the like. In such embodiments, the travel device 500 can be equipped with a camera for imaging, although in other embodiments the camera may not be required. In other implementations, the mobile device 5 can include a personal digital assistant (PDA); a handheld game device; a notebook computer, a printer; and a device including an on-board, a squadron; Other equipment; other mobile devices or similar devices. In the > VIII embodiment, the mobile device 500 may include a dream that is generally considered to be inaction, such as a personal computer, a servo, or the like. The components of the mobile device 500 may include, but are not limited to, the processing unit 5〇5, the system memory 5 10 and the bus bar 5 1 5, and the box j 15 bus bar 515 will include the system s memory 5 10 0 various system components lightly connected? Considering [a handle to the owner of the 兀 兀 505. The bus bar 515 can include any bus bar structure of the bus bar structure to the right cheek type, and the bus bar structure includes the memory sinking household worm i ° U Bu memory fascia, the peripheral bus bar and using various bus bar frames 槿A regional bus and any similar bus structure of any busbar architecture in the Φ + 2 wood structure. Re-bus 515 allows data to be transferred between the various components of 13 201241640 500. Mobile Device The tilt device 500 can include a variety of computer readable media. The computer readable body can be any available media that can be accessed by the mobile device 500, and includes both volatile and non-volatile media, as well as removable and non-removable media.遂 Readable media can include computer storage media and communication media. The computer storage medium includes volatile, non-volatile media, removable and non-removable media, and the media is applied in any method or technology for storage of computer readable instructions, information #. Structure, program module or other f material 1 brain storage media including but not limited to RAM, ROM, EEPROM, flash memory or . Hidden technology, CD-R〇M, digital versatile disc (DVD) or ', his disc storage H, magnetic card, magnetic tape, disk storage ^ or other magnetic storage device, or can store the required information and can be Any other media accessed by the mobile device. Communication media typically implement computer readable instructions, data structures, program modules, or tune information such as other information contained in or other transmissions and include any poor delivery media. The term "modulation data signal" means that the signal of the information in the signal is set or changed. By way of example and not limitation, communication media includes wired media such as a wired network or direct wired connection, and wireless media such as sonic, RF, Bluet00t_, wireless USB, infrared, Naa, ^, and other wireless media. . Any combination of (4) above should also be included in the scope of computer readable media. System memory 510 includes computer storage media in the form of volatile and/or non-volatile memory 201241640 and may include read only memory (R〇M) and random access memory (RAM). On a mobile device such as a cellular telephone, although the operating system code 520 is sometimes included in the ROM, this is not required in other embodiments. Similarly, although application 525 is placed in RAM, in other embodiments the application can be placed in ROM or other computer readable memory. The stack 530 provides the memory with a status associated with the operating system 52 and the application 525. For example, the m-specificity and application 525 can store variables and data structures in the stack 530 during the operation of the operating system 520 and the application 525. The light device 500 can also include other removable/non-removable memory, volatile/non-volatile memory. By way of example, FIG. 5 is not a flash memory card 535, a hard disk drive 536, and a memory stick 537. For example, the hard disk drive 536 can be miniaturized to fit within a memory slot. The mobile device 500 can be interfaced with the non-volatile removable memory interface via the removable memory interface 53 1 or the mobile device 5 (10) can be connected via a universal serial pet (USB), IEEE 5394, or A plurality of wired ports 540 or one or more antennas (6) are connected. In such embodiments, the removable memory devices 535-537 can be interfaced with the binding device via one or more communication modules 532. In some embodiments, not all of these types of memory may be included in a single mobile device p in one of its embodiments, and one or other types of removable memory may be included on a single mobile device. In some implementations, the hard disk drive 536 can be attached more permanently to the mobile device 500. For example, the hard disk drive 536 can be connected to, for example, a parallel advanced technology attachment (PATA), a sedai advanced technology attachment (SATA) or another interface, and the interface can be connected to the bus bar 515. In such embodiments, removing the hard drive may involve removing the cover of the mobile device 500 and removing the screws or connecting the hard drive 536 to the other fasteners of the support structure within the mobile device 5''. The associated computer storage medium of the removable memory devices 535 to 537 and the removable memory devices 535 to 537, which are described above and illustrated in FIG. 5, provide computer readable commands, program modules , data structure and storage of other information on the mobile device 500. For example, one or more removable memory devices 535 through 537 can store images, voice recordings, contact information, programs, program materials, etc., used by mobile device 500. The user can enter commands and information into the mobile device 5 via input devices such as keypad 541 and microphone 542. In some embodiments, display 543 can be a touch sensitive screen and can allow a user to type commands and information on a touch sensitive screen. The keypad 541 and the display 543 can be connected to the processing unit via a user input interface 55 coupled to the bus 515, but can also be composed of, for example, one or more communication modules and one or more materials 54G. Other interfaces and busbar structures are connected. Motion detection 552 can be used to determine the gestures made using device 5〇〇. For example, the user can communicate with his user via a speech message to the microphone 542 and via a text message on the keypad 54 or job display 543. The audio unit 555 can provide electrical signals to drive the speaker 544 and receive and digitize the audio signals received from the microphones 2. The mobile device 500 can include a video unit 56 that provides a signal to drive the camera 561. The video unit 56 can also receive images obtained by the camera 561 and provide the images to the processing unit 5〇5 and/or the memory included on the mobile device 500. The image obtained by camera 561 may include video, no one or more video or video, and some combination of one or more images. One or more communication modules 532 can provide signals to one or more antennas 565 and can receive signals from one or more antennas 565. One of the one or more antennas 565 can transmit and receive information from the cellular telephone network. Another antenna can transmit and receive Bluet〇〇th8 messages. Another antenna (or shared antenna) can transmit and receive network messages via the wireless Ethernet standard. Further, the antenna provides location based information such as the global positioning system (GPS) interface and the GPS δίΐ* number of the mechanism 572. Further, the GPS mechanism 572 makes the corresponding gps data (e.g., time and coordinates) for processing available. In some embodiments, a single antenna can be used to transmit and/or receive more than one type of network message. For example, a single antenna can transmit and receive voice and packet messages. When operating in a network environment, the mobile device 500 can be connected to one or more remote devices. The remote device may include a personal computer, a server, a 17 201241640 router, a network PC, a cellular phone, a media playback device, a peer device, or other shared network node, and the remote device typically includes the above with respect to the mobile device 500 Some or all of the components described. The conditions described in this document can be used in other general-purpose or special-purpose computing system environments or configurations of Panshidan 2 ~ Silver. Well-known computing systems, environments, and/or configurations that may be adapted for use with the subject matter described herein include, but are not limited to, personal computers, word processor computers, handheld or laptop devices, multiprocessor systems. , a microcontroller-based system, a set-top box, a programmable consumer electronic device, a network PC, a mini computer, a host computer, a distributed computing environment including any of the above systems or devices, and the like. The aspects described herein may be described in the general context of computer-executable instructions, such as a program module, executed by a mobile device. Generally, the program f module includes a routine, a program 'object' component, a data structure, etc., and the program module performs a specific task or implements a specific abstract data type. The aspects described in this document can also be practiced in a decentralized computing environment, with remote processing devices in the distributed computing environment and remote processing devices linked by (4) communication links. In a decentralized computing environment, the program module can be placed in both the local computer library media including the memory device and the remote computer storage media. Further 'although the term server may be used herein, it should be recognized that this term may also encompass a client, a collection of one or more programs distributed on - or more computers, or more than a single individual. A set of one or more other devices, a combination of one or more of the foregoing, and the like. 18 201241640 Conclusion While the invention is susceptible to various modifications and alternative constructions, certain illustrative embodiments of the invention are illustrated in the drawings and described in detail herein. It should be understood, however, that the invention is not intended to be limited to the details of the invention. BRIEF DESCRIPTION OF THE DRAWINGS The present invention is illustrated by way of example and not by way of limitation. A block diagram of an exemplary application in a state in which the application is in a dormant state. Figure 2 is a diagram illustrating an exemplary state of an application and a transition between the states. The exemplary states include a sleep state. Figure 3A shows the sequence/control diagram of an exemplary event flow/control between components when the application is launched. Figure 3B is a diagram showing the sequence/control diagram of exemplary event flow/control between components when the application is deactivated. Figure 4A is a sequence/control diagram depicting an exemplary event flow/control between components when the application is resumed from the sleep state. Figure 4B is a diagram showing the sequence/control diagram of exemplary event flow/control between components when the application is closed. Figure 5 is a block diagram depicting an exemplary non-limiting computing system or operating environment 19 201241640, such as one or more aspects of various embodiments in an example of a mobile telephone device. The main component symbol descriptions can be used as described herein. 102 106110, 112 H4n 222 226 230 236 240 331 334 338 342 505 515 525 531 Shell foreground application tombstone application block sleep application block block pause state sleep state block shell execution Manager Task Hosting Component SLM/XNA Component Application Component Processing Unit Bus Array Application Removable Memory Interface 535 537 541 543 550 555 561 Flash Memory Card Memory Stick Keypad Display User Input Interface Audio Unit Camera GPS Mechanism 104 108n〇m 114, 120 224 228 234 23B 330 332 3 3 6 340 500 510 520 530 532 536 540 542 544 552 560 565 Mutually Exclusive Resource Sharing Tombstone Application Hibernate Application Resource Monitor Component Operation Status Block Square Tombstone Status Taskhost.exe client execution manager frame component CLR component mobile device system memory operating system code stacking one or more communication modules hard disk drive one or more wired 槔 microphone speaker motion detection video unit one or more Multiple antennas 20 572