CN107239354B - Method and terminal for notifying screen-off event - Google Patents
Method and terminal for notifying screen-off event Download PDFInfo
- Publication number
- CN107239354B CN107239354B CN201710417837.XA CN201710417837A CN107239354B CN 107239354 B CN107239354 B CN 107239354B CN 201710417837 A CN201710417837 A CN 201710417837A CN 107239354 B CN107239354 B CN 107239354B
- Authority
- CN
- China
- Prior art keywords
- screen
- broadcast
- turning
- terminal
- application program
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
- G06F1/3234—Power saving characterised by the action undertaken
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/543—Local
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention provides a method and a terminal for notifying screen-off events, relates to the technical field of communication, and is used for notifying screen-off events of application programs before a terminal is dormant, and the running application programs can be stopped immediately after the terminal is screen-off, so that the problem of large running time difference between screen-off and application program stopping is solved. The method comprises the following steps: when a screen turning trigger event is received, turning off the screen; after screen turning off, before the system is dormant, sending a designated broadcast to the application program within a designated time, wherein the designated broadcast is used for notifying the application program of screen turning off events. The technical scheme provided by the embodiment of the invention is suitable for the process that the terminal notifies the screen-off event to the application program.
Description
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of communications technologies, and in particular, to a method and a terminal for notifying a screen-turning-off event.
[ background of the invention ]
When receiving a screen-off instruction, the terminal firstly turns off the screen and sleeps to prepare the system, and then sends screen-off broadcast to the system and an application program to inform screen-off events. And after the system is ready to work, screen off broadcasting is acquired and follow-up work is performed. And stopping running the running application program after receiving the screen turning broadcast. Since it takes a certain time for the terminal to go to sleep, there is a certain time difference between the terminal's screen saving and the application stopping. This may result in poor experience of the user in the terminal using process, for example, when playing a video, the user presses the power key, presses the reason to play the screen immediately and stop playing the video, but the sound that the video is still playing after the screen is played often appears, and the video can be stopped playing after a period of time.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in order to make system preparation work, the terminal sends screen-off broadcast to the system and the application program to inform screen-off events after the terminal is in dormancy, and certain time is consumed when the terminal enters dormancy, so that the response speed of stopping the application program after the terminal is in dormancy is low, and the real-time performance is poor.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a method and a terminal for notifying a screen-off event, where when receiving a screen-off instruction, the terminal sends a designated broadcast to an application program before hibernation to notify the screen-off event, there is no time consumption for a system to enter hibernation, and an application program in operation stops operating immediately after the terminal screens off, so that a response speed is fast.
In one aspect, an embodiment of the present invention provides a method for notifying a screen-off event, which is applicable to a terminal, and the method includes:
when a screen turning trigger event is received, turning off the screen;
after screen turning off, before the system is dormant, sending a designated broadcast to the application program within a designated time, wherein the designated broadcast is used for notifying the application program of screen turning off events.
The above-described aspect and any possible implementation further provides an implementation, before sending the specified broadcast to the application program within the specified time, the method further includes:
setting the service agent action of the appointed broadcast;
the specified broadcast is registered in an application.
The above aspect and any possible implementation manner further provide an implementation manner, where the setting the action of the designated broadcast includes:
and limiting the transmission right of the specified broadcast to a system.
The above aspect and any possible implementation manner further provide an implementation manner, where the setting the action of the designated broadcast further includes:
and setting the access authority of the action of the appointed broadcast as permission, and setting the change authority of the action of the appointed broadcast as prohibition. .
The above aspect and any possible implementation further provide an implementation, and before the screen turning, the method further includes:
judging whether the screen-off triggering event is occupied or not;
when the system receives a screen-off triggering event, screen-off includes:
and when the system receives a screen turning-off triggering event and the screen turning-off triggering event is not occupied, turning off the screen.
In another aspect, an embodiment of the present invention provides a terminal, where the terminal includes:
the screen turning unit is used for turning off the screen when receiving a screen turning triggering event;
and the sending unit is used for sending a specified broadcast to the application program within a specified time after screen turning and before the system is dormant, wherein the specified broadcast is used for notifying the screen turning event to the application program.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the terminal further includes:
a setting unit, configured to set the service agent action of the specified broadcast;
a registration unit operable to register the specified broadcast in an application program.
The above-described aspect and any possible implementation further provide an implementation, where the setting unit includes:
and the limiting module is used for limiting the sending authority of the specified broadcast to a system.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the setting unit further includes:
and the setting module is used for setting the access authority of the action of the appointed broadcast as permission and setting the change authority of the action of the appointed broadcast as prohibition.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, where the terminal further includes:
the judging unit is used for judging whether the screen turning triggering event is occupied or not;
the screen turning unit is specifically configured to:
and when the system receives a screen turning-off triggering event and the screen turning-off triggering event is not occupied, turning off the screen.
The embodiment of the invention provides a method and a terminal for notifying a screen-off event, wherein when the terminal receives a screen-off instruction, the terminal sends an appointed broadcast to an application program to notify the screen-off event, the application program is notified of the screen-off event before the terminal is dormant, time consumption for a system to enter the dormancy is avoided, the running application program can be stopped immediately after the terminal is screen-off, the response speed is high, and the real-time performance is good.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for notifying a screen-off event according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for notifying a screenshot event according to an embodiment of the present invention;
FIG. 3 is a flow chart of another method for notifying a screenshot event according to an embodiment of the present invention;
FIG. 4 is a flow chart of another method for notifying a screenshot event according to an embodiment of the present invention;
FIG. 5 is a flow chart of another method for notifying a screenshot event according to an embodiment of the present invention;
fig. 6 is a block diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a block diagram of another terminal according to an embodiment of the present invention;
fig. 8 is a block diagram of another terminal according to an embodiment of the present invention;
fig. 9 is a block diagram of another terminal according to an embodiment of the present invention;
fig. 10 is a block diagram of another terminal according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
The embodiment of the invention provides a method for notifying a screen-off event, which is suitable for a terminal and is suitable for a process that the terminal notifies the screen-off event to an application program.
The terminal may include, but is not limited to, a Personal Computer (PC), a Personal Digital Assistant (PDA), a wireless handheld device, a Tablet Computer (Tablet Computer), a mobile phone, and the like.
As shown in fig. 1, the method includes:
101. and when a screen turning trigger event is received, turning off the screen.
The screen-off triggering event refers to a screen-off instruction issued to the terminal by a user through pressing a power key, touching a screen or other methods.
102. After screen turning off, before the system is dormant, sending a designated broadcast to the application program within a designated time, wherein the designated broadcast is used for notifying the application program of screen turning off events.
Wherein, the specified broadcast is a broadcast defined by a technician, and the specific content of the specified broadcast can be consistent with the content corresponding to the application program in the current information screen broadcast.
Where a description of the specified time is required, we use the specified time to limit the transmission of the specified broadcast for ease of understanding. In practical implementation, it is referred to herein that the designated broadcast is transmitted with a priority of a foreground in order to ensure fast transmission of the designated broadcast. Since the definition of the foreground priority transmission broadcast is that the transmission of the broadcast is completed within a specified time (a very short time), the specified time is used here to limit the transmission of the specified broadcast.
It should be noted that, in the prior art, the flow of notifying the screen-off event is as follows: and after entering the dormancy, the terminal sends a screen-off broadcast to the system and the application program to inform the screen-off event. In the embodiment of the invention, after screen saving and before the system is dormant, the appointed broadcast is sent to the application program, and the screen saving event is notified to the application program in advance, so that the application program can perform subsequent operation after screen saving as soon as possible.
The embodiment of the invention provides a method for notifying screen-off events, wherein when a terminal receives a screen-off instruction, a designated broadcast is sent to an application program to notify the screen-off events, the application program is notified of the screen-off events before the terminal is dormant, the time consumption of the system entering the dormancy is avoided, the running application program can stop running immediately after the terminal is screen-off, the response speed is high, and the real-time performance is good.
Further, with reference to the foregoing method flow, if the specified broadcast is to be used, first, the service agent action of the specified broadcast needs to be set, and the specified broadcast is registered in the application program that needs to be broadcasted. Therefore, another possible implementation manner of the embodiment of the present invention further provides the following method flow, which is executed before step 102, as shown in fig. 2, and includes:
103. and setting the service agent action of the appointed broadcast.
In step 103, the action of the designated broadcast is set by the terminal according to the logic command of the technician.
The action of the appointed broadcast is set, and the action comprises the sending authority of the appointed broadcast, the access authority of the action of the appointed broadcast and the setting of the change authority.
104. The specified broadcast is registered in an application.
In order to implement the specified broadcast in the application, the specified broadcast is also registered in the application that needs to be broadcast.
Further, in combination with the foregoing method flow, in order to prevent the application program from sending the specified broadcast and causing confusion of terminal system management, therefore, with respect to the implementation of step 103, another possible implementation manner of the embodiment of the present invention further provides the following method flow, as shown in fig. 3, including:
1031. and limiting the transmission right of the specified broadcast to a system.
The specific implementation procedure of step 1031 may set the specified broadcast as a protected broadcast. Thus, when receiving the specified broadcast, the application program can judge whether the specified broadcast is protected, and if not, the application program does not receive the broadcast and does not execute the subsequent operation.
Further, in combination with the foregoing method flow, when an action of the specified broadcast is set, it needs to set an access right and a modification right of the action, so as to implement step 103, another possible implementation manner of the embodiment of the present invention further provides the following method flow, as shown in fig. 4, further including:
1032. and setting the access authority of the action of the appointed broadcast as permission, and setting the change authority of the action of the appointed broadcast as prohibition.
Furthermore, in combination with the foregoing method flow, the screen-off triggering event may be occupied by other functions, such as a power key, which not only can screen off, but also can be used for powering off. Therefore, another possible implementation manner of the embodiment of the present invention further provides the following method flow, before the screen blanking, as shown in fig. 5, including:
105. and judging whether the screen turning triggering event is occupied or not.
Step 101 is specifically executed as:
1011. and when the system receives a screen turning-off triggering event and the screen turning-off triggering event is not occupied, turning off the screen.
An embodiment of the present invention provides a terminal, which is applicable to the above method flow, and as shown in fig. 6, the terminal includes:
and the screen turning-off unit 21 is used for turning off the screen when receiving the screen turning-off triggering event.
And a sending unit 22, configured to send a specific broadcast to the application within a specific time after the screen is turned off and before the system is dormant, where the specific broadcast is used to notify the application of the screen turning off event.
Optionally, as shown in fig. 7, the terminal further includes:
a setting unit 23, configured to set action of the specified broadcast.
A registration unit 24 for registering the specified broadcast in the application program.
Optionally, as shown in fig. 8, the setting unit 23 includes:
and a limiting module 231, configured to limit the sending right of the specified broadcast to the system.
Optionally, as shown in fig. 9, the setting unit 23 further includes:
the setting module 232 is configured to set the access right of the action of the designated broadcast as permitted, and set the change right of the action of the designated broadcast as prohibited.
Optionally, as shown in fig. 10, the terminal further includes:
a judging unit 25, configured to judge whether the screen turning trigger event is occupied;
the screen turning unit 21 is specifically configured to:
and when the system receives a screen turning-off triggering event and the screen turning-off triggering event is not occupied, turning off the screen.
The embodiment of the invention provides a terminal, wherein when receiving a screen-off instruction, the terminal sends an appointed broadcast to an application program to notify a screen-off event, the application program is notified of the screen-off event before the terminal is dormant, the time consumption for the system to enter the dormant state is avoided, the running application program can stop running immediately after the terminal is screen-off, the response speed is high, and the real-time performance is good.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (4)
1. A method for notifying screen-off events, which is applicable to a terminal, comprises the following steps:
when a screen turning trigger event is received, turning off the screen;
after screen turning off and before the system is dormant, sending a designated broadcast to an application program within a designated time, wherein the designated broadcast is used for notifying the application program of a screen turning off event;
before the screen turning, the method further comprises:
judging whether the screen-off triggering event is occupied or not;
when the system receives a screen-off triggering event, screen-off includes:
when the system receives a screen-off triggering event and the screen-off triggering event is not occupied, screen-off;
before sending the designated broadcast to the application within the designated time, the method further comprises:
setting the service agent action of the appointed broadcast;
registering the specified broadcast in an application;
the setting of the action of the specified broadcast comprises the following steps:
and limiting the transmission right of the specified broadcast to a system.
2. The method of claim 1, wherein the setting the action of the designated broadcast further comprises:
and setting the access authority of the action of the appointed broadcast as permission, and setting the change authority of the action of the appointed broadcast as prohibition.
3. A terminal, characterized in that the terminal comprises:
the screen turning unit is used for turning off the screen when receiving a screen turning triggering event;
the system comprises a sending unit, a receiving unit and a sending unit, wherein the sending unit is used for sending a specified broadcast to an application program within a specified time after screen turning and before a system is dormant, and the specified broadcast is used for notifying screen turning events to the application program;
the terminal further comprises:
the judging unit is used for judging whether the screen turning triggering event is occupied or not;
the screen turning unit is specifically configured to:
when the system receives a screen-off triggering event and the screen-off triggering event is not occupied, screen-off;
the terminal further comprises:
a setting unit, configured to set the service agent action of the specified broadcast;
a registration unit operable to register the specified broadcast in an application program;
the setting unit includes:
and the limiting module is used for limiting the sending authority of the specified broadcast to a system.
4. The terminal according to claim 3, wherein the setting unit further comprises:
and the setting module is used for setting the access authority of the action of the appointed broadcast as permission and setting the change authority of the action of the appointed broadcast as prohibition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710417837.XA CN107239354B (en) | 2017-06-06 | 2017-06-06 | Method and terminal for notifying screen-off event |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710417837.XA CN107239354B (en) | 2017-06-06 | 2017-06-06 | Method and terminal for notifying screen-off event |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107239354A CN107239354A (en) | 2017-10-10 |
CN107239354B true CN107239354B (en) | 2021-01-26 |
Family
ID=59985360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710417837.XA Active CN107239354B (en) | 2017-06-06 | 2017-06-06 | Method and terminal for notifying screen-off event |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107239354B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115202895A (en) * | 2021-04-09 | 2022-10-18 | 华为技术有限公司 | Application program state sensing method, related equipment and related system |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106407086A (en) * | 2016-11-28 | 2017-02-15 | 珠海市魅族科技有限公司 | Application control method and mobile terminal |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6626359B2 (en) * | 2002-01-11 | 2003-09-30 | Ncr Corporation | Methods and apparatus for reduced electronic shelf label power consumption |
CN104199731B (en) * | 2014-09-12 | 2018-02-06 | 北京奇虎科技有限公司 | The method and device being managed to the process of application program |
CN104486510A (en) * | 2014-12-16 | 2015-04-01 | 上海斐讯数据通信技术有限公司 | Method for reducing power consumption of intelligent terminal, and system for reducing power consumption of intelligent terminal |
CN105975267A (en) * | 2016-04-29 | 2016-09-28 | 乐视控股(北京)有限公司 | Screen protection method and screen protection system for intelligent terminal |
CN106125882B (en) * | 2016-06-15 | 2019-04-26 | 深圳市万普拉斯科技有限公司 | Application program management method and electronic equipment |
CN106534438B (en) * | 2016-10-28 | 2020-04-14 | 上海工业控制安全创新科技有限公司 | Mobile terminal control device and method |
CN106650409B (en) * | 2016-12-13 | 2019-08-09 | 深圳市金立通信设备有限公司 | A kind of terminal control method and terminal |
-
2017
- 2017-06-06 CN CN201710417837.XA patent/CN107239354B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106407086A (en) * | 2016-11-28 | 2017-02-15 | 珠海市魅族科技有限公司 | Application control method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN107239354A (en) | 2017-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106774786B (en) | Power consumption control method and device | |
US10819455B2 (en) | Broadcast processing method, non-transitory storage medium, and electronic device | |
CN107844342B (en) | Control method and device for keeping application program alive, storage medium and mobile terminal | |
CN108521607B (en) | Method and device for processing advertisements in video, storage medium and intelligent terminal | |
CN107943269B (en) | Scheduling job control method, device, terminal equipment and storage medium | |
US9141401B2 (en) | Method for switching system state and portable terminal | |
CN108040292B (en) | Television standby starting method, television and computer readable storage medium | |
WO2019024649A1 (en) | Application program launching method, device, storage medium and terminal | |
US10097292B2 (en) | Method, device, terminal and storage medium for adjusting broadcast message queue | |
CN110554762A (en) | Method and terminal for controlling application program | |
EP3591949B1 (en) | Broadcast message queuing method and device, and terminal | |
EP3592003B1 (en) | Broadcast control method, device, storage medium and mobile terminal | |
CN107831886B (en) | Control method and device for associated starting application, storage medium and intelligent terminal | |
EP3486770A1 (en) | Processing method, device and storage medium for implementing automatic startup | |
WO2017161638A1 (en) | Method and device for freezing and waking up multiple systems | |
CN107423064B (en) | Message processing method and device, terminal equipment and storage medium | |
EP3486823B1 (en) | System notification service control method, apparatus, terminal device, and storage medium | |
CN113038593A (en) | Connection establishment method and device and user equipment | |
CN107070670A (en) | Broadcast transmission person is controlled to send method, device and the terminal device of broadcast message | |
CN107885588B (en) | Application service control method and device, storage medium and mobile terminal | |
US9436622B2 (en) | Broadcasting communications over an advertising channel | |
CN107239354B (en) | Method and terminal for notifying screen-off event | |
JP2008270918A (en) | Packet reception device | |
CN106844070B (en) | Broadcast control method and device and mobile terminal | |
WO2018161955A1 (en) | Method and device for controlling broadcast recipient, and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |