CN103744720B - The management method and equipment of a kind of application program - Google Patents
The management method and equipment of a kind of application program Download PDFInfo
- Publication number
- CN103744720B CN103744720B CN201310752520.3A CN201310752520A CN103744720B CN 103744720 B CN103744720 B CN 103744720B CN 201310752520 A CN201310752520 A CN 201310752520A CN 103744720 B CN103744720 B CN 103744720B
- Authority
- CN
- China
- Prior art keywords
- application
- application program
- message
- state
- program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007726 management method Methods 0.000 title claims abstract description 44
- 238000000034 method Methods 0.000 claims abstract description 66
- 238000004891 communication Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
本发明实施例提供一种应用程序的管理方法和设备,涉及通信领域,以使得应用程序管理设备根据应用程序的应用状态向该应用程序发送系统应用消息,该方法包括:应用程序管理设备获得系统应用消息;其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个,并在该应用程序管理设备获得该系统应用消息后,确定订阅该系统应用消息的应用程序,并获取该应用程序的应用状态;当该应用程序的应用状态与该属性标识对应时,通过该应用程序处理该系统应用消息。本发明实施例用于管理应用程序。
Embodiments of the present invention provide an application program management method and device, which relate to the communication field, so that the application program management device sends a system application message to the application program according to the application status of the application program. The method includes: the application program management device obtains a system application message Application message; wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier, and an unstarted identifier, and after the application management device obtains the system application message, it determines to subscribe to the system application The application program of the message, and obtain the application status of the application program; when the application status of the application program corresponds to the attribute identifier, the system application message is processed through the application program. The embodiment of the present invention is used for managing application programs.
Description
技术领域technical field
本发明涉及通信领域,尤其涉及一种应用程序的管理方法和设备。The present invention relates to the communication field, in particular to an application program management method and equipment.
背景技术Background technique
在基于Android系统的终端中,对于一些Android系统自身配置的应用程序,现有技术中,若应用程序订阅了系统应用消息(即该应用程序的应用消息队列中包括该系统应用消息,如电源控制消息),则系统会将该系统应用消息发送至该应用程序,以便该应用程序处理该系统应用消息。In a terminal based on the Android system, for some application programs configured by the Android system itself, in the prior art, if the application program subscribes to the system application message (that is, the application message queue of the application program includes the system application message, such as power control message), the system will send the system application message to the application so that the application can process the system application message.
但是,若该应用程序处于未启动状态,则在接收到该系统应用消息后,转换为启动状态,并在处理完该系统应用消息后,又转换为未启动状态,从而增大了系统的负载,若该应用程序处于后台状态,则该应用程序会在后台接收该系统应用消息并进行处理,若该系统应用消息不需要在后台进行处理,则会增加系统的负载,占用后台内存,影响用户的体验。However, if the application program is in the unstarted state, it will switch to the started state after receiving the system application message, and will switch to the unstarted state after processing the system application message, thereby increasing the load on the system , if the application is in the background state, the application will receive and process the system application message in the background, if the system application message does not need to be processed in the background, it will increase the load of the system, occupy the background memory, and affect the user experience.
发明内容Contents of the invention
本发明的实施例提供一种应用程序的管理方法和设备,以使得应用程序管理设备根据应用程序的应用状态向该应用程序发送系统应用消息。Embodiments of the present invention provide an application program management method and device, so that the application program management device sends a system application message to the application program according to the application status of the application program.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,提供一种应用程序的管理方法,包括:In the first aspect, an application management method is provided, including:
应用程序管理设备获得系统应用消息;其中,所述系统应用消息包括属性标识,所述属性标识包括前台标识、后台标识和未启动标识中的至少一个;The application management device obtains a system application message; wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier, and an unstarted identifier;
在所述应用程序管理设备获得所述系统应用消息后,确定订阅所述系统应用消息的应用程序,并获取所述应用程序的应用状态;After the application program management device obtains the system application message, determine the application program subscribing to the system application message, and obtain the application status of the application program;
当所述应用程序的应用状态与所述属性标识对应时,通过所述应用程序处理所述系统应用消息。When the application status of the application program corresponds to the attribute identifier, the system application message is processed by the application program.
在第一方面第一种可能的实现方式中,所述获取所述应用程序的状态包括:In a first possible implementation manner of the first aspect, the obtaining the state of the application program includes:
查询状态列表,其中,所述状态列表是操作系统根据所述应用程序的应用状态生成的,所述状态列表包括所述应用程序的应用状态;Querying a status list, wherein the status list is generated by the operating system according to the application status of the application program, and the status list includes the application status of the application program;
根据所述状态列表确定所述应用程序的应用状态。The application state of the application program is determined according to the state list.
结合第一方面或第一种可能的实现方式,在第二种可能的实现方式中,所述通过与所述属性标识对应的应用程序处理所述系统应用消息包括:With reference to the first aspect or the first possible implementation manner, in a second possible implementation manner, processing the system application message through the application program corresponding to the attribute identifier includes:
在所述属性标识包括前台标识且所述应用程序处于前台状态时,通过所述应用程序处理所述系统应用消息;When the attribute identifier includes a foreground identifier and the application program is in the foreground state, process the system application message through the application program;
在所述属性标识包括后台标识且所述应用程序处于后台状态时,通过所述应用程序处理所述系统应用消息;When the attribute identifier includes a background identifier and the application is in a background state, process the system application message through the application;
在所述属性标识包括未启动标识且所述应用程序处于未启动状态时,通过所述应用程序处理所述系统应用消息。When the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the system application message is processed by the application program.
结合第一方面至第二种可能的实现方式中的任一种,在第三种可能的实现方式中,在获取所述应用程序的应用状态前,所述方法还包括:With reference to any one of the first aspect to the second possible implementation manner, in a third possible implementation manner, before acquiring the application state of the application program, the method further includes:
应用程序管理设备查询应用程序启动列表;The application management device queries the application startup list;
根据查询结果确定是否启动所述应用程序;其中,所述应用程序包括所述系统自身配置的应用程序。Whether to start the application program is determined according to the query result; wherein the application program includes an application program configured by the system itself.
结合第第三种可能的实现方式,在第四种可能的实现方式中,所述应用程序启动列表包括所述用户通过所述应用程序管理设备添加的所述应用程序的标识,或所述应用程序通过系统文件访问接口添加的所述应用程序的标识。With reference to the third possible implementation manner, in a fourth possible implementation manner, the application startup list includes the identifier of the application added by the user through the application management device, or the application The identification of the application program added by the program through the system file access interface.
第二方面,提供一种应用程序管理设备,包括In the second aspect, an application program management device is provided, including
获取单元,用于获得系统应用消息,其中,所述系统应用消息包括属性标识,所述属性标识包括前台标识、后台标识和未启动标识中的至少一个;An acquiring unit, configured to acquire a system application message, wherein the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier, and an unstarted identifier;
处理单元,用于在所述获取单元获得所述系统应用消息后,确定订阅所述系统应用消息的应用程序;a processing unit, configured to determine an application program subscribing to the system application message after the obtaining unit obtains the system application message;
所述获取单元还用于,获取所述应用程序的应用状态;The acquiring unit is further configured to acquire the application status of the application program;
所述处理单元还用于,当所述获取单元获取的应用程序的应用状态与所述属性标识对应时,通过所述应用程序处理所述系统应用消息。The processing unit is further configured to process the system application message through the application program when the application state of the application program acquired by the acquisition unit corresponds to the attribute identifier.
在第二方面第一种可能的实现方式中,所述获取单元具体用于,查询状态列表,并根据所述状态列表确定所述应用程序的应用状态,其中,所述状态列表是操作系统根据所述应用程序的应用状态生成的,所述状态列表包括所述应用程序的应用状态。In the first possible implementation manner of the second aspect, the acquiring unit is specifically configured to query a status list, and determine the application status of the application program according to the status list, where the status list is the operating system according to the The application status of the application program is generated, and the status list includes the application status of the application program.
结合第二方面或者第二方面第一种可能的实现方式,在第二种可能的实现方式中,所述处理单元具体用于,With reference to the second aspect or the first possible implementation manner of the second aspect, in the second possible implementation manner, the processing unit is specifically configured to:
在所述属性标识包括前台标识且所述应用程序处于前台状态时,通过所述应用程序处理所述系统应用消息;When the attribute identifier includes a foreground identifier and the application program is in the foreground state, process the system application message through the application program;
在所述属性标识包括后台标识且所述应用程序处于后台状态时,通过所述应用程序处理所述系统应用消息;When the attribute identifier includes a background identifier and the application is in a background state, process the system application message through the application;
在所述属性标识包括未启动标识且所述应用程序处于未启动状态时,通过所述应用程序处理所述系统应用消息。When the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the system application message is processed by the application program.
结合第二方面至第二方面第二种可能的实现方式,在第三种可能的实现方式中,Combining the second aspect to the second possible implementation manner of the second aspect, in a third possible implementation manner,
所述应用程序管理设备还包括:The application management device also includes:
查询单元,用于在所述获取单元获取所述应用程序的应用状态前,查询应用程序启动列表;A query unit, configured to query the application startup list before the acquisition unit acquires the application state of the application;
启动单元,用于根据所述查询单元的查询结果确定是否启动应用程序;其中,所述应用程序包括所述系统自身配置的应用程序。The starting unit is configured to determine whether to start the application program according to the query result of the query unit; wherein the application program includes the application program configured by the system itself.
结合第三种可能的实现方式,在第四中可能的实现方式中,所述应用程序启动列表包括所述用户通过所述应用程序管理设备添加的所述应用程序的标识,或所述应用程序通过系统文件访问接口添加的所述应用程序的标识。With reference to the third possible implementation manner, in a fourth possible implementation manner, the application startup list includes the identifier of the application added by the user through the application management device, or the application The identifier of the application program added through the system file access interface.
通过采用上述方案,应用程序管理设备获得系统应用消息;其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个,并在该应用程序管理设备获得该系统应用消息后,确定订阅该系统应用消息的应用程序,并获取该应用程序的应用状态;当该应用程序的应用状态与该属性标识对应时,通过该应用程序处理该系统应用消息。这样,应用程序管理设备能够根据应用程序的应用状态向该应用程序发送系统应用消息,避免了在该应用程序处于后台状态或者未启动状态且该系统应用消息需要在前台进行处理时时,应用程序管理设备仍然通过应用程序处理该系统应用消息而增加系统的负载以及占用的内存。By adopting the above solution, the application program management device obtains the system application message; wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of the foreground identifier, the background identifier and the inactive identifier, and the application program management device obtains After the system application message, determine the application program subscribing to the system application message, and obtain the application state of the application program; when the application state of the application program corresponds to the attribute identifier, process the system application message through the application program. In this way, the application program management device can send a system application message to the application program according to the application status of the application program, avoiding when the application program is in the background state or not started and the system application message needs to be processed in the foreground. The device still processes the system application message through the application program, which increases the load of the system and the occupied memory.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明实施例提供的一种应用程序的管理方法示意图;FIG. 1 is a schematic diagram of an application program management method provided by an embodiment of the present invention;
图2为本发明实施例提供的另一种应用程序的管理方法示意图;FIG. 2 is a schematic diagram of another application program management method provided by an embodiment of the present invention;
图3为本发明实施例提供的一种应用程序管理设备的结构示意图;FIG. 3 is a schematic structural diagram of an application program management device provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种应用程序管理设备的结构示意图;FIG. 4 is a schematic structural diagram of another application program management device provided by an embodiment of the present invention;
图5为本发明实施例提供的另一种应用程序管理设备的结构示意图。FIG. 5 is a schematic structural diagram of another application program management device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例提供一种应用程序的管理方法,如图2所示,该方法实施例的执行主体为应用程序管理设备,该方法还包括:An embodiment of the present invention provides a method for managing an application program. As shown in FIG. 2 , the execution subject of the method embodiment is an application program management device, and the method further includes:
S101、应用程序管理设备获得系统应用消息。S101. The application management device obtains system application information.
其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个,该系统应用消息由该操作系统产生。Wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier and an unstarted identifier, and the system application message is generated by the operating system.
需要说明的是,该包括属性标识的系统应用消息的格式如下:It should be noted that the format of the system application message including attribute identification is as follows:
上述action以及category定义,构成一个系统应用消息.其中,<categoryandroid.intent.category.background/>字段中的background(后台)即为该系统应用消息的属性标识,当然,该标识还可以为front(前台)或者idle(未启动),本发明对此不作限定。The above action and category definitions constitute a system application message. Among them, the background (background) in the <categoryandroid.intent.category.background/> field is the attribute identification of the system application message. Of course, the identification can also be front( Foreground) or idle (not started), the present invention is not limited to this.
S102、在该应用程序管理设备获得该系统应用消息后,该应用程序管理设备确定订阅该系统应用消息的应用程序,并获取该应用程序的应用状态。S102. After the application management device obtains the system application message, the application management device determines an application subscribing to the system application message, and acquires an application state of the application.
具体地,当该应用程序的系统消息队列中包括该系统应用消息时,则确定该应用程序订阅了该系统应用消息,该应用程序管理设备查询状态列表,并根据该状态列表确定该应用程序的应用状态。Specifically, when the system message queue of the application program includes the system application message, it is determined that the application program has subscribed to the system application message, and the application program management device queries the status list, and determines the status list of the application program according to the status list. application state.
其中,该状态列表是操作系统根据该应用程序的应用状态生成的,该状态列表包括该应用程序的应用状态,该操作系统可以是Android系统。Wherein, the status list is generated by the operating system according to the application status of the application program, the status list includes the application status of the application program, and the operating system may be an Android system.
S103、当该应用程序的应用状态与该属性标识对应时,该应用程序管理设备通过该应用程序处理该系统应用消息。S103. When the application state of the application corresponds to the attribute identifier, the application management device processes the system application message through the application.
具体地,在该属性标识包括前台标识且该应用程序处于前台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息;Specifically, when the attribute identifier includes a foreground identifier and the application is in the foreground state, the application management device processes the system application message through the application;
在该属性标识包括后台标识且该应用程序处于后台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息;When the attribute identifier includes a background identifier and the application is in a background state, the application management device processes the system application message through the application;
在该属性标识包括未启动标识且该应用程序处于未启动状态时,该应用程序管理设备通过该应用程序处理该系统应用消息。When the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the application program management device processes the system application message through the application program.
需要说明的是,若该属性标识包括前台标识、后台标识和未启动标识,则该应用程序无论处于任何状态,应用程序管理设备会通过该应用程序处理该系统应用消息。It should be noted that if the attribute identifier includes a foreground identifier, a background identifier and an unstarted identifier, no matter what state the application is in, the application management device will process the system application message through the application.
示例地,在该系统应用消息的属性标识为前台标识且该应用程序处于前台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息;这样,当应用程序处于后台状态时,无需刷新数据及对应的界面状态,只需在应用程序由后台状态切换至前台状态时,更新数据即可,从而减少了后台监听该系统应用消息造成的系统负载过大;在该系统应用消息的属性标识为后台标识且该应用程序处于后台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息,在该系统应用消息的属性标识为未启动标识时,则该应用程序即使还未启动也会被唤醒,并处理该系统应用消息。For example, when the attribute identifier of the system application message is the foreground identifier and the application is in the foreground state, the application management device processes the system application message through the application; in this way, when the application is in the background state, there is no need to refresh For the data and the corresponding interface state, it is only necessary to update the data when the application is switched from the background state to the foreground state, thereby reducing the excessive system load caused by background monitoring of the system application message; the property identification of the system application message When it is a background identifier and the application is in the background state, the application management device processes the system application message through the application, and when the attribute identification of the system application message is not started, the application will not will be woken up and process the system application message.
进一步地,在现有技术中,在系统启动时,会广播开机启动消息(如BOOT_COMPLETED消息),若该应用程序在系统中对应的配置文件包括开机启动消息的标识(即表示该应用程序注册了该开机启动消息),则该应用程序接收该开机启动消息,并根据该开机启动消息启动,由于上述应用程序是否注册了开机启动消息是系统中预先配置的,从而导致系统在启动时,仍然会使得用户不希望启动的应用程序启动或者用户希望启动的应用程序却没有启动,因此,应用设备在获取该应用程序的应用状态前,查询应用程序启动列表,并根据查询结果确定是否启动所述应用程序。Further, in the prior art, when the system is started, a boot-up message (such as BOOT_COMPLETED message) will be broadcast, if the configuration file corresponding to the application in the system includes the logo of the boot-up message (that is, the application has registered The boot message), then the application program receives the boot message, and starts according to the boot message, because whether the above application has registered the boot message is pre-configured in the system, so that when the system starts, it will still be activated. The application that the user does not want to start is started or the application that the user wants to start is not started. Therefore, before obtaining the application status of the application, the application device queries the application startup list and determines whether to start the application according to the query result. program.
其中,该应用程序可以是该系统自身配置的应用程序。该应用程序启动列表包括该用户通过该应用程序管理设备添加的该应用程序的标识,或该应用程序通过系统文件访问接口添加的该应用程序的标识。Wherein, the application program may be an application program configured by the system itself. The application startup list includes the identifier of the application added by the user through the application management device, or the identifier of the application added by the application through the system file access interface.
也就是说,上述应用程序启动列表中添加该应用程序的标识包括以下两种方式:That is to say, adding the identification of the application in the above application startup list includes the following two ways:
方式一:用户通过该应用程序管理设备将该应用程序的标识添加至该应用程序启动列表。Manner 1: the user adds the identifier of the application program to the application program startup list through the application program management device.
具体地,应用程序配置有提供给用户的启动选项,用户通过该启动选项确定是否使得该应用程序随系统的启动而启动,例如,在该应用程序的设置选项中,包括“开机自动运行此程序”的选项,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”未选中,若用户希望该应用程序在系统启动时自动启动,则选中该设置选项,此时,该应用程序的标识添加至该应用程序启动列表,若用户不希望该应用程序在系统启动时启动,则不更改该设置选项。Specifically, the application program is configured with startup options provided to the user, and the user determines whether to enable the application program to start with the startup of the system through the startup options. " option, for the user, the "automatically run this program" in the setting option of the application is not selected, if the user wants the application to start automatically when the system starts, then select the setting option, at this time, the The logo of the application is added to the application startup list. If the user does not want the application to start when the system starts, the setting option will not be changed.
方式二:应用程序通过系统文件访问接口添加该应用程序的标识。Method 2: The application program adds the identification of the application program through the system file access interface.
具体地,该系统文件访问接口支持该应用程序访问系统文件,该应用程序通过该系统文件访问接口访问系统文件,从而使得应用程序的标识添加至应用程序启动列表。Specifically, the system file access interface supports the application program to access the system file, and the application program accesses the system file through the system file access interface, so that the identification of the application program is added to the application program startup list.
具体地,在系统启动时,该应用程序主动访问系统文件访问接口,从而实现该应用程序的标识的添加,例如,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”已选中,若用户希望该应用程序在系统启动时自动启动,则不更改该设置选项,若用户不希望该应用程序在系统启动时启动,则取消选中该设置选项,此时,该应用程序的标识也从该应用程序启动列表中移除。Specifically, when the system is started, the application program actively accesses the system file access interface, so as to realize the addition of the identification of the application program. Selected, if the user wants the application to start automatically when the system starts, then do not change this setting option, if the user does not want the application to start when the system starts, then uncheck the setting option, at this time, the application's The logo is also removed from the application startup list.
需要说明的是,由上述方式一和方式二可以看出,对于用户来说,方式一中,该应用程序的“开机自动运行此程序”选项默认为未选中,用户可以根据自身需要设置该选项,方式二中,该应用程序的“开机自动运行此程序”选项默认为选中,用户可以根据自身需要设置该选项,也就是说,方式一中,用户根据自身需要确定是否将该应用程序的标识添加至应用程序启动列表,方式二中,由于该应用程序启动列表已包括该应用程序的标识,用户根据自身需要确定是否将该应用程序的标识从该应用程序启动列表中移除。It should be noted that, from the above method 1 and method 2, it can be seen that for the user, in method 1, the option "automatically run this program at startup" of the application is unchecked by default, and the user can set this option according to his own needs , in method 2, the option of "automatically run this program at startup" of the application is selected by default, and users can set this option according to their own needs. Adding to the application startup list, in the second method, since the application startup list already includes the application logo, the user determines whether to remove the application logo from the application startup list according to his own needs.
另外,该应用程序可以包括该系统自身配置的应用程序,也就是说,该应用程序对应的权限高于用户安装的第三方应用程序,权限越高的应用程序能够获得更多的来自系统的服务。In addition, the application program can include the application program configured by the system itself, that is to say, the corresponding authority of the application program is higher than that of the third-party application program installed by the user, and the application program with higher authority can obtain more services from the system .
具体地,当用户完成对应用程序启动的配置后,应用程序管理设备根据用户的设置确定是否将应用程序的标识添加至该应用程序启动列表,当该系统再次上电后,应用程序管理设备查询该应用程序启动列表,从而根据该应用程序启动列表确定是否启动该应用程序。Specifically, after the user completes the configuration of the application program startup, the application program management device determines whether to add the application program identification to the application program startup list according to the user's settings. When the system is powered on again, the application program management device queries The application startup list, so as to determine whether to start the application according to the application startup list.
进一步地,该应用程序管理设备查询该应用程序启动列表包括以下两种情况:Further, the application management device querying the application startup list includes the following two situations:
情况一:应用程序管理设备查询第一应用程序启动列表。Case 1: The application management device queries the first application startup list.
其中,该第一应用程序启动列表包括待启动的应用程序的标识。Wherein, the first application startup list includes identifiers of applications to be started.
具体地,由于该第一应用程序启动列表包括在系统启动时,需要启动的应用程序的标识,因此,该应用程序管理设备在确定该第一应用程序启动列表包括该应用程序的标识时,启动该应用程序,在确定该第一应用程序启动列表不包括该应用程序的标识时,获取启动指令,并根据该启动指令启动该应用程序;也就是说,当该第一应用程序启动列表包括该应用程序的标识时,在系统启动时,自动启动该应用程序的标识对应的应用程序,当该第一应用程序启动列表不包括该应用程序的标识时,即表示该应用程序的标识对应的应用程序不需要在系统启动时自动启动,因此,当该应用程序管理设备获取到该用户通过终端触发对应该应用程序的启动指令后,才启动该应用程序。Specifically, since the first application startup list includes the identifiers of applications that need to be started when the system is started, the application management device starts when the first application startup list includes the identifiers of the applications. The application, when determining that the first application startup list does not include the application identifier, obtains a startup instruction, and starts the application according to the startup instruction; that is, when the first application startup list includes the When the application program is identified, when the system starts, the application program corresponding to the application program identification is automatically launched. When the first application program startup list does not include the application program identification, it means that the application program corresponding to the application program identification The program does not need to be started automatically when the system is started. Therefore, the application program is not started until the application program management device obtains the start instruction corresponding to the application program triggered by the user through the terminal.
情况二,应用程序管理设备查询第二应用程序启动列表。In the second case, the application management device queries the second application startup list.
其中,该第二应用程序启动列表包括不启动的应用程序的标识。Wherein, the second application startup list includes identifiers of applications not to be started.
具体地,由于该第二应用程序启动列表包括在系统启动时,不需要自动启动的应用程序的标识,因此,该应用程序管理设备在确定该第二应用程序启动列表包括该应用程序的标识时,接收启动指令,并根据该启动指令启动该应用程序,在确定该第二应用程序启动列表不包括该应用程序的标识时,启动该应用程序,也就是说,当该第二应用程序启动列表包括该应用程序的标识时,即表示该应用程序的标识对应的应用程序不需要在系统启动时自动启动,因此,当该应用程序管理设备获取到该用户触发的对应该应用程序的启动指令后,才启动该应用程序,当该第二应用程序启动列表不包括该应用程序的标识时,在系统启动时,自动启动该应用程序的标识对应的应用程序。Specifically, since the second application startup list includes the identifiers of applications that do not need to be automatically started when the system is started, when the application management device determines that the second application startup list includes the identifiers of the applications , receive the startup instruction, and start the application program according to the startup instruction, and start the application program when it is determined that the second application program startup list does not include the identification of the application program, that is, when the second application program startup list When the application identification is included, it means that the application corresponding to the application identification does not need to be automatically started when the system starts. Therefore, when the application management device obtains the start instruction corresponding to the application triggered by the user , the application is started, and when the second application startup list does not include the application identifier, the application corresponding to the application identifier is automatically started when the system starts.
通过采用上述方案,应用程序管理设备能够根据应用程序的应用状态向该应用程序发送系统应用消息,避免了在该应用程序处于后台状态或者未启动状态且该系统应用消息需要在前台进行处理时时,应用程序管理设备仍然通过应用程序处理该系统应用消息而增加系统的负载以及占用的内存。By adopting the above solution, the application program management device can send a system application message to the application program according to the application status of the application program, avoiding when the application program is in the background state or not started and the system application message needs to be processed in the foreground. The application program management device still processes the system application message through the application program, which increases the load of the system and the occupied memory.
本发明实施例提供一种应用程序的管理方法,如图2所示,该方法包括:An embodiment of the present invention provides a method for managing an application program, as shown in FIG. 2 , the method includes:
S201、在操作系统启动后,应用程序管理设备获取系统应用消息。S201. After the operating system is started, the application management device acquires system application information.
其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个。Wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier and an unstarted identifier.
需要说明的是,该包括属性标识的系统应用消息的格式如下:It should be noted that the format of the system application message including attribute identification is as follows:
上述action以及category定义,构成一个系统应用消息.其中,<categoryandroid.intent.category.background/>字段中的background(后台)即为该系统应用消息的属性标识,当然,该标识还可以为front(前台)或者idle(未启动),本发明对此不作限定。The above action and category definitions constitute a system application message. Among them, the background (background) in the <categoryandroid.intent.category.background/> field is the attribute identification of the system application message. Of course, the identification can also be front( Foreground) or idle (not started), the present invention is not limited to this.
S202、在该应用程序管理设备获得该系统应用消息后,该应用程序管理设备确定订阅该系统应用消息的应用程序。S202. After the application program management device obtains the system application message, the application program management device determines an application program subscribing to the system application message.
具体地,当该应用程序的系统消息队列中包括该系统应用消息时,则确定该应用程序订阅了该系统应用消息,该应用程序管理设备查询状态列表,并根据该状态列表确定该应用程序的应用状态。Specifically, when the system message queue of the application program includes the system application message, it is determined that the application program has subscribed to the system application message, and the application program management device queries the status list, and determines the status list of the application program according to the status list. application state.
其中,该状态列表是操作系统根据该应用程序的应用状态生成的,该状态列表包括该应用程序的应用状态,该操作系统可以是Android系统。Wherein, the status list is generated by the operating system according to the application status of the application program, the status list includes the application status of the application program, and the operating system may be an Android system.
S203、该应用程序管理设备查询应用程序启动列表。S203. The application management device queries the application startup list.
S204、该应用程序管理设备根据查询结果确定是否启动该应用程序。S204. The application program management device determines whether to start the application program according to the query result.
其中,该应用程序可以是该系统自身配置的应用程序。该应用程序启动列表包括该用户通过该应用程序管理设备添加的该应用程序的标识,或该应用程序通过系统文件访问接口添加的该应用程序的标识。Wherein, the application program may be an application program configured by the system itself. The application startup list includes the identifier of the application added by the user through the application management device, or the identifier of the application added by the application through the system file access interface.
也就是说,上述应用程序启动列表中添加该应用程序的标识包括以下两种方式:That is to say, adding the identification of the application in the above application startup list includes the following two ways:
方式一:用户通过该应用程序管理设备将该应用程序的标识添加至该应用程序启动列表。Manner 1: the user adds the identifier of the application program to the application program startup list through the application program management device.
具体地,应用程序配置有提供给用户的启动选项,用户通过该启动选项确定是否使得该应用程序随系统的启动而启动,例如,在该应用程序的设置选项中,包括“开机自动运行此程序”的选项,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”未选中,若用户希望该应用程序在系统启动时自动启动,则选中该设置选项,此时,该应用程序的标识添加至该应用程序启动列表,若用户不希望该应用程序在系统启动时启动,则不更改该设置选项。Specifically, the application program is configured with startup options provided to the user, and the user determines whether to enable the application program to start with the startup of the system through the startup options. " option, for the user, the "automatically run this program" in the setting option of the application is not selected, if the user wants the application to start automatically when the system starts, then select the setting option, at this time, the The logo of the application is added to the application startup list. If the user does not want the application to start when the system starts, the setting option will not be changed.
方式二:应用程序通过系统文件访问接口添加该应用程序的标识。Method 2: The application program adds the identification of the application program through the system file access interface.
具体地,该系统文件访问接口支持该应用程序访问系统文件,该应用程序通过该系统文件访问接口访问系统文件,从而使得应用程序的标识添加至应用程序启动列表。Specifically, the system file access interface supports the application program to access the system file, and the application program accesses the system file through the system file access interface, so that the identification of the application program is added to the application program startup list.
具体地,在系统启动时,该应用程序主动访问系统文件访问接口,从而实现该应用程序的标识的添加,例如,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”已选中,若用户希望该应用程序在系统启动时自动启动,则不更改该设置选项,若用户不希望该应用程序在系统启动时启动,则取消选中该设置选项,此时,该应用程序的标识也从该应用程序启动列表中移除。Specifically, when the system is started, the application program actively accesses the system file access interface, so as to realize the addition of the identification of the application program. Selected, if the user wants the application to start automatically when the system starts, then do not change this setting option, if the user does not want the application to start when the system starts, then uncheck the setting option, at this time, the application's The logo is also removed from the application startup list.
需要说明的是,由上述方式一和方式二可以看出,对于用户来说,方式一中,该应用程序的“开机自动运行此程序”选项默认为未选中,用户可以根据自身需要设置该选项,方式二中,该应用程序的“开机自动运行此程序”选项默认为选中,用户可以根据自身需要设置该选项,也就是说,方式一中,用户根据自身需要确定是否将该应用程序的标识添加至应用程序启动列表,方式二中,由于该应用程序启动列表已包括该应用程序的标识,用户根据自身需要确定是否将该应用程序的标识从该应用程序启动列表中移除。It should be noted that, from the above method 1 and method 2, it can be seen that for the user, in method 1, the option "automatically run this program at startup" of the application is unchecked by default, and the user can set this option according to his own needs , in method 2, the option of "automatically run this program at startup" of the application is selected by default, and users can set this option according to their own needs. Adding to the application startup list, in the second method, since the application startup list already includes the application logo, the user determines whether to remove the application logo from the application startup list according to his own needs.
其中,该应用程序包括该系统自身配置的应用程序。Wherein, the application program includes the application program configured by the system itself.
具体地,该应用程序管理设备查询该应用程序启动列表包括以下两种情况:Specifically, the application management device querying the application startup list includes the following two situations:
情况一:应用程序管理设备查询第一应用程序启动列表。Case 1: The application management device queries the first application startup list.
其中,该第一应用程序启动列表包括待启动的应用程序的标识。Wherein, the first application startup list includes identifiers of applications to be started.
具体地,由于该第一应用程序启动列表包括在系统启动时,需要启动的应用程序的标识,因此,该应用程序管理设备在确定该第一应用程序启动列表包括该应用程序的标识时,启动该应用程序,在确定该第一应用程序启动列表不包括该应用程序的标识时,获取启动指令,并根据该启动指令启动该应用程序;也就是说,当该第一应用程序启动列表包括该应用程序的标识时,在系统启动时,自动启动该应用程序的标识对应的应用程序,当该第一应用程序启动列表不包括该应用程序的标识时,即表示该应用程序的标识对应的应用程序不需要在系统启动时自动启动,因此,当该应用程序管理设备获取到该用户通过终端触发对应该应用程序的启动指令后,才启动该应用程序。Specifically, since the first application startup list includes the identifiers of applications that need to be started when the system is started, the application management device starts when the first application startup list includes the identifiers of the applications. The application, when determining that the first application startup list does not include the application identifier, obtains a startup instruction, and starts the application according to the startup instruction; that is, when the first application startup list includes the When the application program is identified, when the system starts, the application program corresponding to the application program identification is automatically launched. When the first application program startup list does not include the application program identification, it means that the application program corresponding to the application program identification The program does not need to be started automatically when the system is started. Therefore, the application program is not started until the application program management device obtains the start instruction corresponding to the application program triggered by the user through the terminal.
情况二,应用程序管理设备查询第二应用程序启动列表。In the second case, the application management device queries the second application startup list.
其中,该第二应用程序启动列表包括不启动的应用程序的标识。Wherein, the second application startup list includes identifiers of applications not to be started.
具体地,由于该第二应用程序启动列表包括在系统启动时,不需要自动启动的应用程序的标识,因此,该应用程序管理设备在确定该第二应用程序启动列表包括该应用程序的标识时,接收启动指令,并根据该启动指令启动该应用程序,在确定该第二应用程序启动列表不包括该应用程序的标识时,启动该应用程序,也就是说,当该第二应用程序启动列表包括该应用程序的标识时,即表示该应用程序的标识对应的应用程序不需要在系统启动时自动启动,因此,当该应用程序管理设备获取到该用户触发的对应该应用程序的启动指令后,才启动该应用程序,当该第二应用程序启动列表不包括该应用程序的标识时,在系统启动时,自动启动该应用程序的标识对应的应用程序。Specifically, since the second application startup list includes the identifiers of applications that do not need to be automatically started when the system is started, when the application management device determines that the second application startup list includes the identifiers of the applications , receive the startup instruction, and start the application program according to the startup instruction, and start the application program when it is determined that the second application program startup list does not include the identification of the application program, that is, when the second application program startup list When the identification of the application program is included, it means that the application corresponding to the identification of the application program does not need to start automatically when the system starts. , the application is started, and when the second application startup list does not include the application identifier, the application corresponding to the application identifier is automatically started when the system starts.
S205、该应用程序管理设备查询该应用程序的状态列表。S205. The application program management device queries the status list of the application program.
其中,该状态列表是操作系统根据该应用程序的应用状态生成的,该状态列表包括该应用程序的应用状态。Wherein, the status list is generated by the operating system according to the application status of the application program, and the status list includes the application status of the application program.
S206、该应用程序管理设备根据该状态列表确定该应用程序的应用状态。S206. The application program management device determines the application status of the application program according to the status list.
需要说明的是,当该应用程序启动后,用户可以将该应用程序的应用状态设置为前台状态或者后台状态。It should be noted that, after the application is started, the user can set the application state of the application as the foreground state or the background state.
S207、当该应用程序的应用状态与该属性标识对应时,该应用程序管理设备通过该应用程序处理该系统应用消息。S207. When the application state of the application corresponds to the attribute identifier, the application management device processes the system application message through the application.
具体地,在该属性标识包括前台标识且该应用程序处于前台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息。Specifically, when the attribute identifier includes a foreground identifier and the application is in the foreground state, the application management device processes the system application message through the application.
在该属性标识包括后台标识且该应用程序处于后台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息。When the attribute identifier includes a background identifier and the application program is in a background state, the application program management device processes the system application message through the application program.
在该属性标识包括未启动标识且该应用程序处于未启动状态时,该应用程序管理设备通过该应用程序处理该系统应用消息。When the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the application program management device processes the system application message through the application program.
需要说明的是,若该属性标识包括前台标识、后台标识和未启动标识,则该应用程序无论处于任何状态,应用程序管理设备会通过该应用程序处理该系统应用消息。It should be noted that if the attribute identifier includes a foreground identifier, a background identifier and an unstarted identifier, no matter what state the application is in, the application management device will process the system application message through the application.
示例地,在该系统应用消息的属性标识为前台标识且该应用程序处于前台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息;这样,当应用程序处于后台状态时,无需刷新数据及对应的界面状态,只需在应用程序由后台状态切换至前台状态时,更新数据即可,从而减少了后台监听该系统应用消息造成的系统负载过大;在该系统应用消息的属性标识为后台标识且该应用程序处于后台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息,在该系统应用消息的属性标识为未启动标识时,则该应用程序即使还未启动也会被唤醒,并处理该系统应用消息。For example, when the attribute identifier of the system application message is the foreground identifier and the application is in the foreground state, the application management device processes the system application message through the application; in this way, when the application is in the background state, there is no need to refresh For the data and the corresponding interface state, it is only necessary to update the data when the application is switched from the background state to the foreground state, thereby reducing the excessive system load caused by background monitoring of the system application message; the property identification of the system application message When it is a background identifier and the application is in the background state, the application management device processes the system application message through the application, and when the attribute identification of the system application message is not started, the application will not will be woken up and process the system application message.
通过采用上述方案,应用程序管理设备能够根据应用程序的应用状态向该应用程序发送系统应用消息,避免了在该应用程序处于后台状态或者未启动状态且该系统应用消息需要在前台进行处理时时,应用程序管理设备仍然通过应用程序处理该系统应用消息而增加系统的负载以及占用的内存。By adopting the above solution, the application program management device can send a system application message to the application program according to the application status of the application program, avoiding when the application program is in the background state or not started and the system application message needs to be processed in the foreground. The application program management device still processes the system application message through the application program, which increases the load of the system and the occupied memory.
需要说明的是,对于上述的方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the above method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
本发明实施例提供一种应用程序管理设备30,如图3所示,包括:An embodiment of the present invention provides an application program management device 30, as shown in FIG. 3 , including:
获取单元30,用于获得系统应用消息。The obtaining unit 30 is configured to obtain system application information.
其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个。Wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier and an unstarted identifier.
需要说明的是,该包括属性标识的系统应用消息的格式如下:It should be noted that the format of the system application message including attribute identification is as follows:
上述action以及category定义,构成一个系统应用消息.其中,<categoryandroid.intent.category.background/>字段中的background(后台)即为该系统应用消息的属性标识,当然,该标识还可以为front(前台)或者idle(未启动),本发明对此不作限定。The above action and category definitions constitute a system application message. Among them, the background (background) in the <categoryandroid.intent.category.background/> field is the attribute identification of the system application message. Of course, the identification can also be front( Foreground) or idle (not started), the present invention is not limited to this.
处理单元31,用于在该获取单元30获得该系统应用消息后,确定订阅该系统应用消息的应用程序。The processing unit 31 is configured to determine an application program subscribing to the system application message after the obtaining unit 30 obtains the system application message.
该获取单元30还用于,获取该应用程序的应用状态。The obtaining unit 30 is also used to obtain the application state of the application program.
该处理单元31还用于,当该获取单元30获取的应用程序的应用状态与该属性标识对应时,通过该应用程序处理该系统应用消息。The processing unit 31 is further configured to process the system application message through the application program when the application state of the application program acquired by the acquisition unit 30 corresponds to the attribute identifier.
具体地,该获取单元30具体用于,查询状态列表,并根据该状态列表确定该应用程序的应用状态。Specifically, the acquiring unit 30 is specifically configured to query the status list, and determine the application status of the application program according to the status list.
其中,该状态列表是操作系统根据该应用程序的应用状态生成的,该状态列表包括该应用程序的应用状态。Wherein, the status list is generated by the operating system according to the application status of the application program, and the status list includes the application status of the application program.
进一步地,该处理单元31具体用于,Further, the processing unit 31 is specifically used for:
在该属性标识包括前台标识且该应用程序处于前台状态时,通过该应用程序处理该系统应用消息;When the attribute identifier includes a foreground identifier and the application program is in the foreground state, process the system application message through the application program;
在该属性标识包括后台标识且该应用程序处于后台状态时,通过该应用程序处理该系统应用消息;When the attribute identifier includes a background identifier and the application program is in a background state, process the system application message through the application program;
在该属性标识包括未启动标识且该应用程序处于未启动状态时,通过该应用程序处理该系统应用消息。When the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the system application message is processed through the application program.
需要说明的是,若该属性标识包括前台标识、后台标识和未启动标识,则该应用程序无论处于任何状态,应用程序管理设备会通过该应用程序处理该系统应用消息。It should be noted that if the attribute identifier includes a foreground identifier, a background identifier and an unstarted identifier, no matter what state the application is in, the application management device will process the system application message through the application.
示例地,在该系统应用消息的属性标识为前台标识且该应用程序处于前台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息;这样,当应用程序处于后台状态时,无需刷新数据及对应的界面状态,只需在应用程序由后台状态切换至前台状态时,更新数据即可,从而减少了后台监听该系统应用消息造成的系统负载过大;在该系统应用消息的属性标识为后台标识且该应用程序处于后台状态时,该应用程序管理设备通过该应用程序处理该系统应用消息,在该系统应用消息的属性标识为未启动标识时,则该应用程序即使还未启动也会被唤醒,并处理该系统应用消息。For example, when the attribute identifier of the system application message is the foreground identifier and the application is in the foreground state, the application management device processes the system application message through the application; in this way, when the application is in the background state, there is no need to refresh For the data and the corresponding interface state, it is only necessary to update the data when the application is switched from the background state to the foreground state, thereby reducing the excessive system load caused by background monitoring of the system application message; the property identification of the system application message When it is a background identifier and the application is in the background state, the application management device processes the system application message through the application, and when the attribute identification of the system application message is not started, the application will not will be woken up and process the system application message.
进一步地,如图4所示,该应用程序管理设备30还包括:Further, as shown in FIG. 4, the application program management device 30 also includes:
查询单元33,用于在该获取单元获取该应用程序的应用状态前,查询应用程序启动列表。The query unit 33 is configured to query the application startup list before the acquisition unit acquires the application state of the application.
启动单元34,用于根据该查询单元33的查询结果确定是否启动应用程序。The starting unit 34 is configured to determine whether to start the application program according to the query result of the query unit 33 .
其中,该应用程序包括该系统自身配置的应用程序。Wherein, the application program includes the application program configured by the system itself.
可选地,该应用程序启动列表包括该用户通过该应用程序管理设备添加的该应用程序的标识。Optionally, the application startup list includes the identifier of the application added by the user through the application management device.
具体地,应用程序配置有提供给用户的启动选项,用户通过该启动选项确定是否使得该应用程序随系统的启动而启动,例如,在该应用程序的设置选项中,包括“开机自动运行此程序”的选项,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”未选中,若用户希望该应用程序在系统启动时自动启动,则选中该设置选项,此时,该应用程序的标识添加至该应用程序启动列表,若用户不希望该应用程序在系统启动时启动,则不更改该设置选项。Specifically, the application program is configured with startup options provided to the user, and the user determines whether to enable the application program to start with the startup of the system through the startup options. " option, for the user, the "automatically run this program" in the setting option of the application is not selected, if the user wants the application to start automatically when the system starts, then select the setting option, at this time, the The logo of the application is added to the application startup list. If the user does not want the application to start when the system starts, the setting option will not be changed.
可选地,该应用程序通过系统文件访问接口添加的该应用程序的标识。Optionally, the application program adds the identification of the application program through the system file access interface.
具体地,该系统文件访问接口支持该应用程序访问系统文件,该应用程序通过该系统文件访问接口访问系统文件,从而使得应用程序的标识添加至应用程序启动列表。Specifically, the system file access interface supports the application program to access the system file, and the application program accesses the system file through the system file access interface, so that the identification of the application program is added to the application program startup list.
具体地,在系统启动时,该应用程序主动访问系统文件访问接口,从而实现该应用程序的标识的添加,例如,对于用户来说,该应用程序的设置选项中的“开机自动运行此程序”已选中,若用户希望该应用程序在系统启动时自动启动,则不更改该设置选项,若用户不希望该应用程序在系统启动时启动,则取消选中该设置选项,此时,该应用程序的标识也从该应用程序启动列表中移除。Specifically, when the system is started, the application program actively accesses the system file access interface, so as to realize the addition of the identification of the application program. Selected, if the user wants the application to start automatically when the system starts, then do not change this setting option, if the user does not want the application to start when the system starts, then uncheck the setting option, at this time, the application's The logo is also removed from the application startup list.
通过采用上述应用程序管理设备,应用程序管理设备能够根据应用程序的应用状态向该应用程序发送系统应用消息,避免了在该应用程序处于后台状态或者未启动状态且该系统应用消息需要在前台进行处理时时,应用程序管理设备仍然通过应用程序处理该系统应用消息而增加系统的负载以及占用的内存。By adopting the above-mentioned application program management device, the application program management device can send a system application message to the application program according to the application status of the application program, avoiding that the application program is in the background state or is not started and the system application message needs to be processed in the foreground. When processing, the application program management device still processes the system application message through the application program, which increases the load of the system and the occupied memory.
所属本领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的应用程序管理设备的具体工作过程和描述,可以参考前述图1描述的方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process and description of the above-described application program management device can refer to the corresponding process in the method embodiment described in Figure 1 above, and here No longer.
本发明实施例提供一种应用程序管理设备50,如图5所示,该应用程序管理设备包括:处理器(processor)51、通信接口(Communications Interface)52、存储器(memory)53和通信总线54;其中,所述处理器51、所述通信接口52和所述存储器53通过所述通信总线54完成相互间的通信。An embodiment of the present invention provides an application program management device 50, as shown in FIG. ; Wherein, the processor 51, the communication interface 52 and the memory 53 communicate with each other through the communication bus 54.
处理器51可能是一个中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。The processor 51 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
存储器53用于存放程序代码,所述程序代码包括计算机操作指令。存储器53可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 53 is used to store program codes, and the program codes include computer operation instructions. The memory 53 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
所述通信接口52,用于实现这些装置之间的连接通信。The communication interface 52 is used to realize connection and communication between these devices.
所述处理器51执行程序代码,用于获得系统应用消息;其中,该系统应用消息包括属性标识,该属性标识包括前台标识、后台标识和未启动标识中的至少一个;在获得该系统应用消息后,确定订阅该系统应用消息的应用程序,并获取该应用程序的应用状态;当该应用程序的应用状态与该属性标识对应时,通过该应用程序处理该系统应用消息。The processor 51 executes a program code to obtain a system application message; wherein, the system application message includes an attribute identifier, and the attribute identifier includes at least one of a foreground identifier, a background identifier, and an unstarted identifier; after obtaining the system application message After that, determine the application that subscribes to the system application message, and obtain the application state of the application; when the application state of the application corresponds to the attribute identifier, process the system application message through the application.
可选地,该处理器51具体用于,查询状态列表,其中,该状态列表是操作系统根据该应用程序的应用状态生成的,该状态列表包括该应用程序的应用状态,并根据该状态列表确定该应用程序的应用状态。Optionally, the processor 51 is specifically configured to query a status list, where the status list is generated by the operating system according to the application status of the application program, the status list includes the application status of the application program, and the status list is generated according to the status list Determines the application state of the application.
可选地,该处理器51具体用于,在该属性标识包括前台标识且该应用程序处于前台状态时,通过该应用程序处理该系统应用消息,在该属性标识包括后台标识且该应用程序处于后台状态时,通过该应用程序处理该系统应用消息,在该属性标识包括未启动标识且该应用程序处于未启动状态时,通过该应用程序处理该系统应用消息。Optionally, the processor 51 is specifically configured to process the system application message through the application when the attribute identifier includes a foreground identifier and the application is in the foreground state, and when the attribute identifier includes a background identifier and the application is in the foreground state. In the background state, the system application message is processed through the application program, and when the attribute identifier includes an unstarted identifier and the application program is in an unstarted state, the system application message is processed through the application program.
可选地,该处理器51还用于,在获取该应用程序的应用状态前,应用程序管理设备查询应用程序启动列表,并根据查询结果确定是否启动该应用程序。Optionally, the processor 51 is further configured to, before acquiring the application state of the application, the application management device queries the application startup list, and determines whether to start the application according to the query result.
其中,该应用程序包括该系统自身配置的应用程序。Wherein, the application program includes the application program configured by the system itself.
可选地,该应用程序启动列表包括该用户通过该应用程序管理设备添加的该应用程序的标识,或该应用程序通过系统文件访问接口添加的该应用程序的标识。Optionally, the application startup list includes the identifier of the application added by the user through the application management device, or the identifier of the application added by the application through the system file access interface.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (10)
- A kind of 1. management method of application program, it is characterised in that including:Application program management equipment obtains system application message;Wherein, the system application message includes attribute-bit, the category Property mark include it is at least one in preceding station identification, rear station identification and not actuated mark;After the application program management equipment obtains the system application message, determine to subscribe to answering for the system application message With program, and obtain the application state of the application program;When the application program application state and the attribute-bit to it is corresponding when pass through the application program and handle the system Application message.
- 2. according to the method described in claim 1, it is characterized in that, the application state for obtaining the application program includes:Status list is inquired about, wherein, the status list is that operating system is generated according to the application state of the application program, The status list includes the application state of the application program;The application state of the application program is determined according to the status list.
- 3. method according to claim 1 or 2, it is characterised in that described to pass through application corresponding with the attribute-bit The program processing system application message includes:When the attribute-bit includes preceding station identification and the application program is in foreground state, at the application program Manage the system application message;When the attribute-bit includes rear station identification and the application program is in background state, at the application program Manage the system application message;When the attribute-bit includes not actuated mark and the application program is in inactive state, journey is applied by described The sequence processing system application message.
- It is 4. described according to the method described in claim 1, it is characterized in that, before the application state of the application program is obtained Method further includes:Application program management equipment query application program launching list;Determined whether to start the application program according to query result;Wherein, the application program itself is matched somebody with somebody including the system The application program put.
- 5. according to the method described in claim 4, it is characterized in that, the application program launching list pass through including user it is described The mark of the application program of application program management equipment addition, or the application program are added by system file access interface The mark of the application program added.
- A kind of 6. application program management equipment, it is characterised in that including:Acquiring unit, for obtaining system application message, wherein, the system application message includes attribute-bit, the attribute Mark includes at least one in preceding station identification, rear station identification and not actuated mark;Processing unit, for after the acquiring unit obtains the system application message, determining that subscribing to the system application disappears The application program of breath;The acquiring unit is additionally operable to, and obtains the application state of the application program;The processing unit is additionally operable to, when application state and the attribute-bit pair of the application program that the acquiring unit obtains At once, the system application message is handled by the application program.
- 7. equipment according to claim 6, it is characterised in that the acquiring unit is specifically used for, and inquires about status list, and The application state of the application program is determined according to the status list, wherein, the status list is operating system according to institute The application state generation of application program is stated, the status list includes the application state of the application program.
- 8. the equipment according to claim 6 or 7, it is characterised in that the processing unit is specifically used for,When the attribute-bit includes preceding station identification and the application program is in foreground state, at the application program Manage the system application message;When the attribute-bit includes rear station identification and the application program is in background state, at the application program Manage the system application message;When the attribute-bit includes not actuated mark and the application program is in inactive state, journey is applied by described The sequence processing system application message.
- 9. equipment according to claim 6, it is characterised in that the application program management equipment further includes:Query unit, for before the application state that the acquiring unit obtains the application program, inquiry application to start List;Start unit, for being determined whether to start application program according to the query result of the query unit;Wherein, the application Program includes the application program of the system itself configuration.
- 10. equipment according to claim 9, it is characterised in that the application program launching list passes through institute including user The mark of the application program of application program management equipment addition is stated, or the application program passes through system file access interface The mark of the application program of addition.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810155140.4A CN108469985B (en) | 2013-12-31 | 2013-12-31 | Application program management method and device |
CN201310752520.3A CN103744720B (en) | 2013-12-31 | 2013-12-31 | The management method and equipment of a kind of application program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310752520.3A CN103744720B (en) | 2013-12-31 | 2013-12-31 | The management method and equipment of a kind of application program |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810155140.4A Division CN108469985B (en) | 2013-12-31 | 2013-12-31 | Application program management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103744720A CN103744720A (en) | 2014-04-23 |
CN103744720B true CN103744720B (en) | 2018-05-04 |
Family
ID=50501740
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310752520.3A Active CN103744720B (en) | 2013-12-31 | 2013-12-31 | The management method and equipment of a kind of application program |
CN201810155140.4A Active CN108469985B (en) | 2013-12-31 | 2013-12-31 | Application program management method and device |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810155140.4A Active CN108469985B (en) | 2013-12-31 | 2013-12-31 | Application program management method and device |
Country Status (1)
Country | Link |
---|---|
CN (2) | CN103744720B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108469985A (en) * | 2013-12-31 | 2018-08-31 | 华为终端(东莞)有限公司 | A kind of management method and equipment of application program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101615141A (en) * | 2008-06-26 | 2009-12-30 | 陈鹰 | A kind of method and application program scheduling module of carrying out application program scheduling |
CN101916197A (en) * | 2010-07-22 | 2010-12-15 | 北京东土科技股份有限公司 | Method for controlling self-starting program of system |
CN102779068A (en) * | 2012-07-10 | 2012-11-14 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal and application program networking control method |
CN102955560A (en) * | 2011-08-25 | 2013-03-06 | 腾讯科技(深圳)有限公司 | Application program processing method and device |
CN103259825A (en) * | 2012-02-21 | 2013-08-21 | 腾讯科技(深圳)有限公司 | Method and device for message pushing |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0942366A2 (en) * | 1998-03-10 | 1999-09-15 | Lucent Technologies Inc. | Event-driven and cyclic context controller and processor employing the same |
US9063775B2 (en) * | 2011-09-01 | 2015-06-23 | Microsoft Technology Licensing, Llc | Event aggregation for background work execution |
CN103744720B (en) * | 2013-12-31 | 2018-05-04 | 华为终端(东莞)有限公司 | The management method and equipment of a kind of application program |
-
2013
- 2013-12-31 CN CN201310752520.3A patent/CN103744720B/en active Active
- 2013-12-31 CN CN201810155140.4A patent/CN108469985B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101615141A (en) * | 2008-06-26 | 2009-12-30 | 陈鹰 | A kind of method and application program scheduling module of carrying out application program scheduling |
CN101916197A (en) * | 2010-07-22 | 2010-12-15 | 北京东土科技股份有限公司 | Method for controlling self-starting program of system |
CN102955560A (en) * | 2011-08-25 | 2013-03-06 | 腾讯科技(深圳)有限公司 | Application program processing method and device |
CN103259825A (en) * | 2012-02-21 | 2013-08-21 | 腾讯科技(深圳)有限公司 | Method and device for message pushing |
CN102779068A (en) * | 2012-07-10 | 2012-11-14 | 宇龙计算机通信科技(深圳)有限公司 | Mobile terminal and application program networking control method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108469985A (en) * | 2013-12-31 | 2018-08-31 | 华为终端(东莞)有限公司 | A kind of management method and equipment of application program |
Also Published As
Publication number | Publication date |
---|---|
CN108469985A (en) | 2018-08-31 |
CN103744720A (en) | 2014-04-23 |
CN108469985B (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109101318B (en) | A kind of virtual machine migration control method and device | |
CN112087494B (en) | Method for processing request, system on chip and public cloud management component | |
US20150331612A1 (en) | Memory Cleaning Method and Apparatus, and Terminal Device | |
US9703353B2 (en) | Method and electronic device for reducing current consumption by the electronic device | |
CN103593217B (en) | A kind of hook key adjusting earphone starts method and the terminal of application order | |
CN108605373B (en) | Method and electronic device for providing network sharing service | |
CN107086937B (en) | Monitoring method and device | |
CN106533945A (en) | Terminal type automatic identification method and system based on smart router | |
US11907153B2 (en) | System and method for distributed subscription management | |
CN112740638B (en) | Packet Data Unit (PDU) session control method and device | |
CN105681081A (en) | Physical machine management method and device | |
US20230221784A1 (en) | System and method for power state enforced subscription management | |
WO2020097873A1 (en) | Floating window control method and related product | |
CN105282733A (en) | Electronic device and network connection method of electronic device | |
WO2020259227A1 (en) | Thread task communication system, method, and related product | |
CN104579889B (en) | A kind of method and device for being used to call network function | |
CN104601448B (en) | A kind of method and apparatus handled virtual card | |
CN107395955A (en) | Method for determining power-on time sequence of camera module and user terminal | |
CN113726581B (en) | Method and device for restoring factory configuration of network equipment and network equipment | |
CN103744720B (en) | The management method and equipment of a kind of application program | |
CN104426918A (en) | Device setting method and electronic device | |
CN112835826B (en) | A communication method, device, equipment and readable storage medium | |
CN106453571A (en) | Data migration method and terminal | |
CN107220344B (en) | Document processing methods and related products | |
CN108762983A (en) | Multi-medium data restoration methods and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20171031 Address after: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop Applicant after: Huawei terminal (Dongguan) Co.,Ltd. Address before: 518129 Longgang District, Guangdong, Bantian HUAWEI base B District, building 2, building No. Applicant before: HUAWEI DEVICE Co.,Ltd. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province Patentee after: HUAWEI DEVICE Co.,Ltd. Address before: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province Patentee before: Huawei terminal (Dongguan) Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder | ||
TR01 | Transfer of patent right |
Effective date of registration: 20210422 Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Device Co.,Ltd. Address before: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop Patentee before: HUAWEI DEVICE Co.,Ltd. |
|
TR01 | Transfer of patent right | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |