WO2019057049A1 - 一种简化应用程序注册器的方法、存储介质及电子设备 - Google Patents

一种简化应用程序注册器的方法、存储介质及电子设备 Download PDF

Info

Publication number
WO2019057049A1
WO2019057049A1 PCT/CN2018/106371 CN2018106371W WO2019057049A1 WO 2019057049 A1 WO2019057049 A1 WO 2019057049A1 CN 2018106371 W CN2018106371 W CN 2018106371W WO 2019057049 A1 WO2019057049 A1 WO 2019057049A1
Authority
WO
WIPO (PCT)
Prior art keywords
broadcast
listener
application
registration requests
broadcast listener
Prior art date
Application number
PCT/CN2018/106371
Other languages
English (en)
French (fr)
Inventor
涂斌健
Original Assignee
惠州Tcl移动通信有限公司
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 惠州Tcl移动通信有限公司 filed Critical 惠州Tcl移动通信有限公司
Publication of WO2019057049A1 publication Critical patent/WO2019057049A1/zh

Links

Images

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/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality

Definitions

  • the present invention relates to the field of application registration technologies, and in particular, to a method, a storage medium, and an electronic device for simplifying an application registrar.
  • AMS ActivityManagerService
  • the broadcast resources required by the application during normal operation are completed through the server.
  • the same broadcast component will repeatedly register the broadcast listener with the AMS server, resulting in a long time for the AMS server to initialize too long, a certain number of broadcasts being listened to, and a large number of systems. Resources, system performance is reduced.
  • an object of the present invention is to provide a method, a storage medium and an electronic device for simplifying an application registrar, aiming at solving the problem that the same broadcast component of the application repeatedly registers with the system in the prior art.
  • the listener causes problems with system performance degradation.
  • a method of simplifying an application registrar including the steps of:
  • the method for simplifying an application registrar wherein the step directly registers a broadcast listener when determining that the plurality of broadcast listener registration requests are the same, and the broadcast listener includes multiple monitors for the same broadcast
  • the child listener for the content which later includes:
  • the broadcast listener listens to the broadcast notification, it alternately calls the child listener in the broadcast listener.
  • the broadcast listener specifically includes an off-screen broadcast listener and a telephone incoming broadcast listener.
  • the storage medium wherein a plurality of instructions are stored, the instructions being adapted to be loaded by a processor and executed:
  • the broadcast listener listens to the broadcast notification, it alternately calls the child listener in the broadcast listener.
  • An electronic device comprising a processor adapted to implement instructions; and a memory adapted to store a plurality of instructions adapted to be loaded by a processor and to perform steps of a method of simplifying an application registrar,
  • the method of simplifying the application registrar includes the steps of:
  • the electronic device wherein the step directly registers a broadcast listener when the plurality of broadcast listener registration requests are determined to be the same, and the broadcast listener includes a plurality of child listeners that listen to the same broadcast content. And then include:
  • the broadcast listener listens to the broadcast notification, it alternately calls the child listener in the broadcast listener.
  • the electronic device wherein the broadcast monitor specifically includes a blackout broadcast listener and a telephone incoming broadcast listener.
  • the present invention provides a method for simplifying an application registrar by pre-establishing a virtual listener inside an application; when the virtual listener listens to the application issuing a plurality of broadcast listener registration requests, judging Whether the plurality of broadcast listener registration requests are the same; when it is determined that the plurality of broadcast listener registration requests are the same, a broadcast listener is directly registered.
  • the application is the same broadcast component, and the registration to the system repeatedly causes the system to spend a long time and the system performance is degraded when scheduling the broadcast components of these applications.
  • FIG. 1 is a flow chart of a preferred embodiment of a method for simplifying an application registrar of the present invention.
  • FIG. 2 is a schematic diagram of the relationship between an application and an ActivityManagerService in the prior art on an Android system.
  • FIG. 3 is a schematic diagram showing the relationship between an application and an ActivityManagerService after simplified registration according to the present invention.
  • FIG. 4 is a schematic diagram of a repeating listener in which a broadcast listener registered by a virtual listener in turn calls an internal request of an application.
  • FIG. 5 is a structural block diagram of a preferred embodiment of an electronic device for simplifying an application registrar according to the present invention.
  • the present invention provides a method for simplifying the application registrar, and the present invention will be further described in detail below in order to make the objects, technical solutions and effects of the present invention more clear and clear. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • FIG. 1 is a flowchart of a method for simplifying an application registrar according to a preferred embodiment of the present invention. As shown in FIG. 1, the method for simplifying an application registrar includes the following steps:
  • the present invention provides a method for simplifying an application registrar by pre-establishing a virtual listener inside an application; when the virtual listener listens to the application issuing multiple broadcast listener registration requests Determining whether the plurality of broadcast listener registration requests are the same; when determining that the plurality of broadcast listener registration requests are the same, directly registering a broadcast listener.
  • the method for simplifying the application registrar provided by the invention solves the problem that a large amount of system resources are consumed by registering a plurality of the same broadcast listeners due to the same broadcast component of the application, resulting in system performance degradation.
  • FIG. 2 is a schematic diagram of the relationship between the application and the ActivityManagerService in the prior art on the Android system.
  • App-A, App-B, App-C, App-D register the listener request to the ActivityManagerService (AMS) once Android
  • AMS ActivityManagerService
  • the system issues a broadcast so that the application can receive notifications to complete its own correct logic.
  • the original application due to multi-person collaboration, functional segmentation, application architecture, etc., the original application only needs to register a corresponding broadcast listener with the AMS, and now multiple registrations are repeated.
  • App-A registered 3 listeners (A-1, A-2, A-3) about Screen-off broadcast to AMS, and registered two about Call-in (telephone dial-in) Listener (A-4, A-5);
  • App-B also registered 3 listeners (B-1, B-2, B-3) for Screen-off broadcasts to AMS, Two listeners (B-5, B-6) for Call-in (phone dial-in) are registered;
  • App-C registers a listener for Screen-off (screen-off) broadcast to AMS (C-1) ), registered two listener (C-2, C-3) about Call-in (phone dial-in); since the original application only needs to register a corresponding broadcast listener to the AMS, it has repeatedly registered multiple times. As a result, the initialization time of the AMS server is too long, and the number of times the specific broadcast is monitored is too much, resulting in system performance degradation and poor user experience.
  • FIG. 3 is a schematic diagram of the relationship between the application and the ActivityManagerService after the simplified registration according to the present invention.
  • a virtual listener is built in the application in advance, for example, a virtual listener Local Receiver is built inside the App-A.
  • the App-A originally registered three listeners (A-1, about the Screen-off broadcast) to the AMS.
  • A-2, A-3) registered two listener (A-4, A-5) about Call-in (phone dial-in), now integrate the duplicate registration of the same application through the virtual listener Local Receiver So that App-A only registered a screen-off listener A-Screen-off to AMS, and a Call-in listener A-Call-in.
  • App-B passes the virtual listener.
  • the Local Receiver integrates the repeated registration of the same application, so that App-B registers only one Listener B-Screen-off for Screen-off and one Listen-B-Call-in for Call-in to the AMS. App-C only registered one Call-in listener C-Call-in to AMS, which realizes the integration of the same broadcast listener registered by the same application, which simplifies the registration process and alleviates the AMS. Repeating the listener record avoids the waste of system resources and improves the overall performance of the system.
  • the method further includes: when the virtual listener detects that the application sends a broadcast listener registration request, directly registering corresponding to the broadcast listener registration request Broadcast listener.
  • the method further comprises: when determining that the plurality of broadcast listener registration requests are different, registering a plurality of corresponding broadcast listeners according to different broadcast listener registration requests.
  • the registration request is not sent by the same broadcast component, according to The actual registration request registers multiple corresponding broadcast listeners.
  • FIG. 4 is a schematic diagram of a repeating listener in which a broadcast listener registered by a virtual listener in turn calls an internal request of an application.
  • the AMS system first directly sends a notification to the broadcast listener registered by the virtual listener, for example, the AMS initiates a notification to the A-Screen-Off of the application App-A instead of directly to the App-A.
  • the three registered listeners (A-1, A-2, A-3) for the Screen-off broadcast initiate a notification.
  • the sub-listers A-1, A-2, and A-3 are then rotated through the A-Screen-off listener to complete the call to the repeating listener inside the virtual listener A-Screen-off. It avoids repeated calls to the same broadcast component registered by the same application, which saves the system scheduling application broadcast time and improves system performance.
  • the present invention also provides a storage medium in which a plurality of instructions are stored, the instructions being adapted to be loaded and executed by a processor:
  • a broadcast listener When it is determined that the plurality of broadcast listener registration requests are the same, a broadcast listener is directly registered, and the broadcast listener includes a plurality of child listeners that listen to the same broadcast content.
  • the storage medium wherein a plurality of instructions are stored, the instructions being adapted to be loaded by a processor and executed specifically:
  • the virtual listener listens to the application issuing a broadcast listener registration request, it directly registers the broadcast listener corresponding to the broadcast listener registration request.
  • the storage medium wherein a plurality of instructions are stored, the instructions being adapted to be loaded by a processor and executed specifically:
  • the storage medium wherein a plurality of instructions are stored, the instructions being adapted to be loaded by a processor and executed specifically:
  • the broadcast listener listens to the broadcast notification, it alternately calls the child listener in the broadcast listener.
  • the present invention also provides an electronic device, wherein, as shown in FIG. 5, a processor 10 is included, which is adapted to implement instructions; and a storage device 20 is adapted to store a plurality of instructions adapted to be loaded by the processor 10. And the method of simplifying the application registrar described in any of the above.
  • the processor 10 in some embodiments, can be a central processing unit, microprocessor or other data processing chip for running program code or processing data stored in the storage device 20.
  • the storage device 20 may be an internal storage unit of the device, such as a hard disk or memory of the device, in some embodiments.
  • the storage device 20 may also include both an internal storage unit of the device and an external storage device.
  • the storage device 20 is configured to store application software and various types of data installed in the device.
  • the storage device 20 can also be used to temporarily store data that has been output or is about to be output.
  • the present invention provides a method for simplifying an application registrar by pre-establishing a virtual listener inside the application; when the virtual listener listens to the application issuing multiple broadcast listener registration requests, Determining whether the plurality of broadcast listener registration requests are the same; when determining that the plurality of broadcast listener registration requests are the same, directly registering a broadcast listener.
  • the application is the same broadcast component, and the registration to the system repeatedly causes the system to spend a long time and the system performance is degraded when scheduling the broadcast components of these applications.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

