WO2019061331A1 - Method, apparatus and readable storage medium for blocking app-to-app wake-up - Google Patents

Method, apparatus and readable storage medium for blocking app-to-app wake-up Download PDF

Info

Publication number
WO2019061331A1
WO2019061331A1 PCT/CN2017/104497 CN2017104497W WO2019061331A1 WO 2019061331 A1 WO2019061331 A1 WO 2019061331A1 CN 2017104497 W CN2017104497 W CN 2017104497W WO 2019061331 A1 WO2019061331 A1 WO 2019061331A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
running
identification information
service
prohibiting
Prior art date
Application number
PCT/CN2017/104497
Other languages
French (fr)
Chinese (zh)
Inventor
杨绪鹏
刘维锋
Original Assignee
深圳传音通讯有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳传音通讯有限公司 filed Critical 深圳传音通讯有限公司
Priority to PCT/CN2017/104497 priority Critical patent/WO2019061331A1/en
Publication of WO2019061331A1 publication Critical patent/WO2019061331A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, a device, and a readable storage medium for prohibiting application programs from awakening each other.
  • the currently used methods for prohibiting applications from waking each other are generally to collect related applications that are frequently awake from each other in the commonly used applications in the country through big data technology, and then these applications are still awakened when other applications are started.
  • This approach requires the support of big data technology, requires a large amount of data collection, and then through data analysis to find applications that wake each other.
  • data collection and data analysis are required to accurately prohibit applications from awakening each other. It can be seen that the existing methods for prohibiting applications from awakening each other are costly and inefficient.
  • the main object of the present invention is to provide a method, a device, and a readable storage medium for prohibiting application programs from awakening each other, and to solve the technical problem of high cost and low efficiency of the existing method for prohibiting application mutual wake-up.
  • the present invention provides a method for prohibiting applications from waking up each other, and the method for prohibiting applications from waking each other includes the steps of:
  • the Android Activity Manager service AMS When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
  • the second application If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
  • the step of disabling the service operation of the second application comprises:
  • the service running of the second application is prohibited.
  • the method further includes
  • the service of the second application is allowed to run.
  • the step of allowing the service of the second application to run includes:
  • the service that the second application is running has running permission, the service that the second application is running is allowed to run.
  • the method further includes:
  • the second application if the second application is awakened, acquiring identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identifier After the steps of the information, it also includes:
  • the step of disabling the service operation of the second application comprises:
  • the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
  • the method further includes:
  • the present invention also provides an apparatus for prohibiting applications from waking each other, the apparatus for prohibiting applications from waking each other, including a memory, a processor, and a memory stored on the processor and on the processor
  • a running program that prohibits applications from waking each other, and the program for prohibiting application wake-ups from each other is executed by the processor to implement the steps of the method of prohibiting the application from awakening each other as described above.
  • the present invention further provides a computer readable storage medium having stored thereon a program for prohibiting application programs from waking each other, and the program for prohibiting application programs from waking each other is executed by a processor.
  • the steps of the method of prohibiting application wake-ups from each other as described above are implemented.
  • the invention detects whether a second application is awakened by the AMS when detecting that the first application is started; if the second application is awakened, acquiring the identification information of the application running in the foreground, recorded as the first An identification information, and the identification information of the second application is recorded as the second identification information; if the matching of the first identification information and the second identification information fails, the service of the second application is prohibited run.
  • the application in the mobile terminal is started, if the application that is awake is detected by the AMS, and the awake application is not the application running in the foreground of the mobile terminal, the application that is awake is prohibited.
  • the service is running. In the process of prohibiting application mutual wake-up, it does not need a lot of data collection and data analysis, which improves the efficiency of prohibiting applications from waking each other and reduces the cost of prohibiting applications from awakening each other.
  • FIG. 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for prohibiting applications from awakening each other according to the present invention
  • FIG. 3 is a schematic flowchart of disabling service operation of the second application program if the first identifier information and the second identifier information fail to match in the embodiment of the present invention
  • FIG. 4 is a schematic flowchart of allowing the service of the second application to run according to the authorization information, if the second application has the running permission according to the authorization information;
  • FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a method for prohibiting application programs from awakening each other according to the present invention.
  • the solution of the embodiment of the present invention is mainly: when detecting that the first application is started, detecting whether a second application is awakened by the Android Activity Manager service AMS; if the second application is awakened, acquiring The identification information of the application running in the foreground is recorded as the first identification information, and the identification information of the second application is obtained as the second identification information; if the first identification information matches the second identification information If it fails, the service running of the second application is prohibited.
  • FIG. 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present invention.
  • FIG. 1 may be a schematic structural diagram of a hardware operating environment of a device that prohibits applications from waking each other.
  • the device for prohibiting the application from waking up to each other in the embodiment of the present invention may be a terminal device such as a PC, a smart phone, or a portable computer.
  • the device for prohibiting applications from waking up each other may include: a processor 1001, such as a CPU, a network interface 1004, a memory 1005, and a communication bus 1002.
  • the communication bus 1002 is used to implement connection communication between these components.
  • the user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface.
  • the network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage.
  • the memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
  • the device that prohibits the application from waking each other may also include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
  • RF Radio
  • RF Radio
  • the device structure shown in FIG. 1 for prohibiting applications from waking up to each other does not constitute a limitation of the terminal, and may include more or less components than those illustrated, or combine some components, or different. Parts layout.
  • a memory 1005 as a computer storage medium may include an operating system and a program for prohibiting applications from waking each other.
  • the operating system is a program that manages and controls device hardware and software resources that prohibit applications from waking each other, and supports programs that prohibit applications from waking each other and other software or programs.
  • the user interface 1003 is configured to receive an operation instruction of the user, start the application, and add the second identification information to the disabled list corresponding to the first application;
  • the network interface 1004 It is mainly used to access the network, perform data connection, etc.; and the processor 1001 can be used to call a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following operations:
  • the Android Activity Manager service AMS When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
  • the second application If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
  • the step of disabling the service operation of the second application includes:
  • the service running of the second application is prohibited.
  • the processor 1001 may further be configured to invoke a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following steps. :
  • the service of the second application is allowed to run.
  • the step of allowing the service of the second application to run includes:
  • the service that the second application is running has running permission, the service that the second application is running is allowed to run.
  • the processor 1001 may further be used to call after determining whether the service running by the second application has a running right.
  • a program stored in the memory 1005 that prohibits applications from waking each other and performs the following steps:
  • the processor 1001 can also be used to call a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following steps:
  • the step of disabling the service operation of the second application includes:
  • the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
  • the processor 1001 may further be configured to invoke the storage in the memory 1005. Programs that prohibit applications from waking each other and perform the following steps:
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for prohibiting application programs from awakening each other according to the present invention.
  • the method for prohibiting the application from waking each other is applicable to the mobile terminal, and the method for prohibiting the application from awakening each other includes:
  • step S10 when it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is woken up.
  • the mobile terminal When the mobile terminal detects that the first application is started, the mobile terminal passes the AMS (Android Activity Manager) Service, Android Activity Manager Service) detects if a second application is woken up, ie detects if a second application is launched. Specifically, the user can launch the first application by clicking an icon of the first application in the mobile terminal, or set the first application to be automatically started when the mobile terminal starts.
  • Mobile terminal passes AMS start Process The Locked method detects if the second application's service is pulled up in the background when the first application starts. If the service of the second application is pulled up in the background, it indicates that the second application is woken up; if the service of the second application is not pulled up, it indicates that the second application is not awake.
  • AMS you can manage the progress of applications in your mobile terminal. In this embodiment, there may be one second application, and there may be multiple second applications.
  • Step S20 If the second application is awakened, obtain the identification information of the application running in the foreground, record the first identification information, and obtain the identification information of the second application, and record it as the second identification information.
  • the mobile terminal When the mobile terminal detects that the second application is awakened when the first application is started, the mobile terminal acquires the identification information of the application that is running in the foreground, and records it as the first identification information, and acquires the second application.
  • the identification information is recorded as the second identification information.
  • the start through AMS Process The Locked method may acquire related information of all the awakened second applications in the first application startup in the mobile terminal, where the related information includes the identifier of the second application in addition to the information required for the second application to run. information.
  • the identification information is the package name of the application, and an application can be uniquely determined by the package name, and different applications can be distinguished by the package name.
  • the identification information of the application may also be represented by other information that can distinguish different applications. For example, when the package name of the mobile terminal is running PakageNameB, the PakageNameB is recorded as the first identification information, and the obtained package name of the second application is PakageNameC, and the PakageNameC is recorded as the second identification information.
  • Step S30 If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
  • the mobile terminal When the mobile terminal acquires the first identification information and the second identification information, the first identification information and the second identification information are matched. If the first identification information and the second identification information fail to match, the mobile terminal prohibits the service running of the second application, so that the second application enters the sleep state from the awake state. Specifically, when the package name of the application running in the foreground of the mobile terminal does not match the package name of the second application, that is, when PakageNameB and PakageNameC are different, the mobile terminal prohibits the service operation of the second application.
  • step S30 includes:
  • step a if the matching of the first identifier information and the second identifier information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
  • an application of the mobile terminal is composed of a plurality of components, each component implements a specific function, and some components can enter the application as an entry point of the mobile terminal system, and the components of the application cooperate to form a complete application.
  • An application has 4 different types of components, each with its own unique purpose and life cycle.
  • the four components are: Activities, Services, Content Providers and Broadcast Receivers; an activity represents a window interface that interacts with the user; a service component does not provide an interactive interface, runs in the background, generally runs for a long time or performs remote access; Provider manages a set of shared application data; Broadcast Receivers are used to respond to system level broadcast notifications, including but not limited to screen shutdown, low battery and photo taking.
  • the method for prohibiting applications from awakening each other further includes:
  • Step b Determine whether the first identification information and the second identification information match successfully.
  • Step c If the first identification information and the second identification information are successfully matched, the service of the second application is allowed to run.
  • the mobile terminal When the mobile terminal acquires the first identifier information and the second identifier information, the mobile terminal matches the first identifier information and the second identifier information, and determines whether the first identifier information and the second identifier information match successfully. If the first identifier information and the second identifier information are consistent, the first identifier information and the second identifier information are successfully matched; if the first identifier information and the second identifier information are inconsistent, the first identifier information and the second identifier information are matched. failure.
  • the mobile terminal allows the service of the second application to run. It can be understood that, in this embodiment, when the first identification information and the second identification information are successfully matched, it indicates that the second application is an application that is running in the foreground of the mobile terminal.
  • the AMS when detecting that the first application is started, it is detected by the AMS whether a second application is awakened; if the second application is awakened, acquiring identification information of the application running in the foreground is recorded as The first identification information, and the identification information of the second application is recorded as the second identification information; if the matching of the first identification information and the second identification information fails, the second application is prohibited
  • the service is running.
  • the application in the mobile terminal is started, if the application that is awake is detected by the AMS, and the awake application is not the application running in the foreground of the mobile terminal, the application that is awake is prohibited.
  • the service is running. In the process of prohibiting application mutual wake-up, it does not need a lot of data collection and data analysis, which improves the efficiency of prohibiting applications from waking each other and reduces the cost of prohibiting applications from awakening each other.
  • step S30 includes:
  • Step S31 If the first identifier information and the second identifier information fail to match, obtain the authorization information of the second application.
  • Step S32 Determine, according to the authorization information, whether the second application has running permission.
  • the mobile terminal acquires the authorization information of the second application, and determines whether the second application has the running permission according to the obtained authorization information.
  • the authorization information may be represented by a specific character. Specifically, the specific character may be associated with the package name of the second application, and the authorization of the second application is obtained by the package name of the second application. information. If the authorization information is represented by the character “0” and the character “1”, when the character corresponding to the authorization information is “0”, it indicates that the second application is authorized; for example, when the character corresponding to the authorization information is “1”, Indicates that the second application is not authorized.
  • the second application if the second application is authorized, it indicates that when the first application is started, the second application is allowed to be woken up, that is, the second application has running permission; if the second application is used; If the program is not authorized, it indicates that when the first application is started, the second application is prohibited from being woken up, that is, the second application does not have the running program.
  • the authorization information of the second application may be preset by the user, and the user may decide whether to wake up the second application when the first application is started according to specific needs. Specifically, a mapping relationship between the first application and the second application authorization information is established, and the authorization information of the second application is obtained by using the mapping relationship. In the mapping relationship, the package name of the first application is stored in association with the package name of the second application, and the package name of the second application is found by the package name of the first application, and the second application package name is determined by the second application package name. Authorization information for the second application.
  • Step S33 If it is determined that the second application does not have the running permission according to the authorization information, prohibiting the service running of the second application.
  • Step S34 If it is determined that the second application has running permission according to the authorization information, allowing the service of the second application to run.
  • the mobile terminal prohibits the service running of the second application. If it is determined according to the authorization information that the second application does not have the running permission, the mobile terminal prohibits the service running of the second application. If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
  • the user can wake up the second application when the first application is started according to specific needs, instead of prohibiting any second application from being woken up when the first application is started, thereby improving the prohibition of the application by the mobile terminal.
  • the intelligence of the mutual wake-up process is implemented.
  • step S34 includes:
  • Step S341 if it is determined that the second application has running permission according to the authorization information, determine whether the service that the second application is running has running permission.
  • the mobile terminal determines whether the service running by the second application has running permission. Specifically, the mobile terminal may determine, according to the service authority corresponding to the service that the second application is running, whether the service that the second application is running has running permission. It should be noted that the service authority corresponding to the service in the second application may be preset. If a service in the second application has a service right, it indicates that the service has a running right; if a service in the second application does not have a service right, it indicates that the service does not have a running right.
  • the service authority of the second application service may be represented by a specific character, and the character representing the service authority may be stored in association with the identification information of the second application, so as to determine the service authority of the second application to run the service. If the "00" character is used to indicate that the service of the second application does not have a service right, the "11" character is used to indicate that the service of the second application has a service right.
  • the service identifier of the second application may be added to the character representing the service authority to distinguish the service rights of the different services.
  • Step S342 if the running service of the second application is running, the service running by the second application is allowed to run.
  • Step S343 If the running service of the second application is not running, the running of the service that the second application is running is prohibited.
  • the mobile terminal allows the service running by the second application to run; if the running service of the second application is not running, the mobile terminal prohibits the second application from being The running service is running.
  • the running permission of the running service of the second application determines whether to prohibit the running of the service running by the second application, thereby prohibiting the application from awakening each other.
  • the specific service of the second application is used as a prohibited unit, that is, during the startup process of the first application, only part of the service of the second application that is awake can be disabled, and the process of prohibiting the application from awakening each other by the mobile terminal is improved. Intelligence in the middle.
  • the method for prohibiting the application from waking each other to each other is different from the first, second, and/or third embodiments of the method for prohibiting the application from awakening each other.
  • the method for prohibiting the application from awakening each other further includes :
  • Step S40 Add the second identification information to the disabled list corresponding to the first application.
  • the mobile terminal After the service of the second application is prohibited from running, the mobile terminal adds the second identification information of the second application to the disabled list corresponding to the first application. It can be understood that, when the first application is started, the mobile terminal prohibits the second application corresponding to the second identification information in the first application disable list from being woken up.
  • the mobile terminal may use the second identifier corresponding to the second application according to the operation instruction triggered by the user. The information is moved out of the disabled list to wake up the second application when the first application is launched.
  • the identification information of the second application that is prohibited from being run is added to the disabled list of the first application, so that when the subsequent first application is started, the second application corresponding to the identification information in the disabled list is prohibited from being activated.
  • the program improves the efficiency of prohibiting the second application from being launched when the first application is launched.
  • the embodiment of the present invention further provides a computer readable storage medium, where the program for prohibiting application programs from waking up each other is stored on the computer readable storage medium, and the program for prohibiting application programs from waking each other is executed by the processor as follows: step:
  • the Android Activity Manager service AMS When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
  • the second application If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
  • the step of disabling the service operation of the second application includes:
  • the service running of the second application is prohibited.
  • the program for prohibiting the application from waking each other by the processor is implemented as follows:
  • the service of the second application is allowed to run.
  • the step of allowing the service of the second application to run includes:
  • the service that the second application is running has running permission, the service that the second application is running is allowed to run.
  • the program for prohibiting the application from waking each other is executed by the processor to implement the following steps:
  • the step of disabling the service operation of the second application includes:
  • the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
  • the program that prohibits the application from waking each other is executed by the processor. The following steps are implemented:
  • the embodiments of the computer readable storage medium of the present invention are basically the same as the foregoing methods for prohibiting the application from awakening each other, and are not described herein again.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

