CN109005283B - Method, device, terminal and storage medium for displaying notification message - Google Patents

Method, device, terminal and storage medium for displaying notification message Download PDF

Info

Publication number
CN109005283B
CN109005283B CN201810697712.1A CN201810697712A CN109005283B CN 109005283 B CN109005283 B CN 109005283B CN 201810697712 A CN201810697712 A CN 201810697712A CN 109005283 B CN109005283 B CN 109005283B
Authority
CN
China
Prior art keywords
notification
display
displaying
notification message
message
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
Application number
CN201810697712.1A
Other languages
Chinese (zh)
Other versions
CN109005283A (en
Inventor
张伟超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810697712.1A priority Critical patent/CN109005283B/en
Publication of CN109005283A publication Critical patent/CN109005283A/en
Application granted granted Critical
Publication of CN109005283B publication Critical patent/CN109005283B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a method, a device, a terminal and a storage medium for displaying notification messages, which belong to the technical field of computers, wherein the method comprises the following steps: when the terminal displays the user interface of the target application in a full screen mode and receives an instruction for displaying the notification message, the notification element corresponding to the notification message is obtained, the display template corresponding to the notification element is further obtained, a notification display frame containing the notification element is generated according to the display template, the notification display frame is a display frame with a transparent or semitransparent background, and the notification display frame is displayed in the user interface of the target application. Wherein the notification element is used for displaying the message content of the notification message and/or for receiving the control instruction. According to the method and the device, the user interface of the target application is displayed on the full screen of the terminal, and when the instruction for displaying the notification message is received, the notification display frame with a transparent or semitransparent background can be displayed, so that the shielding of the current user interface is reduced on the premise of ensuring the notification message to be displayed in time.

Description

Method, device, terminal and storage medium for displaying notification message
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a method, a device, a terminal and a storage medium for displaying notification messages.
Background
The smart phone, as an important device for modern users to obtain information, can provide different types of information to the users by installing various applications.
In the related art, when the first application has a notification message to be displayed, the notification message may be displayed in a user interface of the terminal. When the terminal displays the user interface of the second application in a full screen mode, the terminal displays a popup window in the center of the screen, so that the user interface is shielded, and watching of a user is affected.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal and a storage medium for displaying a notification message, which can solve the problem that when a terminal displays a user interface of a second application in a full screen mode, the terminal displays a popup window in the center of a screen, so that the user interface is blocked and watching of a user is affected. The technical scheme is as follows:
according to a first aspect of the present application, there is provided a method of displaying a notification message, the method comprising:
when a terminal displays a user interface of a target application in a full screen mode and receives an instruction of displaying a notification message, acquiring a notification element corresponding to the notification message; the notification element is used for displaying the message content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element;
acquiring a display template corresponding to the notification element;
generating a notification display frame containing the notification elements according to the display template, wherein the notification display frame is a display frame with a transparent or semitransparent background;
displaying the notification display box in a user interface of the target application.
According to a second aspect of the present application, there is provided an apparatus for displaying a notification message, the apparatus comprising:
the element acquisition module is used for acquiring a notification element corresponding to a notification message when a user interface of a target application is displayed on the full screen of the terminal and an instruction for displaying the notification message is received; the notification element is used for displaying the message content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element;
the template acquisition module is used for acquiring a display template corresponding to the notification element;
the display frame generating module is used for generating a notification display frame containing the notification elements according to the display template, wherein the notification display frame is a display frame with a transparent or semitransparent background;
and the display frame display module is used for displaying the notification display frame in the user interface of the target application.
According to a third aspect of the present application, there is provided a terminal comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the method of displaying a notification message according to the first aspect.
According to a fourth aspect of the present application, there is provided a computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the method of displaying a notification message according to the first aspect.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
in the embodiment of the application, when the application is implemented, the terminal can be enabled to display the user interface of the target application in a full screen mode, and when an instruction for displaying the notification message is received, each notification element in the notification message is displayed by displaying a notification display frame with a transparent or semi-transparent background, wherein the notification element is used for displaying the message content of the notification message, or the notification message can also be used for receiving a control instruction. Therefore, on the premise of ensuring timely display of the notification message, the embodiment of the application can reduce the shielding of the user interface of the target application and improve the effect of simultaneously displaying the notification message and the user interface of the target application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, 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 flow chart of a method of displaying a notification message provided by an exemplary embodiment of the present application;
FIG. 2 is a diagram illustrating a notification display box corresponding to a display template provided in the embodiment of FIG. 1;
FIG. 3 is a schematic diagram of a display notification display box provided in accordance with the embodiment shown in FIG. 1;
FIG. 4 is a schematic diagram of another display notification display box provided in accordance with the embodiment shown in FIG. 1;
FIG. 5 is a flow chart of a method of displaying a notification message provided by another exemplary embodiment of the present application;
FIG. 6 is a block diagram of an apparatus for displaying notification messages according to an exemplary embodiment of the present application;
fig. 7 is a block diagram of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
In order to make the solution shown in the embodiments of the present application easy to understand, several terms appearing in the embodiments of the present application will be described below.
The target application comprises the following steps: the application capable of being displayed on the full screen of the terminal can be a system application or a third-party application. In a possible application scenario, the target application may be at least one of a gaming application, an input method application, a browser application, a wallpaper application, a system tool application, a life-facilitating application, a video-audio playing application, a call communication application, a social networking application, a theme plug-in application, a shoot-beautifying application, a news information application, a book reading application, a learning and office application, an online shopping payment application, a financial management application, an original publishing application, a map navigation application, a take-away application, a network taxi-calling application, a shared bicycle application, a sports fitness application, a ticketing application, a live broadcast application, a convenience-of-supermarket application, an application store application, and a smart device application.
Notification element: in one possible scenario, the notification element is used to display message content of the notification message, for example, when the notification element is notification content, the notification content may include at least one of text, picture, audio, and video.
In another possible scenario, the notification element is for receiving a control instruction, e.g., when the notification element is at least one of a button, a check box, and a slider, the notification element may receive at least one of a click, a selection, and a drag. And the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element. For example, when the notification element closes the button, the control instruction is used to instruct the terminal to close the display of the notification message. Or, when the notification element is an answer button, the control instruction is used for instructing the terminal to connect the current incoming call.
In yet another possible scenario, the notification element may be used for both displaying the message content and receiving a control instruction, for example, when the notification element has notification content with a transparent control layer, and a screen area displaying the notification content is clicked, the transparent control layer can be triggered, so that the screen jumps to display a user interface corresponding to the notification content.
Optionally, the notification element includes at least one of a notification title, a notification content, a notification button, and a notification dialog. The notification button can receive a click command, and the command is generated when the user clicks the notification button when the command is clicked. The notification title is text indicating the subject of one notification. The notification content is a part of main information for indicating a piece of notification, and may be implemented as at least one of text, picture, audio, and video. The notification dialog is a box that receives user input text.
Displaying the template: the template may be preset in the system, different templates correspond to a corresponding notification display frame, and the layout of each display element may be specified in one notification display frame. That is, one template specifies the type, number, and display area of display elements displayed in the corresponding notification display box.
A notification display frame: is a notification frame generated by a system service or system application according to a display template and a display element, and the background of the notification frame is transparent or semi-transparent. In one possible implementation, the transparency of the background may be a constant value that is preset to be determined. In another possible implementation, the transparency of the background may also be determined according to the type of application, for example, when the target application is a video application, the transparency is 75%; when the target application is a gaming application, the transparency is 50%. It should be noted that the transparent background may be a background with a transparency of 100%, and the translucent background may be a background with a transparency in an interval from greater than zero to less than 1.
Optionally, in one possible application scenario, the terminal will display the notification dialog in the top region of the user interface of the target application, which is the region against the upper edge of the user interface. In another possible application scenario, the terminal will display the notification dialog in a side region of the user interface of the target application, the side region referring to the display region abutting the left edge and/or the display region within the right edge of the user interface. The notification dialog box is displayed in the edge area of the user interface of the target application, so that the shielding of the user interface of the target application can be reduced to the maximum extent, and meanwhile, the effect of displaying the notification message to the user for viewing can be achieved.
The terminal to which the present disclosure is applied is a terminal having a display screen. The display screen can be an LED display screen or a projection display screen. Alternatively, the terminal to which the present application is applied may be a device capable of directly projecting an image to the fundus of the user. In one possible application scenario, the terminal may be a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal computer, a server, a workstation, a television, a set-top box, smart glasses, a smart watch, a digital camera, an MP4 player terminal, an MP5 player terminal, a learning machine, a point-and-read machine, an electronic book, an electronic dictionary, a vehicle-mounted terminal, a Virtual Reality (VR) player terminal, an Augmented Reality (AR) player terminal, or the like.
Please refer to fig. 1, which is a flowchart illustrating a method for displaying a notification message according to an exemplary embodiment of the present application. The method for displaying the notification message can be applied to the terminal. In fig. 1, a method of displaying a notification message includes:
step 110, when the terminal displays the user interface of the target application in a full screen mode and receives an instruction for displaying the notification message, acquiring a notification element corresponding to the notification message; the notification element is used for displaying the message content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element.
In the embodiment of the present application, the terminal may invoke a system service or system application to perform step 110. The system application or system service can monitor whether the user interface of the target application is displayed in a full screen mode in a screen of the terminal. In addition, the system application or system service may also monitor that the terminal receives an instruction to display a notification message. When the system application or the system service displays the user interface of the target application in a full screen mode on the terminal and receives an instruction for displaying the notification message, the notification element corresponding to the notification message is obtained. The notification is originally used for displaying the display content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element.
It should be noted that, in the embodiment of the present application, the terminal can provide a switch for optimizing the display of the banner and the dialog box in the setting interface, and the switch may be named as "banner and dialog box optimized display". When the user turns on the switch, the terminal enables the optimization function of the scroll and the dialog box, and then the terminal can implement the scheme. In another possible implementation manner, the terminal starts the optimization function of the banner and the dialog box by default, and the user does not need to set the optimization function in the setting interface.
And step 120, acquiring a display template corresponding to the notification element.
In the embodiment of the application, the terminal can obtain the display template corresponding to the notification element.
Optionally, the system service or the system application in the terminal can obtain the display template corresponding to the notification element according to the number, the display area, and/or the type of the notification element.
In a possible manner, the terminal may search for a completely matched display template according to all the acquired notification elements. For example, all notification elements acquired by the terminal include one notification title, one notification content, and two notification buttons. The terminal determines only a display template capable of simultaneously displaying one notification title, one notification content, and two notification buttons as a display template that exactly matches the notification element.
In another possible manner, the terminal may find a matching display template according to some of the acquired notification elements, for example, all the notification elements acquired by the terminal include a notification title "colleague a", a notification content "personnel group leader" and two notification buttons, where the two notification buttons are an "answer button" and a "reject button", respectively. The terminal may determine a display template capable of displaying the notification title and the two notification buttons as the display template corresponding to the notification element, only according to the notification title and the two notification buttons matching the display template in the notification element. Therefore, in the matching mode, the terminal matches the display template corresponding to the display element according to the number and the type of the notification elements.
In a possible implementation manner, the terminal may further select a corresponding display template according to the display area of the notification element. For example, the width and display font size of the display template are determined, the text of the notification content may be determined by the number of lines. When the text of the notification content is not greater than the line number threshold, the terminal will select the display template without the notification content expansion button. When the text of the notification content is larger than the line number threshold, the terminal selects a display template with a notification content expansion button.
For example, please refer to fig. 2, which is a schematic diagram of a notification display box corresponding to a display template provided based on the embodiment shown in fig. 1. In fig. 2, a notification title 211, a notification content 212, and a notification button 213 are included in the notification display frame 21. The notification display frame 22 includes a notification title 221, notification contents 222, a notification button 223, and a notification content expansion button 224. When the line number of the display content in the display element does not exceed 2 lines, the terminal determines that the notification display frame 21 is a display template corresponding to the display element. When the number of lines of the display content of the display element exceeds 2 lines, the terminal determines that the notification display frame 22 is a display template corresponding to the display element. When the notification content expansion button 224 is triggered by the user clicking, the terminal expands the frame of the notification content 222 and displays the complete content of the notification content.
It should be noted that the screen of the terminal shown in fig. 2 is displaying the user interface of the target application in full screen.
In another possible implementation manner, the terminal may still notify the display frame 21 to determine as the display template corresponding to the display element when the number of lines of the display content of the display element exceeds 2 lines. However, an ellipsis "…" is displayed at the end of the notification content 222, indicating that some of the notification content 222 is not displayed.
It should be noted that before the system service or the system application obtains the display template corresponding to the notification element according to the number, the display area, and/or the type of the notification element, the corresponding target template library can be determined according to the application identifier of the target application. For example, please refer to table one.
Watch 1
Application identification Game a Game b Video application c Live application d
Object template library Template library A Template library A Template library B Template library C
In the present application, the application identifier may be an installation package name of the application. Such as "game a", "game b", "video app c", or "live app c" in table one. In one possible implementation, the installation package name may be implemented in the form of "com. Different application identifications may correspond to the same target template library, for example, game a and game b both correspond to target template library "template library a".
After the target template library is determined, the terminal can acquire the display template corresponding to the notification element from the target template library according to the number, the display area and/or the type of the notification element.
And step 130, generating a notification display frame containing the notification elements according to the display template, wherein the notification display frame is a display frame with a transparent or semitransparent background.
In the embodiment of the application, a system service or a system application in the terminal generates a notification display frame containing notification elements according to a display template, wherein the notification display frame is a display frame with a transparent or semi-transparent background. The terminal system service or the system application typesets the display elements to preset positions in the display template, and can adjust texts in the display elements according to preset parameters such as fonts, word sizes, whether the fonts are bold and underline and the like set in the display template. Meanwhile, the system service or system application can adjust the picture in the display element according to parameters such as preset resolution and picture size. In addition, the system service or system application can generate a new notification button according to a preset button size and a button shape. The system service lays out the notification elements that need to be added to the notification display box to the place indicated by the display template.
For example, the notification elements include a notification title T1, a notification content T2, a notification button T3, and a notification button T4. The display template corresponding to the notification element determined by the system service or the system application is provided with positions for displaying the notification title T1, the notification button T3, and the notification button T4. In this scenario, the system service or system application will adjust the notification title T1 according to the text parameters and picture parameters, etc. preset by the display template, and simultaneously generate new notification buttons corresponding to the notification button T3 and the notification button T4, respectively, according to the preset button size and button shape.
At step 140, a notification display box is displayed in the user interface of the target application.
In an embodiment of the application, a system service or system application displays a notification display box in a user interface of a target application.
In a possible implementation manner, please refer to fig. 3, which is a schematic diagram of a display notification display box provided based on the embodiment shown in fig. 1. In fig. 3, the notification display frame 31 is a display frame whose background is translucent. Also, the notification display frame 31 is displayed on the top area 33 of the user interface 32, the top area 33 being adjacent to the edge of the user interface 32. Therefore, the notification display frame 31 can display the notification elements that need to be displayed therein with as little obstruction as possible of the user interface 32. In the notification display frame 31, a notification title 311, a notification content 312, and a notification button 313 are displayed.
Optionally, in another possible implementation manner, please refer to fig. 4, which is a schematic diagram of another display notification display frame provided based on the embodiment shown in fig. 1. In the notification display frame 41, a notification content 411, a notification button 412, and a notification button 413 are displayed.
In summary, in an implementation of the method for displaying a notification message provided in this embodiment, the terminal can be enabled to display a user interface of the target application in a full screen, and when an instruction to display the notification message is received, each notification element in the notification message is displayed by displaying a notification display frame with a transparent or semi-transparent background, where the notification element is a message content for displaying the notification message, or the notification message may also be a message content for receiving a control instruction. Therefore, on the premise of ensuring timely display of the notification message, the embodiment of the application can reduce the shielding of the user interface of the target application and improve the effect of simultaneously displaying the notification message and the user interface of the target application.
In connection with the above embodiment, the terminal can also control the display manner of the notification display frame according to the type of the notification message, and in detail, the following embodiments may be referred to.
Please refer to fig. 5, which is a flowchart illustrating a method for displaying a notification message according to another exemplary embodiment of the present application. The method for displaying the notification message can be applied to the terminal. In fig. 5, the method of displaying a notification message includes:
step 501, when the terminal receives an instruction for displaying a notification message, detecting whether the notification message contains a target mark.
In the embodiment of the application, the target mark is used for indicating that a notification display frame corresponding to the notification message is displayed in a user interface of the target application.
Step 502, when the notification message includes the target mark and the terminal displays the user interface of the target application in a full screen mode, acquiring a notification element in the notification message.
In the embodiment of the application, if the system service or the system application detects that the system message contains the target mark and the terminal displays the user interface of the target application in a full screen mode, the notification element in the notification message is acquired. Wherein the target mark may be a specific identifier.
Optionally, in another possible implementation manner of the embodiment of the present application, the system service or the system application may further detect a target identification bit to determine whether to acquire the notification element in the notification message, where the target identification bit is a binary digit, and a value of the target identification bit is a first value or a second value. And when the target identification position in the notification message is a first numerical value and the terminal displays the user interface of the target application in a full screen mode, acquiring a notification element in the notification message. Alternatively, when the first value is 1, the second value may be 0. When the first value is 0, the second value may be 1.
Step 503, acquiring a display template corresponding to the notification element.
In this embodiment, the execution process of step 503 is the same as the execution process of step 120, and is not described again.
Step 504, generating a notification display frame containing the notification element according to the display template, wherein the notification display frame is a display frame with a transparent or semitransparent background.
In this embodiment, the execution process of step 504 is the same as the execution process of step 130, and is not described again.
Step 505, a notification display box is displayed in a user interface of the target application.
In this embodiment, the execution process of step 505 is the same as the execution process of step 140, and is not described again.
Step 506, detecting the type of the notification message, wherein the type of the notification message comprises a notification bar notification message and a popup notification message.
In an embodiment of the application, a system service or a system application can detect the type of a notification message, wherein the type of the notification message comprises a notification bar notification message and a popup notification message.
In one aspect, the notification bar message is a message belonging to a system application or a third party application that disappears after being displayed at the top of the user interface for a predetermined length of time and resides in the notification bar. For example, notification messages such as news information of third party applications, new message reminders sent by contacts, and system spam alerts can be used as notification bar notification messages.
Alternatively, the pop-up notification message may be a notification issued by an application having a higher system authority. Since the pop-up notification message is displayed in the center of the screen, in the present application, the operating system of the terminal generally does not grant the authority to issue the pop-up notification message to the third-party application. In one possible implementation, the system application or system service grants the authority to issue the pop-up notification message to the critical system service, and performs the important system notification. For example, in one possible implementation, the critical system service may display important system notification messages such as insufficient power, full memory, and bluetooth pairing notifications via pop-up system messages.
After performing the completion step 506, the terminal determines to perform the steps 507 and 508 or perform the steps 509 and 510 according to the execution result.
And step 507, when the notification message is a notification message of the notification bar, setting a timer with a timing duration being a preset duration.
And step 508, hiding the notification display frame when the timer is overtime.
In the embodiment of the application, when the notification bar notifies the message, the system service or the system application sets the timer with the set timing duration as the preset duration. When the timer times out, the system service or system application will hide the notification display box. Avoiding the notification display frame from residing for a long time and blocking the user interface of the target application.
In step 509, when the notification message is a pop-up notification message, it is detected whether a control command is received.
It should be noted that the system service or the system application will detect whether the terminal receives the control instruction when the notification message is a pop-up notification message.
And step 510, hiding the notification display frame when the control instruction is received.
In the embodiment of the present application, the information carried in the pop-up notification message is usually important. Thus, when no control instruction is received, the system service or system application will continue to display the notification display frame until the control instruction is received, the system service or system application will hide the notification display frame. For example, in the user interface shown in fig. 4, when the terminal receives a control instruction acting on the notification button 413, the system service or the system application will hide the notification display frame. That is, when the notification button 413 "knows" is clicked, the terminal will directly hide the notification display frame 41.
In summary, in the method for displaying a notification message provided in this embodiment, when the terminal receives an instruction to display the notification message, it is detected whether the notification message includes a target mark, when the notification message includes the target mark and the terminal displays a user interface of a target application in a full screen manner, a notification element in the notification message is acquired, a display template corresponding to the notification element is acquired, a notification display frame including the notification element is generated according to the display template, the notification display frame is a display frame whose background is transparent or translucent, the notification display frame is displayed in the user interface of the target application, and a type of the notification message is detected, where the type of the notification message includes a notification bar notification message and a pop-up window notification message.
On one hand, when the notification message is a notification bar notification message, a timer with a timing duration being a preset duration is set, and when the timer is overtime, the notification display frame is hidden. Therefore, the terminal can display and display the transparent or semitransparent notification display frame within the preset time length when the notification message contains the target mark and the user interface of the target application is displayed in a full screen mode. Therefore, the embodiment of the application reduces the shielding of the current user interface on the premise of ensuring the timely display of the notification message.
On the other hand, when the notification message is a pop-up notification message, the system service or the system application detects whether a control instruction is received, and when the control instruction is received, hides the notification display frame. Therefore, the popup notification message can be continuously displayed when the terminal does not receive the control instruction and is hidden after the terminal receives the control instruction, so that the shielding of the user interface of the target application is reduced on the premise of ensuring the display of the important message, and the effect of simultaneously displaying the notification message and the user interface of the target application is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Please refer to fig. 6, which is a block diagram illustrating an apparatus for displaying a notification message according to an exemplary embodiment of the present application. The means for displaying the notification message may be implemented as all or part of the terminal in software, hardware, or a combination of both. The device includes:
the element obtaining module 610 is configured to obtain a notification element corresponding to a notification message when the terminal displays a user interface of a target application in a full screen manner and receives an instruction for displaying the notification message; the notification element is configured to display a message content of the notification message, and/or the notification element is configured to receive a control instruction, where the control instruction is used to instruct the terminal to execute an operation corresponding to the notification element.
A template obtaining module 620, configured to obtain a display template corresponding to the notification element.
A display frame generating module 630, configured to generate a notification display frame including the notification element according to the display template, where the notification display frame is a display frame with a transparent or semi-transparent background.
A display frame display module 640, configured to display the notification display frame in the user interface of the target application.
In an optional embodiment, the template obtaining module 620 is configured to obtain a display template corresponding to the notification element according to the number, the display area, and/or the type of the notification element.
In an optional embodiment, the apparatus further includes an execution module, where the execution module is configured to determine a corresponding target template library according to the application identifier of the target application. The template obtaining module 620 is configured to obtain, according to the number, the display area, and/or the type of the notification elements, a display template corresponding to the notification elements from the target template library.
In an alternative embodiment, the notification element comprises: at least one of a notification title, notification content, a notification button, and a notification dialog.
In an optional embodiment, the element obtaining module 610 is configured to, when the terminal receives an instruction to display a notification message, detect whether the notification message includes a target mark, where the target mark is used to indicate that the notification display frame corresponding to the notification message is displayed in a user interface of the target application; and when the notification message contains the target mark and the terminal displays the user interface displaying the target application in a full screen mode, acquiring the notification element in the notification message.
In an optional embodiment, the execution module is configured to set a timer with a preset time duration when the notification message is a notification message of the notification bar; and when the timer is overtime, hiding the notification display frame.
In an optional embodiment, the execution module is configured to detect whether the control instruction is received when the notification message is a pop-up notification message; and hiding the notification display frame when the control instruction is received.
In an alternative embodiment, the display box display module 640 is configured to display the notification dialog in a top area of the user interface, where the top area is an area abutting an upper edge of the user interface.
Referring to fig. 7, which is a block diagram illustrating a terminal according to an exemplary embodiment of the present application, as shown in fig. 7, the terminal includes a processor 710, a memory 720 and a display screen assembly 730, where the memory 720 stores at least one instruction, and the instruction is loaded and executed by the processor 710 to implement the method for displaying a notification message according to the above embodiments.
The embodiment of the present application further provides a computer-readable medium, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for displaying a notification message according to the above embodiments.
The present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the method for displaying a notification message according to the above embodiments.
It should be noted that: in the method for displaying notification messages, the screen recording device provided in the above embodiment is only illustrated by dividing the functional modules, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus for displaying a notification message and the method for displaying a notification message provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method of displaying a notification message, the method comprising:
when a terminal displays a user interface of a target application in a full screen mode and receives an instruction of displaying a notification message, acquiring a notification element corresponding to the notification message; the notification element is used for displaying the message content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element;
acquiring a display template corresponding to the notification elements according to the number, the display area and/or the type of the notification elements;
generating a notification display frame containing the notification elements according to the display template, wherein the number, the display area and/or the type of the notification elements in the notification display frame are set according to the display template, the notification display frame is a display frame with a transparent or semi-transparent background, and the transparency of the background is determined according to the type of the target application;
displaying the notification display box in a user interface of the target application.
2. The method according to claim 1, wherein before the obtaining of the display template corresponding to the notification element according to the number, the display area and/or the type of the notification element, the method further comprises:
determining a corresponding target template library according to the application identifier of the target application;
the obtaining of the display template corresponding to the notification element according to the number, the display area and/or the type of the notification element includes:
and acquiring a display template corresponding to the notification element from the target template library according to the number, the display area and/or the type of the notification element.
3. The method of claim 1, wherein the notification element comprises: at least one of a notification title, notification content, a notification button, and a notification dialog.
4. The method according to claim 1, wherein when the terminal displays the user interface of the target application in a full screen mode and receives an instruction for displaying a notification message, acquiring a notification element corresponding to the notification message, comprises:
when the terminal receives an instruction for displaying a notification message, detecting whether the notification message contains a target mark, wherein the target mark is used for indicating that a notification display frame corresponding to the notification message is displayed in a user interface of the target application;
and when the notification message contains the target mark and the terminal displays the user interface displaying the target application in a full screen mode, acquiring the notification element in the notification message.
5. The method of any of claims 1 to 4, wherein the notification message is a notification bar notification message, the method further comprising:
a timer for setting the timing duration to be a preset duration;
and when the timer is overtime, hiding the notification display frame.
6. The method of any of claims 1 to 4, wherein the notification message is a pop-up notification message, the method further comprising:
detecting whether the control instruction is received;
and hiding the notification display frame when the control instruction is received.
7. The method of any of claims 1 to 4, wherein displaying the notification display box in the user interface of the target application comprises:
displaying the notification dialog box in a top region of the user interface, the top region being a region abutting an upper edge of the user interface.
8. An apparatus for displaying a notification message, the apparatus comprising:
the element acquisition module is used for acquiring a notification element corresponding to a notification message when a user interface of a target application is displayed on the full screen of the terminal and an instruction for displaying the notification message is received; the notification element is used for displaying the message content of the notification message, and/or the notification element is used for receiving a control instruction, and the control instruction is used for instructing the terminal to execute the operation corresponding to the notification element;
the template acquisition module is used for acquiring a display template corresponding to the notification element according to the number, the display area and/or the type of the notification element;
a display frame generating module, configured to generate a notification display frame including the notification elements according to the display template, where the number, display area, and/or type of the notification elements in the notification display frame are set according to the display template, the notification display frame is a display frame with a transparent or semi-transparent background, and the transparency of the background is determined according to the type of the target application;
and the display frame display module is used for displaying the notification display frame in the user interface of the target application.
9. A terminal, characterized in that the terminal comprises a processor and a memory, in which at least one instruction is stored, which is loaded and executed by the processor to implement the method of displaying a notification message according to any of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement a method of displaying notification messages according to any of claims 1 to 7.
CN201810697712.1A 2018-06-29 2018-06-29 Method, device, terminal and storage medium for displaying notification message Active CN109005283B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810697712.1A CN109005283B (en) 2018-06-29 2018-06-29 Method, device, terminal and storage medium for displaying notification message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810697712.1A CN109005283B (en) 2018-06-29 2018-06-29 Method, device, terminal and storage medium for displaying notification message

Publications (2)

Publication Number Publication Date
CN109005283A CN109005283A (en) 2018-12-14
CN109005283B true CN109005283B (en) 2021-05-14

Family

ID=64601013

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810697712.1A Active CN109005283B (en) 2018-06-29 2018-06-29 Method, device, terminal and storage medium for displaying notification message

Country Status (1)

Country Link
CN (1) CN109005283B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726456B (en) * 2019-03-22 2022-01-18 腾讯科技(深圳)有限公司 Data processing method and related device
CN109933403B (en) * 2019-03-27 2024-01-09 努比亚技术有限公司 Immersion interface detection method and device, intelligent terminal and readable storage medium
CN110069233B (en) * 2019-04-10 2022-12-13 广州小鹏汽车科技有限公司 Method and device for controlling display of application notification adaptive to vehicle-mounted system and vehicle
CN110989833B (en) * 2019-11-25 2021-10-22 联想(北京)有限公司 Control method, AR device and computer readable storage medium
CN111614972A (en) * 2020-05-27 2020-09-01 网易(杭州)网络有限公司 System message processing method and device for live application
CN112199255A (en) * 2020-10-15 2021-01-08 Oppo广东移动通信有限公司 Authority use monitoring method, device, equipment and storage medium
CN115348354B (en) * 2021-05-14 2024-09-13 Oppo广东移动通信有限公司 Content display control method and device, electronic equipment and storage medium
CN113190420B (en) * 2021-05-31 2023-04-07 维沃移动通信(杭州)有限公司 Electric quantity prompting method and device
CN113596238B (en) * 2021-07-29 2024-02-13 维沃移动通信有限公司 Information display method, device, electronic equipment and medium
CN113805760A (en) * 2021-09-24 2021-12-17 维沃移动通信有限公司 Interface display method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105635442A (en) * 2015-12-18 2016-06-01 北京奇虎科技有限公司 Method and apparatus for displaying message on mobile terminal
CN107734186A (en) * 2017-10-31 2018-02-23 奇酷互联网络科技(深圳)有限公司 Method, equipment, mobile terminal and the computer-readable storage medium of prompting message
CN107948406A (en) * 2017-11-14 2018-04-20 维沃移动通信有限公司 message display method and device
CN108111675B (en) * 2017-12-13 2020-06-02 维沃移动通信有限公司 Notification message processing method and device and mobile terminal

Also Published As

Publication number Publication date
CN109005283A (en) 2018-12-14

Similar Documents

Publication Publication Date Title
CN109005283B (en) Method, device, terminal and storage medium for displaying notification message
US10499109B2 (en) Method and apparatus for providing combined barrage information
CN109753326B (en) Processing method, device, equipment and machine readable medium
CN113194349B (en) Video playing method, comment device, equipment and storage medium
US11924485B2 (en) Method and system of displaying a video
TW201923630A (en) Processing method, device, apparatus, and machine-readable medium
CN107357544B (en) Display method, display device, intelligent terminal and computer readable storage medium
CN106933527A (en) A kind of display control method of mobile terminal, device and mobile terminal
CN112162807A (en) Function execution method and device
CN111124564A (en) Method and device for displaying user interface
CN111767554A (en) Screen sharing method and device, storage medium and electronic equipment
CN113177190A (en) Document content sharing method and electronic equipment
CN113052619B (en) Advertisement making method and device
US20170351650A1 (en) Digital conversation annotation
CN114265525A (en) Text selection method and device, electronic equipment and readable storage medium
CN112688859B (en) Voice message sending method and device, electronic equipment and readable storage medium
CN107733777B (en) Third party information notification method, system and computer readable storage medium
TW201918858A (en) Processing method, device, apparatus, and machine-readable medium
CN113220179A (en) Sidebar display method and device, terminal and storage medium
US10613622B2 (en) Method and device for controlling virtual reality helmets
CN109683726A (en) Characters input method, device, electronic equipment and storage medium
CN110221756B (en) Method, device, terminal and storage medium for processing application data
CN115328595A (en) Message card generation method and device, electronic equipment and storage medium
CN113805709A (en) Information input method and device
US20210165568A1 (en) Method and electronic device for configuring touch screen keyboard

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