一种简化应用程序注册器的方法,所述方法包括:预先在应用程序内部建立虚拟监听器(S10);当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同(S20);当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器(S30)。上述方法解决了现有技术中应用程序就同一个广播组件重复向系统注册导致系统在调度这些应用程序的广播组件时花费时间久,以及重复注册的广播监听浪费系统资源从而引起的系统性能降低的问题。

Description

一种简化应用程序注册器的方法、存储介质及电子设备 技术领域
本发明涉及应用程序注册技术领域,尤其涉及简化应用程序注册器的方法、存储介质及电子设备。
背景技术
Android系统中集中处理以及调配各个应用程序资源的重要服务端是ActivityManagerService(AMS)。应用程序在正常工作时所需要的广播资源,均通过该服务端完成。但是,不注意优化的应用程序,会出现同一个广播组件重复向AMS服务端注册广播监听器的情况,导致每次AMS服务端初始化时间过长、特定广播被监听次数过多,耗费大量的系统资源,系统性能降低。
因此,现有技术还有待于改进和发展。
发明内容
鉴于上述现有技术的不足,本发明的目的在于提供一种简化应用程序注册器的方法、存储介质及电子设备,旨在解决现有技术中,应用程序的同一个广播组件重复向系统注册广播监听器,导致系统性能降低的问题。
本发明的技术方案如下:
一种简化应用程序注册器的方法,包括步骤:
预先在应用程序内部建立虚拟监听器;
当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器, 所述广播监听器中包括多个监听相同广播内容的子监听器;
当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
所述的简化应用程序注册器的方法,其中,所述步骤当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器,之后还包括:
当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
所述广播监听器具体包括熄屏广播监听器、电话呼入广播监听器。
一种存储介质,其中,存储有多条指令,所述指令适于由处理器加载并执行:
预先在应用程序内部建立虚拟监听器;
当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器;
当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
所述的存储介质,其中,存储有多条指令,所述指令适于由处理器加载并 具体执行:
当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
一种电子设备,其中,包括处理器,适于实现各指令;以及存储器,适于存储多条指令,所述指令适于由处理器加载并执行简化应用程序注册器的方法的步骤,所述简化应用程序注册器的方法包括步骤:
预先在应用程序内部建立虚拟监听器;
当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器;
当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
所述的电子设备,其中,所述步骤当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器,之后还包括:
当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
所述的电子设备,其中,所述广播监听器具体包括熄屏广播监听器、电话呼入广播监听器。
有益效果:本发明提供的简化应用程序注册器的方法,通过预先在应用程序内部建立虚拟监听器;当所述虚拟监听器监听到所述应用程序发出多个广播 监听器注册请求时,判断所述多个广播监听器注册请求是否相同;当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器。解决了现有技术中,应用程序就同一个广播组件,重复向系统注册导致系统在调度这些应用程序的广播组件时,花费时间久以及系统性能降低的问题。
附图说明
图1为本发明一种简化应用程序注册器的方法较佳实施例的流程图。
图2为现有技术在Android系统上应用程序与ActivityManagerService之间关系示意图。
图3为本发明简化注册后应用程序与ActivityManagerService之间关系示意图。
图4为本发明虚拟监听器所注册的广播监听器轮番调用应用内部请求的重复的监听器示意图。
图5为本发明一种简化应用程序注册器的电子设备较佳实施例的结构框图。
具体实施方式
本发明提供一种简化应用程序注册器的方法,为使本发明的目的、技术方案及效果更加清楚、明确,以下对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
请参阅图1,图1为本发明一种简化应用程序注册器的方法较佳实施例的流程图,如图1所示,所述一种简化应用程序注册器的方法,其包括步骤:
S10、预先在应用程序内部建立虚拟监听器;
S20、当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
S30、当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监 听器,所述广播监听器中包括多个监听相同广播内容的子监听器。
具体来说,现有Android系统中,因应用程序为了满足自身运行的需要,向系统注册了多个广播监听器,其中部分广播监听器为同一个广播组件所注册,重复注册的广播监听器耗费了大量的系统资源,导致系统性能降低。
为了解决上述问题,本发明提供一种简化应用程序注册器的方法,通过预先在应用程序内部建立虚拟监听器;当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器。本发明提供的简化应用程序注册器的方法,解决了因应用程序的同一个广播组件,注册多个相同的广播监听器而耗费大量系统资源,导致系统性能降低的问题。
请参阅图2,图2为现有技术在Android系统上,应用程序与ActivityManagerService之间关系示意图。例如,在Android系统上,为了监听Android系统发出的Screen-off(屏幕熄灭)广播,应用App-A、App-B、App-C、App-D向ActivityManagerService(AMS)注册监听器请求,一旦Android系统发出广播,使得应用能够收到通知,以完成自己的正确逻辑。但是,各个应用之内可能由于多人协作、功能细分、应用架构等原因,导致原本应用内部只需要向AMS注册一个对应广播的监听器,现在重复注册了多个。例如:App-A,向AMS注册了3个关于Screen-off(屏幕熄灭)广播的监听器(A-1、A-2、A-3)、注册了两个关于Call-in(电话拨入)的监听器(A-4、A-5);App-B也向AMS注册了3个关于Screen-off(屏幕熄灭)广播的监听器(B-1、B-2、B-3)、注册了2个关于Call-in(电话拨入)的监听器(B-5、B-6);App-C向AMS注册1个关于Screen-off(屏幕熄灭)广播的监听器(C-1)、注册了2个关于Call-in(电话拨入)的监听器(C-2、C-3);由于原本应用内部只需要向AMS注册一个 对应广播的监听器,现在重复注册了多个,导致每次AMS服务端初始化时间过长、特定广播被监听次数过多,导致系统性能降低,用户体验差。
请参阅图3,图3为本发明简化注册后应用程序与ActivityManagerService之间关系示意图。预先在应用程序内部建立虚拟监听器,例如在App-A内部建立虚拟监听器Local Receiver,原本App-A向AMS注册了3个关于Screen-off(屏幕熄灭)广播的监听器(A-1、A-2、A-3)、注册了2个关于Call-in(电话拨入)的监听器(A-4、A-5),现在通过虚拟监听器Local Receiver对同一应用的重复注册进行整合,使得App-A向AMS只注册了一个关于Screen-off的监听器A-Screen-off,1个关于Call-in的监听器A-Call-in,同理,应用App-B通过虚拟监听器Local Receiver对同一应用的重复注册进行整合,使得App-B向AMS只注册了1个关于Screen-off的监听器B-Screen-off,1个关于Call-in的监听器B-Call-in,App-C向AMS只注册了1个关于Call-in的监听器C-Call-in,实现了对同一个应用所注册的相同的广播监听器的整合,简化了注册过程,缓解了AMS上的重复监听器记录,避免了系统资源的浪费,提升了系统的整体性能。
更进一步,在本发明中,所述步骤S20之后还包括:当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器。
更进一步,在本发明中,所述步骤S30之后还包括:当判定所述多个广播监听器注册请求不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
具体地,当应用程序向系统发出多个广播监听器注册请求,虚拟监听器判定出所述多个广播监听器注册请求不相同时,则说明注册请求不是同一个广播 组件所发出的,则根据实际的注册请求注册多个相对应的广播监听器。
更进一步,请参阅图4,图4为本发明虚拟监听器所注册的广播监听器轮番调用应用内部请求的重复的监听器示意图。
具体地,当发起广播时,首先AMS系统会直接向虚拟监听器所注册的广播监听器发起通知,例如AMS向应用App-A的A-Screen-Off发起通知,而不是直接向App-A所注册的3个关于Screen-off(屏幕熄灭)广播的监听器(A-1、A-2、A-3)发起通知。再通过A-Screen-off监听器轮番调用子监听器A-1、A-2以及A-3,从而完成对虚拟监听器A-Screen-off内部的重复的监听器的调用。避免了对同一个应用所注册的相同广播组件的反复的调用,节约了系统调度应用广播的时间,提升了系统性能。
基于上述简化应用程序注册器的方法,本发明还提供一种存储介质,其中,存储有多条指令,所述指令适于由处理器加载并执行:
预先在应用程序内部建立虚拟监听器;
当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器。
所述的存储介质,其中,存储有多条指令,所述指令适于由处理器加载并具体执行:
当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器。
所述的存储介质,其中,存储有多条指令,所述指令适于由处理器加载并具体执行:
当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
所述的存储介质,其中,存储有多条指令,所述指令适于由处理器加载并具体执行:
当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
本发明还提供一种电子设备,其中,如图5所示,包括处理器10,适于实现各指令;以及存储设备20,适于存储多条指令,所述指令适于由处理器10加载并执行上述任意一项所述的简化应用程序注册器的方法。
具体来说,所述处理器10在一些实施例中可以是一中央处理器,微处理器或其他数据处理芯片,用于运行所述存储设备20中存储的程序代码或处理数据。
所述存储设备20在一些实施例中可以是所述装置的内部存储单元,例如该装置的硬盘或内存。
进一步地,所述存储设备20还可以既包括所述装置的内部存储单元也包括外部存储装置。所述存储设备20用于存储安装于所述装置的应用软件及各类数据。所述存储设备20还可以用于暂时地存储已经输出或者将要输出的数据。
综上所述,本发明提供的简化应用程序注册器的方法,通过预先在应用程序内部建立虚拟监听器;当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器。解决了现有技术中,应用程序就同一个广播组件,重复向系统注册导致系统在调度这些应用程序的广播组件时,花费时间久以及系统性能降低的问题。
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员 来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。