Disclosed is an apparatus and a readable storage medium for blocking app-to-app wake-up, the method comprising the steps of: upon detecting that a first application is activated, detecting, via AMS (Activity Manager Service in Android), whether a second application is woken up (S10); if the second application is woken up, acquiring identification information of an application running in foreground and marking the same as first identification information; acquiring identification information of the second application and marking the same as second identification information (S20); and if the first identification information and the second identification information do not match, blocking services of the second application from running (S30). The method can be used to realize blocking of app-to-app wake-up processes without requiring collection of a large amount of data and data analysis, thereby increasing the efficiency of blocking app-to-app wake-up and lowering the cost of blocking the same.

Description

禁止应用程序相互唤醒的方法、设备以及可读存储介质  Method, device, and readable storage medium that prohibit applications from waking each other
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种禁止应用程序相互唤醒的方法、设备以及可读存储介质。The present invention relates to the field of communications technologies, and in particular, to a method, a device, and a readable storage medium for prohibiting application programs from awakening each other.
背景技术Background technique
同一厂商开发的应用程序或者关联厂商开发的应用程序,会出现相互唤醒的情况。当其中一个应用程序启动时,另一个或者多个应用程序也会被启动。如当启动百度手机助手时,之前没有启动的百度地图和百度浏览器也被会启动,百度地图和百度浏览器的服务也会被拉起,从而造成终端内存占用增大,终端系统运行处理速度降低,增大终端的耗电量等后果。Applications developed by the same manufacturer or applications developed by related vendors may wake up each other. When one of the applications starts, another or multiple applications are also launched. For example, when Baidu Mobile Assistant is launched, Baidu Maps and Baidu Browsers that have not been started before will also be launched. Baidu Maps and Baidu Browser services will also be pulled up, resulting in increased memory usage of the terminal and processing speed of the terminal system. Reduce, increase the power consumption of the terminal and other consequences.
目前所用的禁止应用程序相互唤醒的方法一般是通过大数据技术收集国内常用的应用程序中,相互唤醒频率较高的相关应用程序,然后静止这些应用程序在其它应用程序启动时被唤醒。这种方法需要大数据技术的支持,需要进行大量的数据收集,然后通过数据分析查找出相互唤醒的应用程序。然而随着终端技术的发展,市场上的应用程序的种类不断增加,因此需要不断进行数据收集和数据分析,才能准确禁止应用程序相互唤醒。由此可知,现有的禁止应用程序相互唤醒的方法成本高,效率低。The currently used methods for prohibiting applications from waking each other are generally to collect related applications that are frequently awake from each other in the commonly used applications in the country through big data technology, and then these applications are still awakened when other applications are started. This approach requires the support of big data technology, requires a large amount of data collection, and then through data analysis to find applications that wake each other. However, with the development of terminal technologies, the types of applications on the market continue to increase, so data collection and data analysis are required to accurately prohibit applications from awakening each other. It can be seen that the existing methods for prohibiting applications from awakening each other are costly and inefficient.
发明内容Summary of the invention
本发明的主要目的在于提供一种禁止应用程序相互唤醒的方法、设备以及可读存储介质,旨在解决现有的禁止应用程序相互唤醒的方法成本高,效率低的技术问题。The main object of the present invention is to provide a method, a device, and a readable storage medium for prohibiting application programs from awakening each other, and to solve the technical problem of high cost and low efficiency of the existing method for prohibiting application mutual wake-up.
为实现上述目的,本发明提供一种禁止应用程序相互唤醒的方法,所述禁止应用程序相互唤醒的方法包括步骤:To achieve the above object, the present invention provides a method for prohibiting applications from waking up each other, and the method for prohibiting applications from waking each other includes the steps of:
当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒;When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
优选地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Preferably, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application comprises:
若所述第一标识信息与所述第二标识信息匹配失败,则获取所述第二应用程序的授权信息;And if the matching of the first identifier information and the second identifier information fails, acquiring authorization information of the second application;
根据所述授权信息判断所述第二应用程序是否存在运行权限;Determining, according to the authorization information, whether the second application has a running permission;
若根据所述授权信息确定所述第二应用程序未存在运行权限,则禁止所述第二应用程序的服务运行。If it is determined that the second application does not have the running permission according to the authorization information, the service running of the second application is prohibited.
优选地,所述根据所述授权信息判断所述第二应用程序是否存在运行权限的步骤之后,还包括Preferably, after the step of determining, according to the authorization information, whether the second application has a running right, the method further includes
若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行。 If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
优选地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行的步骤包括:Preferably, if the determining that the second application has running permission according to the authorization information, the step of allowing the service of the second application to run includes:
若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限;If it is determined that the second application has a running permission according to the authorization information, determining whether the service that the second application is running has a running permission;
若所述第二应用程序正在运行的服务存在运行权限,则允许所述第二应用程序正在运行的服务运行。 If the service that the second application is running has running permission, the service that the second application is running is allowed to run.
优选地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限的步骤之后,还包括:Preferably, if the determining that the second application has a running right according to the authorization information, determining whether the service running by the second application has a running right, the method further includes:
若所述第二应用程序正在运行的服务未存在运行权限,则禁止所述第二应用程序正在运行的服务运行。 If the running service of the second application is not running, the running of the service running by the second application is prohibited.
优选地,所述若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息的步骤之后,还包括:Preferably, if the second application is awakened, acquiring identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identifier After the steps of the information, it also includes:
判断所述第一标识信息和所述第二标识信息是否匹配成功;Determining whether the first identification information and the second identification information are successfully matched;
若所述第一标识信息和所述第二标识信息匹配成功,则允许所述第二应用程序的服务运行。 If the first identification information and the second identification information match successfully, the service of the second application is allowed to run.
优选地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Preferably, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application comprises:
若所述第一标识信息与所述第二标识信息匹配失败,则禁用所述第二应用程序的应用组件,和/或杀死所述第二应用程序服务对应的进程。 If the matching of the first identification information and the second identification information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
优选地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤之后,还包括:Preferably, after the step of disabling the service of the second application by the first identification information and the second identification information, the method further includes:
将所述第二标识信息添加至所述第一应用程序对应的禁用列表中。Adding the second identification information to the disabled list corresponding to the first application.
此外,为实现上述目的,本发明还提供一种禁止应用程序相互唤醒的设备,所述禁止应用程序相互唤醒的设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的禁止应用程序相互唤醒的程序,所述禁止应用程序相互唤醒的程序被所述处理器执行时实现如上所述的禁止应用程序相互唤醒的方法的步骤。In addition, in order to achieve the above object, the present invention also provides an apparatus for prohibiting applications from waking each other, the apparatus for prohibiting applications from waking each other, including a memory, a processor, and a memory stored on the processor and on the processor A running program that prohibits applications from waking each other, and the program for prohibiting application wake-ups from each other is executed by the processor to implement the steps of the method of prohibiting the application from awakening each other as described above.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有禁止应用程序相互唤醒的程序,所述禁止应用程序相互唤醒的程序被处理器执行时实现如上所述的禁止应用程序相互唤醒的方法的步骤。In addition, in order to achieve the above object, the present invention further provides a computer readable storage medium having stored thereon a program for prohibiting application programs from waking each other, and the program for prohibiting application programs from waking each other is executed by a processor. The steps of the method of prohibiting application wake-ups from each other as described above are implemented.
本发明通过当侦测到第一应用程序启动时,通过AMS检测是否有第二应用程序被唤醒;若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。实现了在启动移动终端中某个应用程序时,若通过AMS检测到存在被唤醒的应用程序,且该被唤醒的应用程序不是移动终端前台运行的应用程序时,则禁止被唤醒的应用程序的服务运行。在禁止应用程序相互唤醒过程中,不需要进行大量的数据收集和数据分析,提高了禁止应用程序相互唤醒的效率,以及降低了禁止应用程序相互唤醒的成本。The invention detects whether a second application is awakened by the AMS when detecting that the first application is started; if the second application is awakened, acquiring the identification information of the application running in the foreground, recorded as the first An identification information, and the identification information of the second application is recorded as the second identification information; if the matching of the first identification information and the second identification information fails, the service of the second application is prohibited run. When the application in the mobile terminal is started, if the application that is awake is detected by the AMS, and the awake application is not the application running in the foreground of the mobile terminal, the application that is awake is prohibited. The service is running. In the process of prohibiting application mutual wake-up, it does not need a lot of data collection and data analysis, which improves the efficiency of prohibiting applications from waking each other and reduces the cost of prohibiting applications from awakening each other.
附图说明DRAWINGS
图1是本发明实施例方案涉及的硬件运行环境的结构示意图; 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present invention;
图2为本发明禁止应用程序相互唤醒的方法第一实施例的流程示意图;2 is a schematic flowchart of a first embodiment of a method for prohibiting applications from awakening each other according to the present invention;
图3为本发明实施例中若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的一种流程示意图;3 is a schematic flowchart of disabling service operation of the second application program if the first identifier information and the second identifier information fail to match in the embodiment of the present invention;
图4为本发明实施例中若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行的一种流程示意图;FIG. 4 is a schematic flowchart of allowing the service of the second application to run according to the authorization information, if the second application has the running permission according to the authorization information;
图5为本发明禁止应用程序相互唤醒的方法第四实施例的流程示意图。FIG. 5 is a schematic flowchart diagram of a fourth embodiment of a method for prohibiting application programs from awakening each other according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例的解决方案主要是:当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒;若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。以解决现有的禁止应用程序相互唤醒的方法成本高,效率低的问题。The solution of the embodiment of the present invention is mainly: when detecting that the first application is started, detecting whether a second application is awakened by the Android Activity Manager service AMS; if the second application is awakened, acquiring The identification information of the application running in the foreground is recorded as the first identification information, and the identification information of the second application is obtained as the second identification information; if the first identification information matches the second identification information If it fails, the service running of the second application is prohibited. To solve the problem of high cost and low efficiency in the existing method of prohibiting applications from awakening each other.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的结构示意图。As shown in FIG. 1, FIG. 1 is a schematic structural diagram of a hardware operating environment involved in an embodiment of the present invention.
需要说明的是,图1即可为禁止应用程序相互唤醒的设备的硬件运行环境的结构示意图。本发明实施例禁止应用程序相互唤醒的设备可以是PC,智能手机,便携计算机等终端设备。It should be noted that FIG. 1 may be a schematic structural diagram of a hardware operating environment of a device that prohibits applications from waking each other. The device for prohibiting the application from waking up to each other in the embodiment of the present invention may be a terminal device such as a PC, a smart phone, or a portable computer.
如图1所示,该禁止应用程序相互唤醒的设备可以包括:处理器1001,例如CPU,网络接口1004,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1, the device for prohibiting applications from waking up each other may include: a processor 1001, such as a CPU, a network interface 1004, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to implement connection communication between these components. The user interface 1003 can include a display, an input unit such as a keyboard, and the optional user interface 1003 can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface). The memory 1005 may be a high speed RAM memory or a stable memory (non-volatile) Memory), such as disk storage. The memory 1005 can also optionally be a storage device independent of the aforementioned processor 1001.
可选地,禁止应用程序相互唤醒的设备还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。Optionally, the device that prohibits the application from waking each other may also include a camera, RF (Radio) Frequency, RF) circuits, sensors, audio circuits, WiFi modules, and more.
本领域技术人员可以理解,图1中示出的禁止应用程序相互唤醒的设备结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It will be understood by those skilled in the art that the device structure shown in FIG. 1 for prohibiting applications from waking up to each other does not constitute a limitation of the terminal, and may include more or less components than those illustrated, or combine some components, or different. Parts layout.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统以及禁止应用程序相互唤醒的程序。其中,操作系统是管理和控制禁止应用程序相互唤醒的设备硬件和软件资源的程序,支持禁止应用程序相互唤醒的程序以及其它软件或程序的运行。As shown in FIG. 1, a memory 1005 as a computer storage medium may include an operating system and a program for prohibiting applications from waking each other. Among them, the operating system is a program that manages and controls device hardware and software resources that prohibit applications from waking each other, and supports programs that prohibit applications from waking each other and other software or programs.
在图1所示的禁止应用程序相互唤醒的设备中,用户接口1003可用于接收用户的操作指令,启动应用程序和将第二标识信息添加至第一应用程序对应的禁用列表中;网络接口1004主要用于接入网络,进行数据连接等;而处理器1001可以用于调用存储器1005中存储的禁止应用程序相互唤醒的程序,并执行以下操作:In the device shown in FIG. 1 for prohibiting applications from waking each other, the user interface 1003 is configured to receive an operation instruction of the user, start the application, and add the second identification information to the disabled list corresponding to the first application; the network interface 1004 It is mainly used to access the network, perform data connection, etc.; and the processor 1001 can be used to call a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following operations:
当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒;When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Further, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application includes:
若所述第一标识信息与所述第二标识信息匹配失败,则获取所述第二应用程序的授权信息;And if the matching of the first identifier information and the second identifier information fails, acquiring authorization information of the second application;
根据所述授权信息判断所述第二应用程序是否存在运行权限;Determining, according to the authorization information, whether the second application has a running permission;
若根据所述授权信息确定所述第二应用程序未存在运行权限,则禁止所述第二应用程序的服务运行。If it is determined that the second application does not have the running permission according to the authorization information, the service running of the second application is prohibited.
进一步地,所述根据所述授权信息判断所述第二应用程序是否存在运行权限的步骤之后,处理器1001还可以用于调用存储器1005中存储的禁止应用程序相互唤醒的程序,并执行以下步骤:Further, after the step of determining, according to the authorization information, whether the second application has a running right, the processor 1001 may further be configured to invoke a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following steps. :
若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行。If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
进一步地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行的步骤包括:Further, if it is determined that the second application has running permission according to the authorization information, the step of allowing the service of the second application to run includes:
若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限;If it is determined that the second application has a running permission according to the authorization information, determining whether the service that the second application is running has a running permission;
若所述第二应用程序正在运行的服务存在运行权限,则允许所述第二应用程序正在运行的服务运行。If the service that the second application is running has running permission, the service that the second application is running is allowed to run.
进一步地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限的步骤之后,处理器1001还可以用于调用存储器1005中存储的禁止应用程序相互唤醒的程序,并执行以下步骤:Further, if it is determined that the second application has a running right according to the authorization information, the processor 1001 may further be used to call after determining whether the service running by the second application has a running right. A program stored in the memory 1005 that prohibits applications from waking each other and performs the following steps:
若所述第二应用程序正在运行的服务未存在运行权限,则禁止所述第二应用程序正在运行的服务运行。If the running service of the second application is not running, the running of the service running by the second application is prohibited.
进一步地,所述若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息的步骤之后,处理器1001还可以用于调用存储器1005中存储的禁止应用程序相互唤醒的程序,并执行以下步骤:Further, if the second application is awakened, acquiring identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identifier After the step of information, the processor 1001 can also be used to call a program stored in the memory 1005 that prohibits applications from waking each other, and performs the following steps:
判断所述第一标识信息和所述第二标识信息是否匹配成功;Determining whether the first identification information and the second identification information are successfully matched;
若所述第一标识信息和所述第二标识信息匹配成功,则允许所述第二应用程序的服务运行。If the first identification information and the second identification information match successfully, the service of the second application is allowed to run.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Further, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application includes:
若所述第一标识信息与所述第二标识信息匹配失败,则禁用所述第二应用程序的应用组件,和/或杀死所述第二应用程序服务对应的进程。If the matching of the first identification information and the second identification information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤之后,处理器1001还可以用于调用存储器1005中存储的禁止应用程序相互唤醒的程序,并执行以下步骤:Further, after the step of disabling the service of the second application is disabled, the processor 1001 may further be configured to invoke the storage in the memory 1005. Programs that prohibit applications from waking each other and perform the following steps:
将所述第二标识信息添加至所述第一应用程序对应的禁用列表中。Adding the second identification information to the disabled list corresponding to the first application.
基于上述的硬件结构,提出禁止应用程序相互唤醒的方法的各个实施例。Based on the above-described hardware structure, various embodiments of a method of prohibiting applications from awakening each other are proposed.
参照图2,图2为本发明禁止应用程序相互唤醒的方法第一实施例的流程示意图。Referring to FIG. 2, FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for prohibiting application programs from awakening each other according to the present invention.
在本实施例中,提供了禁止应用程序相互唤醒的方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。In this embodiment, an embodiment of a method for prohibiting applications from waking each other is provided. It should be noted that although the logical order is shown in the flowchart, in some cases, it may be different from the order here. Perform the steps shown or described.
在本实施例中,禁止应用程序相互唤醒的方法可选应用于移动终端中,所述禁止应用程序相互唤醒的方法包括:In this embodiment, the method for prohibiting the application from waking each other is applicable to the mobile terminal, and the method for prohibiting the application from awakening each other includes:
步骤S10,当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒。In step S10, when it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is woken up.
当移动终端侦测到第一应用程序启动时,移动终端通过AMS(Android Activity Manager Service,安卓活动管理器服务)检测是否有第二应用程序被唤醒,即检测是否有第二应用程序启动。具体地,用户可通过点击移动终端中第一应用程序的图标以启动第一应用程序,或者将该第一应用程序设置为在移动终端启动时自动启动。移动终端通过AMS的start Process Locked方法检测第一应用程序启动时,是否有第二应用程序的服务在后台被拉起。若有第二应用程序的服务在后台被拉起,则表明第二应用程序被唤醒;若没有第二应用程序的服务被拉起,则表明第二应用程序未被唤醒。通过AMS,可以管理移动终端中应用程序的进程。在本实施例中,可能存在一个第二应用程序,也可能存在多个第二应用程序。When the mobile terminal detects that the first application is started, the mobile terminal passes the AMS (Android Activity Manager) Service, Android Activity Manager Service) detects if a second application is woken up, ie detects if a second application is launched. Specifically, the user can launch the first application by clicking an icon of the first application in the mobile terminal, or set the first application to be automatically started when the mobile terminal starts. Mobile terminal passes AMS start Process The Locked method detects if the second application's service is pulled up in the background when the first application starts. If the service of the second application is pulled up in the background, it indicates that the second application is woken up; if the service of the second application is not pulled up, it indicates that the second application is not awake. With AMS, you can manage the progress of applications in your mobile terminal. In this embodiment, there may be one second application, and there may be multiple second applications.
步骤S20,若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息。Step S20: If the second application is awakened, obtain the identification information of the application running in the foreground, record the first identification information, and obtain the identification information of the second application, and record it as the second identification information.
当移动终端检测到在启动第一应用程序时,有第二应用程序被唤醒,移动终端则获取其前台正在运行的应用程序的标识信息,并记为第一标识信息,以及获取第二应用程序的标识信息,记为第二标识信息。需要说明的是,通过AMS的start Process Locked方法可以获取移动终端中在第一应用程序启动中,所有被唤醒的第二应用程序的相关信息,该相关信息除了第二应用程序运行所需的信息外,还包括第二应用程序的标识信息。在本实施例中,标识信息为应用程序的包名,通过包名可以唯一确定一个应用程序,通过包名可区分不同的应用程序。在其它实施例中,应用程序的标识信息也可以其它可以区分出不同应用程序的信息表示。如当获取到移动终端前台正在运行的包名为PakageNameB,则将PakageNameB记为第一标识信息,获取的第二应用程序的包名为PakageNameC,则将PakageNameC记为第二标识信息。When the mobile terminal detects that the second application is awakened when the first application is started, the mobile terminal acquires the identification information of the application that is running in the foreground, and records it as the first identification information, and acquires the second application. The identification information is recorded as the second identification information. It should be noted that the start through AMS Process The Locked method may acquire related information of all the awakened second applications in the first application startup in the mobile terminal, where the related information includes the identifier of the second application in addition to the information required for the second application to run. information. In this embodiment, the identification information is the package name of the application, and an application can be uniquely determined by the package name, and different applications can be distinguished by the package name. In other embodiments, the identification information of the application may also be represented by other information that can distinguish different applications. For example, when the package name of the mobile terminal is running PakageNameB, the PakageNameB is recorded as the first identification information, and the obtained package name of the second application is PakageNameC, and the PakageNameC is recorded as the second identification information.
步骤S30,若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。Step S30: If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
当移动终端获取到第一标识信息和第二标识信息,将第一标识信息和第二标识信息进行匹配。若第一标识信息和第二标识信息匹配失败,移动终端则禁止第二应用程序的服务运行,以使第二应用程序从唤醒状态进入休眠状态。具体地,当移动终端前台运行的应用程序的包名和第二应用程序的包名不一致时,即PakageNameB和PakageNameC不同时,移动终端禁止第二应用程序的服务运行。When the mobile terminal acquires the first identification information and the second identification information, the first identification information and the second identification information are matched. If the first identification information and the second identification information fail to match, the mobile terminal prohibits the service running of the second application, so that the second application enters the sleep state from the awake state. Specifically, when the package name of the application running in the foreground of the mobile terminal does not match the package name of the second application, that is, when PakageNameB and PakageNameC are different, the mobile terminal prohibits the service operation of the second application.
进一步地,步骤S30包括:Further, step S30 includes:
步骤a,若所述第一标识信息与所述第二标识信息匹配失败,则禁用所述第二应用程序的应用组件,和/或杀死所述第二应用程序服务对应的进程。In step a, if the matching of the first identifier information and the second identifier information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
若第一标识信息与第二标识信息匹配失败,移动终端则禁用第二应用程序的应用组件,和/或杀死第二应用程序服务对应的进程,以禁止第二应用程序服务的运行。其中,移动终端的一个应用程序由多个组件组成,每个组件实现特定的功能,有的组件可以作为移动终端系统进入应用程序的入口点,应用程序的各个组件协同合作,共同组成一个完整的应用程序。一个应用程序有4种不同类型的组件,每种组件有其独特的使用目的和生命周期。这4种组件分别为:Activities,Services,Content Providers和Broadcast receivers;一个activity表示一个同用户交互的窗口界面;一个service组件不提供交互界面,在后台运行,一般长期运行或者进行远程访问;一个content provider管理一组共享的应用数据;Broadcast receivers用于对系统级的广播通知作出响应,系统级的广播通知包括但不限于屏幕关闭,电量偏低和拍照。If the first identification information fails to match the second identification information, the mobile terminal disables the application component of the second application, and/or kills the process corresponding to the second application service to prohibit the operation of the second application service. Wherein, an application of the mobile terminal is composed of a plurality of components, each component implements a specific function, and some components can enter the application as an entry point of the mobile terminal system, and the components of the application cooperate to form a complete application. An application has 4 different types of components, each with its own unique purpose and life cycle. The four components are: Activities, Services, Content Providers and Broadcast Receivers; an activity represents a window interface that interacts with the user; a service component does not provide an interactive interface, runs in the background, generally runs for a long time or performs remote access; Provider manages a set of shared application data; Broadcast Receivers are used to respond to system level broadcast notifications, including but not limited to screen shutdown, low battery and photo taking.
进一步地,禁止应用程序相互唤醒的方法还包括:Further, the method for prohibiting applications from awakening each other further includes:
步骤b,判断所述第一标识信息和所述第二标识信息是否匹配成功。Step b: Determine whether the first identification information and the second identification information match successfully.
步骤c,若所述第一标识信息和所述第二标识信息匹配成功,则允许所述第二应用程序的服务运行。Step c: If the first identification information and the second identification information are successfully matched, the service of the second application is allowed to run.
当移动终端获取到第一标识信息和第二标识信息时,移动终端将第一标识信息和第二标识信息进行匹配,判断第一标识信息和第二标识信息是否匹配成功。若第一标识信息和第二标识信息一致,则表示第一标识信息和第二标识信息匹配成功;若第一标识信息和第二标识信息不一致,则表示第一标识信息和第二标识信息匹配失败。When the mobile terminal acquires the first identifier information and the second identifier information, the mobile terminal matches the first identifier information and the second identifier information, and determines whether the first identifier information and the second identifier information match successfully. If the first identifier information and the second identifier information are consistent, the first identifier information and the second identifier information are successfully matched; if the first identifier information and the second identifier information are inconsistent, the first identifier information and the second identifier information are matched. failure.
当第一标识信息和第二标识信息匹配成功时,移动终端允许第二应用程序的服务运行。可以理解的是,在本实施例中,当第一标识信息和第二标识信息匹配成功时,表明第二应用程序为移动终端前台正在运行的应用程序。When the first identification information and the second identification information match successfully, the mobile terminal allows the service of the second application to run. It can be understood that, in this embodiment, when the first identification information and the second identification information are successfully matched, it indicates that the second application is an application that is running in the foreground of the mobile terminal.
本实施例通过当侦测到第一应用程序启动时,通过AMS检测是否有第二应用程序被唤醒;若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。实现了在启动移动终端中某个应用程序时,若通过AMS检测到存在被唤醒的应用程序,且该被唤醒的应用程序不是移动终端前台运行的应用程序时,则禁止被唤醒的应用程序的服务运行。在禁止应用程序相互唤醒过程中,不需要进行大量的数据收集和数据分析,提高了禁止应用程序相互唤醒的效率,以及降低了禁止应用程序相互唤醒的成本。In this embodiment, when detecting that the first application is started, it is detected by the AMS whether a second application is awakened; if the second application is awakened, acquiring identification information of the application running in the foreground is recorded as The first identification information, and the identification information of the second application is recorded as the second identification information; if the matching of the first identification information and the second identification information fails, the second application is prohibited The service is running. When the application in the mobile terminal is started, if the application that is awake is detected by the AMS, and the awake application is not the application running in the foreground of the mobile terminal, the application that is awake is prohibited. The service is running. In the process of prohibiting application mutual wake-up, it does not need a lot of data collection and data analysis, which improves the efficiency of prohibiting applications from waking each other and reduces the cost of prohibiting applications from awakening each other.
进一步地,提出本发明禁止应用程序相互唤醒的方法第二实施例。Further, a second embodiment of the method for prohibiting application wake-ups from each other is proposed.
所述禁止应用程序相互唤醒的方法第二实施例与所述禁止应用程序相互唤醒的方法第一实施例的区别在于,参照图3,步骤S30包括:The method for prohibiting the application from waking each other to each other is different from the first embodiment of the method for prohibiting the application from waking up each other. Referring to FIG. 3, step S30 includes:
步骤S31,若所述第一标识信息与所述第二标识信息匹配失败,则获取所述第二应用程序的授权信息。Step S31: If the first identifier information and the second identifier information fail to match, obtain the authorization information of the second application.
步骤S32,根据所述授权信息判断所述第二应用程序是否存在运行权限。Step S32: Determine, according to the authorization information, whether the second application has running permission.
当第一标识信息和第二标识信息匹配失败时,移动终端获取第二应用程序的授权信息,根据所获取的授权信息判断第二应用程序是否存在运行权限。在本实施例中,授权信息可通过特定的字符来表示,具体地,可将该特定字符与第二应用程序的包名相关联,通过第二应用程序的包名获取第二应用程序的授权信息。如可将授权信息用字符“0”和字符“1”表示,当授权信息对应的字符为“0”时,表示第二应用程序已授权;如当授权信息对应的字符为“1”时,表示第二应用程序未被授权。需要说明的是,在本实施例中,若第二应用程序已授权,则表明当第一应用程序启动时,允许第二应用程序被唤醒,即第二应用程序存在运行权限;若第二应用程序未被授权,则表明当第一应用程序启动时,禁止第二应用程序被唤醒,即第二应用程序未存在运行程序。When the first identification information and the second identification information fail to match, the mobile terminal acquires the authorization information of the second application, and determines whether the second application has the running permission according to the obtained authorization information. In this embodiment, the authorization information may be represented by a specific character. Specifically, the specific character may be associated with the package name of the second application, and the authorization of the second application is obtained by the package name of the second application. information. If the authorization information is represented by the character “0” and the character “1”, when the character corresponding to the authorization information is “0”, it indicates that the second application is authorized; for example, when the character corresponding to the authorization information is “1”, Indicates that the second application is not authorized. It should be noted that, in this embodiment, if the second application is authorized, it indicates that when the first application is started, the second application is allowed to be woken up, that is, the second application has running permission; if the second application is used; If the program is not authorized, it indicates that when the first application is started, the second application is prohibited from being woken up, that is, the second application does not have the running program.
在本实施例中,第二应用程序的授权信息可由用户预先设置,用户可根据具体需要决定在启动第一应用程序时,是否唤醒第二应用程序。具体地,建立第一应用程序和第二应用程序授权信息之间的映射关系,通过该映射关系可获取第二应用程序的授权信息。在映射关系中,第一应用程序的包名与第二应用程序的包名关联存储,通过第一应用程序的包名查找到第二应用程序的包名,通过第二应用程序包名可确定第二应用程序的授权信息。In this embodiment, the authorization information of the second application may be preset by the user, and the user may decide whether to wake up the second application when the first application is started according to specific needs. Specifically, a mapping relationship between the first application and the second application authorization information is established, and the authorization information of the second application is obtained by using the mapping relationship. In the mapping relationship, the package name of the first application is stored in association with the package name of the second application, and the package name of the second application is found by the package name of the first application, and the second application package name is determined by the second application package name. Authorization information for the second application.
步骤S33,若根据所述授权信息确定所述第二应用程序未存在运行权限,则禁止所述第二应用程序的服务运行。Step S33: If it is determined that the second application does not have the running permission according to the authorization information, prohibiting the service running of the second application.
步骤S34,若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行。Step S34: If it is determined that the second application has running permission according to the authorization information, allowing the service of the second application to run.
若根据授权信息确定第二应用程序未存在运行权限,移动终端则禁止第二应用程序的服务运行。若根据授权信息确定第二应用程序存在运行权限,则允许第二应用程序的服务运行。If it is determined according to the authorization information that the second application does not have the running permission, the mobile terminal prohibits the service running of the second application. If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
本实施例通过在第一标识信息和第二标识信息不一致时,进一步根据第二应用程序的授权信息确定在第一应用程序启动时,是否唤醒第二应用程序。实现了可由用户根据具体需要设置在启动第一应用程序时,是否唤醒第二应用程序,而不是在启动第一应用程序时,禁止任何第二应用程序被唤醒,提高了移动终端在禁止应用程序相互唤醒过程中的智能性。In this embodiment, when the first identification information and the second identification information are inconsistent, it is further determined according to the authorization information of the second application whether to wake up the second application when the first application is started. It is implemented that the user can wake up the second application when the first application is started according to specific needs, instead of prohibiting any second application from being woken up when the first application is started, thereby improving the prohibition of the application by the mobile terminal. The intelligence of the mutual wake-up process.
进一步地,提出本发明禁止应用程序相互唤醒的方法第三实施例。Further, a third embodiment of the method of the present invention for prohibiting applications from awakening each other is proposed.
所述禁止应用程序相互唤醒的方法第三实施例与所述禁止应用程序相互唤醒的方法第二实施例的区别在于,参照图4,步骤S34包括:The method for prohibiting the application from waking each other to each other is different from the second embodiment of the method for prohibiting the application from awakening each other. Referring to FIG. 4, step S34 includes:
步骤S341,若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限。Step S341, if it is determined that the second application has running permission according to the authorization information, determine whether the service that the second application is running has running permission.
若根据授权信息确定第二应用程序存在运行权限,移动终端则判断第二应用程序正在运行的服务是否存在运行权限。具体地,移动终端可根据第二应用程序正在运行的服务对应的服务权限判断第二应用程序正在运行的服务是否存在运行权限。需要说明的是,可预先设置第二应用程序中服务对应的服务权限。若第二应用程序中的某个服务存在服务权限,则表明该服务存在运行权限;若第二应用程序中的某个服务不存在服务权限,则表明该服务未存在运行权限。具体地,可通过特定的字符表示第二应用程序服务的服务权限,将表示服务权限的字符与第二应用程序的标识信息关联存储,以便于确定第二应用程序正在运行服务的服务权限。如可用“00”字符表示第二应用程序的服务未存在服务权限,用“11”字符表示第二应用程序的服务存在服务权限。If it is determined according to the authorization information that the second application has running permission, the mobile terminal determines whether the service running by the second application has running permission. Specifically, the mobile terminal may determine, according to the service authority corresponding to the service that the second application is running, whether the service that the second application is running has running permission. It should be noted that the service authority corresponding to the service in the second application may be preset. If a service in the second application has a service right, it indicates that the service has a running right; if a service in the second application does not have a service right, it indicates that the service does not have a running right. Specifically, the service authority of the second application service may be represented by a specific character, and the character representing the service authority may be stored in association with the identification information of the second application, so as to determine the service authority of the second application to run the service. If the "00" character is used to indicate that the service of the second application does not have a service right, the "11" character is used to indicate that the service of the second application has a service right.
进一步地,为了区分第二应用程序不同服务的运行权限,可在表示服务权限的字符中加入第二应用程序的服务标识,以区分不同服务的服务权限。Further, in order to distinguish the running rights of different services of the second application, the service identifier of the second application may be added to the character representing the service authority to distinguish the service rights of the different services.
步骤S342,若所述第二应用程序正在运行的服务存在运行权限,则允许所述第二应用程序正在运行的服务运行。Step S342, if the running service of the second application is running, the service running by the second application is allowed to run.
步骤S343,若所述第二应用程序正在运行的服务未存在运行权限,则禁止所述第二应用程序正在运行的服务运行。Step S343: If the running service of the second application is not running, the running of the service that the second application is running is prohibited.
若第二应用程序正在运行的服务存在运行权限,移动终端则允许第二应用程序正在运行的服务运行;若第二应用程序正在运行的服务未存在运行权限,移动终端则禁止第二应用程序正在运行的服务运行。If the service running by the second application has running permission, the mobile terminal allows the service running by the second application to run; if the running service of the second application is not running, the mobile terminal prohibits the second application from being The running service is running.
本实施例通过在应用程序相互唤醒过程中,根据被唤醒的第二应用程序正在运行服务的运行权限决定是否禁止第二应用程序正在运行的服务运行,从而在禁止应用程序相互唤醒的过程中,以第二应用程序的某个具体服务作为禁止的单位,即在第一应用程序启动过程中,可只禁止被唤醒的第二应用程序的部分服务,提高了移动终端在禁止应用程序相互唤醒过程中的智能性。In this embodiment, during the process of mutual wake-up of the application, according to the running permission of the service that is being awake, the running permission of the running service of the second application determines whether to prohibit the running of the service running by the second application, thereby prohibiting the application from awakening each other. The specific service of the second application is used as a prohibited unit, that is, during the startup process of the first application, only part of the service of the second application that is awake can be disabled, and the process of prohibiting the application from awakening each other by the mobile terminal is improved. Intelligence in the middle.
进一步地,提出本发明禁止应用程序相互唤醒的方法第四实施例。Further, a fourth embodiment of the method of the present invention for prohibiting applications from awakening each other is proposed.
所述禁止应用程序相互唤醒的方法第四实施例与所述禁止应用程序相互唤醒的方法第一、二和/或三实施例的区别在于,参照图5,禁止应用程序相互唤醒的方法还包括:The method for prohibiting the application from waking each other to each other is different from the first, second, and/or third embodiments of the method for prohibiting the application from awakening each other. Referring to FIG. 5, the method for prohibiting the application from awakening each other further includes :
步骤S40,将所述第二标识信息添加至所述第一应用程序对应的禁用列表中。Step S40: Add the second identification information to the disabled list corresponding to the first application.
当第二应用程序的服务被禁止运行后,移动终端将第二应用程序的第二标识信息添加至第一应用程序对应的禁用列表中。可以理解的是,当第一应用程序启动时,移动终端禁止第一应用程序禁用列表中第二标识信息对应的第二应用程序被唤醒。After the service of the second application is prohibited from running, the mobile terminal adds the second identification information of the second application to the disabled list corresponding to the first application. It can be understood that, when the first application is started, the mobile terminal prohibits the second application corresponding to the second identification information in the first application disable list from being woken up.
进一步地,当用户希望在启动第一应用程序时,唤醒标识信息存在禁用列表中的某个第二应用程序时,移动终端可根据用户触发的操作指令将该第二应用程序对应的第二标识信息移出禁用列表,以在启动第一应用程序时,唤醒第二应用程序。Further, when the user wants to wake up the identification information and activate a second application in the disabled list when the first application is started, the mobile terminal may use the second identifier corresponding to the second application according to the operation instruction triggered by the user. The information is moved out of the disabled list to wake up the second application when the first application is launched.
本实施例通过将被禁止运行的第二应用程序的标识信息添加至第一应用程序的禁用列表中,以在后续第一应用程序启动时,禁止启动其禁用列表中标识信息对应的第二应用程序,提高了在启动第一应用程序时,禁止第二应用程序被启动的效率。In this embodiment, the identification information of the second application that is prohibited from being run is added to the disabled list of the first application, so that when the subsequent first application is started, the second application corresponding to the identification information in the disabled list is prohibited from being activated. The program improves the efficiency of prohibiting the second application from being launched when the first application is launched.
此外,本发明实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有禁止应用程序相互唤醒的程序,所述禁止应用程序相互唤醒的程序被处理器执行时实现如下步骤:In addition, the embodiment of the present invention further provides a computer readable storage medium, where the program for prohibiting application programs from waking up each other is stored on the computer readable storage medium, and the program for prohibiting application programs from waking each other is executed by the processor as follows: step:
当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒;When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Further, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application includes:
若所述第一标识信息与所述第二标识信息匹配失败,则获取所述第二应用程序的授权信息;And if the matching of the first identifier information and the second identifier information fails, acquiring authorization information of the second application;
根据所述授权信息判断所述第二应用程序是否存在运行权限;Determining, according to the authorization information, whether the second application has a running permission;
若根据所述授权信息确定所述第二应用程序未存在运行权限,则禁止所述第二应用程序的服务运行。If it is determined that the second application does not have the running permission according to the authorization information, the service running of the second application is prohibited.
进一步地,所述根据所述授权信息判断所述第二应用程序是否存在运行权限的步骤之后,所述禁止应用程序相互唤醒的程序被处理器执行时实现如下步骤:Further, after the step of determining, according to the authorization information, whether the second application has a running right, the program for prohibiting the application from waking each other by the processor is implemented as follows:
若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行。If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
进一步地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行的步骤包括:Further, if it is determined that the second application has running permission according to the authorization information, the step of allowing the service of the second application to run includes:
若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限;If it is determined that the second application has a running permission according to the authorization information, determining whether the service that the second application is running has a running permission;
若所述第二应用程序正在运行的服务存在运行权限,则允许所述第二应用程序正在运行的服务运行。If the service that the second application is running has running permission, the service that the second application is running is allowed to run.
进一步地,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限的步骤之后,所述禁止应用程序相互唤醒的程序被处理器执行时实现如下步骤:Further, if it is determined that the second application has a running permission according to the authorization information, and after determining, by the step of determining whether the service running by the second application has a running right, the prohibiting the application from awakening each other The following steps are implemented when the program is executed by the processor:
若所述第二应用程序正在运行的服务未存在运行权限,则禁止所述第二应用程序正在运行的服务运行。If the running service of the second application is not running, the running of the service running by the second application is prohibited.
进一步地,所述若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息的步骤之后,所述禁止应用程序相互唤醒的程序被处理器执行时实现如下步骤:Further, if the second application is awakened, acquiring identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identifier After the step of information, the program for prohibiting the application from waking each other is executed by the processor to implement the following steps:
判断所述第一标识信息和所述第二标识信息是否匹配成功;Determining whether the first identification information and the second identification information are successfully matched;
若所述第一标识信息和所述第二标识信息匹配成功,则允许所述第二应用程序的服务运行。If the first identification information and the second identification information match successfully, the service of the second application is allowed to run.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:Further, if the matching of the first identifier information and the second identifier information fails, the step of disabling the service operation of the second application includes:
若所述第一标识信息与所述第二标识信息匹配失败,则禁用所述第二应用程序的应用组件,和/或杀死所述第二应用程序服务对应的进程。If the matching of the first identification information and the second identification information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
进一步地,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤之后,所述禁止应用程序相互唤醒的程序被处理器执行时实现如下步骤:Further, after the step of disabling the service of the second application is prohibited if the first identification information fails to match the second identification information, the program that prohibits the application from waking each other is executed by the processor. The following steps are implemented:
将所述第二标识信息添加至所述第一应用程序对应的禁用列表中。Adding the second identification information to the disabled list corresponding to the first application.
本发明计算机可读存储介质具体实施方式与上述禁止应用程序相互唤醒的方法各实施例基本相同,在此不再赘述。The embodiments of the computer readable storage medium of the present invention are basically the same as the foregoing methods for prohibiting the application from awakening each other, and are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (10)

  1. 一种禁止应用程序相互唤醒的方法,其特征在于,所述禁止应用程序相互唤醒的方法包括以下步骤: A method for prohibiting applications from waking each other, wherein the method for prohibiting applications from waking each other includes the following steps:
    当侦测到第一应用程序启动时,通过安卓活动管理器服务AMS检测是否有第二应用程序被唤醒;When it is detected that the first application is started, it is detected by the Android Activity Manager service AMS whether a second application is awakened;
    若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息;If the second application is awakened, obtaining identification information of the application running in the foreground, recording the first identification information, and acquiring the identification information of the second application, and recording the second identification information;
    若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行。If the matching of the first identification information and the second identification information fails, the service operation of the second application is prohibited.
  2. 如权利要求1所述的禁止应用程序相互唤醒的方法,其特征在于,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:The method for prohibiting an application from waking each other according to claim 1, wherein if the matching of the first identification information and the second identification information fails, the service of the second application is prohibited from running. The steps include:
    若所述第一标识信息与所述第二标识信息匹配失败,则获取所述第二应用程序的授权信息;And if the matching of the first identifier information and the second identifier information fails, acquiring authorization information of the second application;
    根据所述授权信息判断所述第二应用程序是否存在运行权限;Determining, according to the authorization information, whether the second application has a running permission;
    若根据所述授权信息确定所述第二应用程序未存在运行权限,则禁止所述第二应用程序的服务运行。If it is determined that the second application does not have the running permission according to the authorization information, the service running of the second application is prohibited.
  3. 如权利要求2所述的禁止应用程序相互唤醒的方法,其特征在于,所述根据所述授权信息判断所述第二应用程序是否存在运行权限的步骤之后,还包括The method for prohibiting an application from waking each other according to claim 2, wherein the step of determining whether the second application has a running right according to the authorization information further includes
    若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行。If it is determined according to the authorization information that the second application has running permission, the service of the second application is allowed to run.
  4. 如权利要求3所述的禁止应用程序相互唤醒的方法,其特征在于,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则允许所述第二应用程序的服务运行的步骤包括:The method for prohibiting an application from waking each other according to claim 3, wherein if the second application has a running permission according to the authorization information, the service of the second application is allowed to run. The steps include:
    若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限;If it is determined that the second application has a running permission according to the authorization information, determining whether the service that the second application is running has a running permission;
    若所述第二应用程序正在运行的服务存在运行权限,则允许所述第二应用程序正在运行的服务运行。If the service that the second application is running has running permission, the service that the second application is running is allowed to run.
  5. 如权利要求4所述的禁止应用程序相互唤醒的方法,其特征在于,所述若根据所述授权信息确定所述第二应用程序存在运行权限,则判断所述第二应用程序正在运行的服务是否存在运行权限的步骤之后,还包括:The method for prohibiting an application from waking each other according to claim 4, wherein if it is determined that the second application has a running right according to the authorization information, determining that the second application is running a service After the step of running permissions, it also includes:
    若所述第二应用程序正在运行的服务未存在运行权限,则禁止所述第二应用程序正在运行的服务运行。If the running service of the second application is not running, the running of the service running by the second application is prohibited.
  6. 如权利要求1所述的禁止应用程序相互唤醒的方法,其特征在于,所述若所述第二应用程序被唤醒,则获取前台运行的应用程序的标识信息,记为第一标识信息,以及获取所述第二应用程序的标识信息,记为第二标识信息的步骤之后,还包括:The method for prohibiting an application from waking up each other according to claim 1, wherein if the second application is awakened, obtaining identification information of an application running in the foreground is recorded as first identification information, and After the step of obtaining the identifier information of the second application, which is recorded as the second identifier information, the method further includes:
    判断所述第一标识信息和所述第二标识信息是否匹配成功;Determining whether the first identification information and the second identification information are successfully matched;
    若所述第一标识信息和所述第二标识信息匹配成功,则允许所述第二应用程序的服务运行。If the first identification information and the second identification information match successfully, the service of the second application is allowed to run.
  7. 如权利要求1所述的禁止应用程序相互唤醒的方法,其特征在于,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤包括:The method for prohibiting an application from waking each other according to claim 1, wherein if the matching of the first identification information and the second identification information fails, the service of the second application is prohibited from running. The steps include:
    若所述第一标识信息与所述第二标识信息匹配失败,则禁用所述第二应用程序的应用组件,和/或杀死所述第二应用程序服务对应的进程。If the matching of the first identification information and the second identification information fails, the application component of the second application is disabled, and/or the process corresponding to the second application service is killed.
  8. 如权利要求1至7任一项所述的禁止应用程序相互唤醒的方法,其特征在于,所述若所述第一标识信息与所述第二标识信息匹配失败,则禁止所述第二应用程序的服务运行的步骤之后,还包括:The method for prohibiting an application from awakening each other according to any one of claims 1 to 7, wherein if the first identification information and the second identification information fail to match, the second application is prohibited. After the steps of the program's service run, it also includes:
    将所述第二标识信息添加至所述第一应用程序对应的禁用列表中。Adding the second identification information to the disabled list corresponding to the first application.
  9. 一种禁止应用程序相互唤醒的设备,其特征在于,所述禁止应用程序相互唤醒的设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的禁止应用程序相互唤醒的程序,所述禁止应用程序相互唤醒的程序被所述处理器执行时实现如权利要求1至8中任一项所述的禁止应用程序相互唤醒的方法的步骤。A device for prohibiting applications from waking each other, wherein the device for prohibiting applications from waking each other includes a memory, a processor, and a forbidden application stored on the memory and operable on the processor to wake each other The program of the method for inhibiting application wake-up from each other as claimed in any one of claims 1 to 8 when the program for prohibiting application wake-up from each other is executed by the processor.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有禁止应用程序相互唤醒的程序,所述禁止应用程序相互唤醒的程序被处理器执行时实现如权利要求1至8中任一项所述的禁止应用程序相互唤醒的方法的步骤。A computer readable storage medium, characterized in that the computer readable storage medium stores a program for prohibiting application programs from waking each other, and the program for prohibiting application wake-up from each other is implemented by the processor as claimed in claim 1 The method of the method of prohibiting an application from awakening each other as set forth in any one of 8.