Claims (8)

  1. 一种简化应用程序注册器的方法,其中,包括步骤:
    预先在应用程序内部建立虚拟监听器;
    当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
    当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器;
    当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
    当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
  2. 根据权利要求1所述的简化应用程序注册器的方法,其中,所述步骤当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器,之后还包括:
    当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
  3. 根据权利要求1所述的简化应用程序注册器的方法,其中,所述广播监听器具体包括熄屏广播监听器、电话呼入广播监听器。
  4. 一种存储介质,其中,存储有多条指令,所述指令适于由处理器加载并执行:
    预先在应用程序内部建立虚拟监听器;
    当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
    当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器, 所述广播监听器中包括多个监听相同广播内容的子监听器;
    当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
    当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
  5. 根据权利要求4所述的存储介质,其中,存储有多条指令,所述指令适于由处理器加载并继续执行:
    当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
  6. 一种电子设备,包括处理器以及存储介质,所述指令适于由处理器加载并执行简化应用程序注册器的方法的步骤,所述简化应用程序注册器的方法包括步骤:
    预先在应用程序内部建立虚拟监听器;
    当所述虚拟监听器监听到所述应用程序发出多个广播监听器注册请求时,判断所述多个广播监听器注册请求是否相同;
    当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括多个监听相同广播内容的子监听器;
    当所述虚拟监听器监听到所述应用程序发出一个广播监听器注册请求时,则直接注册与所述广播监听器注册请求相对应的广播监听器;
    当判定所述多个广播监听器注册请求均不相同时,则根据不同的广播监听器注册请求注册多个相对应的广播监听器。
  7. 根据权利要求6所述的电子设备,其中,所述步骤当判定所述多个广播监听器注册请求相同时,则直接注册一个广播监听器,所述广播监听器中包括 多个监听相同广播内容的子监听器,之后还包括:
    当广播监听器监听到广播通知时,则轮番调用所述广播监听器中的子监听器。
  8. 根据权利要求6所述的电子设备,其中,所述广播监听器具体包括熄屏广播监听器、电话呼入广播监听器。
PCT/CN2018/106371 2017-09-20 2018-09-19 一种简化应用程序注册器的方法、存储介质及电子设备 WO2019057049A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710850661.7A CN107729158B (zh) 2017-09-20 2017-09-20 一种简化应用程序注册器的方法、存储介质及电子设备
CN201710850661.7 2017-09-20

Publications (1)

Publication Number Publication Date
WO2019057049A1 true WO2019057049A1 (zh) 2019-03-28

Family

ID=61207323

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/106371 WO2019057049A1 (zh) 2017-09-20 2018-09-19 一种简化应用程序注册器的方法、存储介质及电子设备

Country Status (2)

Country Link
CN (1) CN107729158B (zh)
WO (1) WO2019057049A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729158B (zh) * 2017-09-20 2022-01-11 惠州Tcl移动通信有限公司 一种简化应用程序注册器的方法、存储介质及电子设备
CN111221594B (zh) * 2019-12-30 2023-12-12 智车优行科技(北京)有限公司 一种主从设备功能插件化注册方法及主设备、从设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851015A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106921947A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106919459A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 一种广播接收者的管理方法、装置及终端
EP3203433A1 (en) * 2012-09-28 2017-08-09 Sonos, Inc. Assisted registration of audio sources
CN107729158A (zh) * 2017-09-20 2018-02-23 惠州Tcl移动通信有限公司 一种简化应用程序注册器的方法、存储介质及电子设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070208698A1 (en) * 2002-06-07 2007-09-06 Dougal Brindley Avoiding duplicate service requests
CN102469485B (zh) * 2010-11-18 2014-05-07 普天信息技术研究院有限公司 一种控制大量ue集中注册的方法
US9680692B2 (en) * 2013-01-23 2017-06-13 Facebook, Inc. Method and system for using a recursive event listener on a node in hierarchical data structure
CN106162242B (zh) * 2015-04-09 2018-12-04 晨星半导体股份有限公司 应用于电视节目信息分享网络的管理方法及管理装置及非瞬时计算机可读取储存媒体
CN104978601B (zh) * 2015-06-26 2017-08-25 深圳市腾讯计算机系统有限公司 神经网络模型训练系统和方法
CN105430147A (zh) * 2015-11-12 2016-03-23 苏州方位通讯科技有限公司 一种基于同一套通话逻辑处理实现多个ui同步显示的方法
CN106648937B (zh) * 2016-12-29 2020-02-28 北京奇虎科技有限公司 一种安卓应用的广播代理方法和装置
CN106953852B (zh) * 2017-03-10 2019-12-31 Oppo广东移动通信有限公司 广播接收器的注册方法、装置和终端设备
CN106844069A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3203433A1 (en) * 2012-09-28 2017-08-09 Sonos, Inc. Assisted registration of audio sources
CN106851015A (zh) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106921947A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 调整广播消息队列的方法、装置及终端
CN106919459A (zh) * 2017-03-10 2017-07-04 广东欧珀移动通信有限公司 一种广播接收者的管理方法、装置及终端
CN107729158A (zh) * 2017-09-20 2018-02-23 惠州Tcl移动通信有限公司 一种简化应用程序注册器的方法、存储介质及电子设备