PCT/CN2017/104497 2017-09-29 2017-09-29 Method, apparatus and readable storage medium for blocking app-to-app wake-up WO2019061331A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/104497 WO2019061331A1 (en) 2017-09-29 2017-09-29 Method, apparatus and readable storage medium for blocking app-to-app wake-up

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/104497 WO2019061331A1 (en) 2017-09-29 2017-09-29 Method, apparatus and readable storage medium for blocking app-to-app wake-up

Publications (1)

Publication Number Publication Date
WO2019061331A1 true WO2019061331A1 (en) 2019-04-04

Family

ID=65900217

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/104497 WO2019061331A1 (en) 2017-09-29 2017-09-29 Method, apparatus and readable storage medium for blocking app-to-app wake-up

Country Status (1)

Country Link
WO (1) WO2019061331A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138372A (en) * 2015-08-27 2015-12-09 上海斐讯数据通信技术有限公司 Backstage service management and control system and method based on Android system
CN106055393A (en) * 2016-05-20 2016-10-26 广东欧珀移动通信有限公司 Application start management method and mobile terminal
CN106155704A (en) * 2016-08-05 2016-11-23 硕诺科技(深圳)有限公司 A kind of method and system stoping application program mutually to wake up up
CN106201574A (en) * 2016-06-22 2016-12-07 广东欧珀移动通信有限公司 A kind of startup method and device of application interface
CN106203075A (en) * 2016-07-19 2016-12-07 北京珠穆朗玛移动通信有限公司 A kind of method and device preventing application program from waking up up mutually

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105138372A (en) * 2015-08-27 2015-12-09 上海斐讯数据通信技术有限公司 Backstage service management and control system and method based on Android system
CN106055393A (en) * 2016-05-20 2016-10-26 广东欧珀移动通信有限公司 Application start management method and mobile terminal
CN106201574A (en) * 2016-06-22 2016-12-07 广东欧珀移动通信有限公司 A kind of startup method and device of application interface
CN106203075A (en) * 2016-07-19 2016-12-07 北京珠穆朗玛移动通信有限公司 A kind of method and device preventing application program from waking up up mutually
CN106155704A (en) * 2016-08-05 2016-11-23 硕诺科技(深圳)有限公司 A kind of method and system stoping application program mutually to wake up up