Also Published As

Publication number Publication date
CN107729158B (zh) 2022-01-11
CN107729158A (zh) 2018-02-23

Similar Documents

Publication Publication Date Title
CN106161537B (zh) 远程过程调用的处理方法、装置、系统及电子设备
EP1880289B1 (en) Transparent support for operating system services
US11782756B2 (en) Method and apparatus for scheduling processor core, and storage medium
CN108429645A (zh) 一种api网关的配置方法、装置、存储介质及api网关
WO2013123732A1 (zh) 移动终端多媒体资源的管理方法及装置
US8024477B2 (en) System and method to establish a peer-to-peer IT backbone
WO2020181913A1 (zh) 消息分发处理方法、装置、设备及存储介质
CN106598539B (zh) 一种应用程序内音频的处理方法和装置
WO2019057049A1 (zh) 一种简化应用程序注册器的方法、存储介质及电子设备
CN104268025A (zh) 一种进程间通信的方法及系统、服务器
CN106648937B (zh) 一种安卓应用的广播代理方法和装置
CN112055072A (zh) 云端音频输入方法、装置、云系统、电子设备与存储介质
WO2014086143A1 (zh) 面向复杂生产过程管理系统的消息总线实现方法
CN111625443B (zh) 一种压力测试方法、装置、设备和存储介质
CN109039803A (zh) 一种处理回调通知消息的方法、系统及计算机设备
WO2023087772A1 (zh) 双系统广播方法、装置、电子设备及计算机可读存储介质
JP2009514084A (ja) リセット装置を具えたデータ処理装置
CN111314429B (zh) 一种网络请求处理系统和方法
US9372722B2 (en) Reliable asynchronous processing of a synchronous request
US10313450B2 (en) Method for transparently connecting augmented network socket operations
CN107231386B (zh) 应用状态转换方法、装置及移动终端
WO2020119608A1 (zh) 基于Spark Shuffle的远程直接内存访问系统及方法
CN106911739B (zh) 一种信息分发方法及装置
CN108228880B (zh) 数据库管理系统调用外部函数的方法、装置、设备及介质
CN112363946B (zh) 一种基于业务系统的消息转发方法及设备

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: 18858061

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: 18858061

Country of ref document: EP

Kind code of ref document: A1