Similar Documents

Publication Publication Date Title
WO2018082482A1 (en) Network sharing method, and method and system for accessing network
WO2018159971A1 (en) Operating method of electronic device for function execution based on voice command in locked state and electronic device supporting the same
WO2018117354A1 (en) Method for providing content corresponding to accessory and electronic device thereof
WO2015163741A1 (en) User terminal device and lock screen display method therefor
WO2019061612A1 (en) Loan product promotion method and apparatus, and computer-readable storage medium
WO2019061613A1 (en) Loan qualification screening method, device and computer readable storage medium
WO2019037396A1 (en) Account clearing method, device and equipment and storage medium
WO2017054481A1 (en) Information verification and processing method and apparatus, and information processing system
WO2013127233A1 (en) Cellphone-based key unlocking method and cellphone
WO2019104876A1 (en) Insurance product pushing method and system, terminal, client terminal, and storage medium
WO2017052053A1 (en) Apparatus and method for protecting information in communication system
WO2016076638A1 (en) Apparatus and method for payment
WO2018188342A1 (en) Method, apparatus and device for generating script file, and computer-readable storage medium
WO2017054592A1 (en) Interface display method and terminal
WO2018076875A1 (en) Backup data synchronisation method, apparatus, storage medium, electronic device, and server
WO2017034180A1 (en) System for providing application list and method therefor
WO2019024336A1 (en) Data query method and device, and computer readable storage medium
WO2019024219A1 (en) Automatic document generation method and apparatus, automatic document generator and medium
WO2018126888A1 (en) Method and apparatus for configuring a shortcut for a television function
WO2018034491A1 (en) A primary device, an accessory device, and methods for processing operations on the primary device and the accessory device
WO2018201699A1 (en) Customer evaluation method, device, and apparatus, and computer readable storage medium
WO2019143081A1 (en) Method and electronic device for controlling data communication
WO2019085543A1 (en) Television system and television control method
WO2019000800A1 (en) Credential preparation method, apparatus, and device and computer readable storage medium
WO2017024877A1 (en) Method and device for switching television main-interface

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17927713

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17927713

Country of ref document: EP

Kind code of ref document: A1