A method for displaying notification message and electronic device
By distinguishing preset application types and preset message types in electronic devices and displaying important notification messages on the lock screen interface, the problem that users in the prior art cannot perceive important notification messages in a timely manner is solved, and the user experience is improved.
Patent Information
- Application Number
- CN202410544743.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-04-30
AI Technical Summary
While avoiding the interference of application notification messages on users, the prior art cannot effectively ensure that users are aware of important notification messages in a timely manner, resulting in message omissions and user experience degradation.
By implementing a method of displaying notification messages in an electronic device, distinguishing between preset application types and preset message types, only corresponding important notification messages are displayed on the lock screen interface, even if their notification level is set to a silent level.
It effectively avoids the interference of frequently pushing notification messages to users by the application, and ensures that users are aware of important notification messages in a timely manner, improving user experience.
Smart Images

Figure CN118433300B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic technology, and in particular to a method of displaying a notification message and an electronic device. Background Art
[0002] With the continuous development of electronic devices (such as mobile phones) and the gradual enrichment of applications (APPs), more and more applications are installed in electronic devices. In order to achieve different business purposes, various applications always push notification messages frequently, which brings a lot of trouble to users.
[0003] At present, in order to avoid the notification messages of various applications from disturbing the user, the user can set the notification messages of the applications that he does not care about as silent notifications. In this way, when the electronic device receives the notification message of the application, the notification is only displayed in the pull-down notification bar of the electronic device without obvious visual and sound prompts, which can avoid disturbing the user. However, this will cause the user to miss the message, which has a certain impact on the user. Summary of the invention
[0004] The present application provides a method for displaying notification messages and an electronic device, which can avoid disturbing users by frequently pushing notification messages by applications, and can enable users to perceive important notification messages in a timely manner, thereby improving user experience.
[0005] In a first aspect, the present application provides a method for displaying a notification message, which is executed by an electronic device, and the method includes: a first application generates a first notification message; the first application does not belong to a preset application type, and / or the type of the first notification message does not belong to a preset message type, and the notification level corresponding to the first notification message is set to the first level; the notification level of any notification message is the first level, which is used to indicate that any notification message is not displayed in a lock screen state; when the screen state of the electronic device is in a lock screen state, the first notification message is not displayed; a second application generates a second notification message; the second application belongs to a preset application type, and the type of the second notification message belongs to a preset message type, and the notification level corresponding to the second notification message is set to the first level; when the screen state of the electronic device is in a lock screen state, in response to the second notification message, the second notification message is displayed.
[0006] Optionally, the notification level may include a silent level, a non-silent level, etc. The first level is also called the silent level. Generally, after the notification level of a notification message is set to the silent level, the notification message will not be displayed when the screen is in a locked screen state. Among them, when the notification level of any notification message is set to the first level, any notification message will not be displayed in the locked screen state. For example, when the notification level of a missed call notification message is set to the first level, the missed call notification message will not be displayed in the locked screen state. For example, when the notification level of a new email reminder message is set to the first level, the new email reminder message will not be displayed in the locked screen state.
[0007] The preset application type can be understood as a pre-set application type that is more important to the user. The preset message type can be understood as a pre-set message type that is more important to the user. Based on the method of the first aspect, the first application does not belong to the preset application type, indicating that the first application does not belong to a more important application, and the type of the first notification message does not belong to the preset message type, indicating that the first notification message does not belong to a more important type of message. Therefore, when the first application generates a first notification message with a notification level of the first level, the first notification message is not displayed on the lock screen interface. The second application belongs to the preset application type and the type of the second notification message belongs to the preset message type, indicating that the second notification message is a more important type of message sent by a more important application. Therefore, when the second application generates a second notification message with a notification level of the first level, the second notification message is displayed on the lock screen interface. In this way, for a more important type of message sent by a pre-set, more important application, even if the notification level corresponding to the message type is set to the first level, the notification message can be displayed on the lock screen interface, so that the user can notice the message in time and prevent the user from missing important notification messages.
[0008] In a possible implementation, after the second notification message is displayed, the method for displaying the notification message further includes: receiving a first operation from the user; in response to the first operation, the screen state of the electronic device is switched to an unlocked state, and a first interface is displayed, and the first interface does not include the second notification message.
[0009] Based on this possible implementation method, when the screen state of the electronic device is not in the locked screen state, the second notification message is not displayed, which can enable the user to perceive the first level notification message in time and reduce interference to the user, providing a better user experience.
[0010] In a possible implementation, after the second notification message is displayed, the notification message display method further includes: receiving a second operation of the user; in response to the second operation, displaying a second interface, the second interface is used to display notification information, and the second interface includes the second notification message.
[0011] Based on this possible implementation method, when the current interface of the electronic device is switched to the second interface, the second notification message is still displayed on the second interface, and the user can be reminded to process the second notification message in a timely manner.
[0012] In a possible implementation, the method for displaying the above-mentioned notification message also includes: the second application generates a third notification message; the third notification message does not belong to the preset message type, and the notification level corresponding to the third notification message is set to the first level; when the screen status of the electronic device is in the lock screen state, the third notification message is not displayed.
[0013] Based on this possible implementation, for the same application, for notification messages of a type that is less concerned, when the notification level of the notification message is the first level, the notification message will not be displayed on the lock screen interface. In this way, interference to the user can be reduced and the user experience is better.
[0014] In a possible implementation, the above-mentioned display of the second notification message in response to the second notification message when the screen status of the electronic device is in the lock screen state includes: in response to the second notification message, determining that the notification level corresponding to the second notification message is the first level, and the screen status of the electronic device is the lock screen state, and the second application belongs to a preset application type, and the type of the second notification message belongs to a preset message type, and displaying the second notification message.
[0015] In a possible implementation, the above-mentioned notification message display method also includes: in response to a second notification message, determining whether the notification level corresponding to the second notification message is the first level; if the notification level corresponding to the second notification message is the first level, determining whether the screen status of the electronic device is a lock screen status; if the screen status of the electronic device is a lock screen status, determining whether the second application belongs to a preset application type; if the second application belongs to the preset application type, determining whether the type of the second notification message belongs to the preset message type; if the type of the second notification message belongs to the preset message type, determining that the notification level corresponding to the second notification message is the first level, and the screen status of the electronic device is a lock screen status, and the second application belongs to the preset application type, and the type of the second notification message belongs to the preset message type.
[0016] Based on this possible implementation, when an electronic device receives a notification message, if the notification level corresponding to the message type of the notification message is the first level, and the current screen state of the electronic device is the lock screen state, the application to which the notification message belongs is a preset application type, and the message type of the notification message is a preset message type, then the notification message is displayed on the lock screen interface. In this way, for a message of a relatively important type sent by a pre-set, relatively important application, even if the notification level corresponding to the message type is set to the silent level, the notification message can be displayed on the lock screen interface, so that the user can notice the message in time and prevent the user from missing important notification messages.
[0017] In one possible implementation, the above-mentioned determination of whether the second application belongs to a preset application type includes: determining whether the second application is in a preset application whitelist; if the second application is in the preset application whitelist, determining that the second application belongs to the preset application type; if the second application is not in the preset application whitelist, determining that the second application does not belong to the preset application type.
[0018] Based on this possible implementation, a preset application whitelist is pre-configured according to the needs, and by judging whether the application to which the notification message belongs is in the preset application whitelist, it is possible to more accurately and quickly judge whether the application to which the notification message belongs is of the preset application type. In addition, the user does not need to manually set the notification level and reminder method for each application separately, which simplifies the operation process and provides a better user experience.
[0019] In a possible implementation, each preset message type corresponds to a preset channel information, and the preset channel information is the information of the communication channel used to transmit the notification message of the preset message type; the above-mentioned determination of whether the type of the second notification message belongs to the preset message type includes: obtaining the channel information of the second notification message; if the channel information of the second notification message is the preset channel information, determining that the type of the second notification message belongs to the preset message type; if the channel information of the second notification message is not the preset channel information, determining that the type of the second notification message does not belong to the preset message type.
[0020] Based on this possible implementation method, the message type is characterized by multiplexing channel information, without setting the message type separately, simplifying the algorithm logic and improving the algorithm operation efficiency.
[0021] In a possible implementation, the method for displaying the above-mentioned notification message also includes: when the notification level corresponding to the second notification message is the first level, if the screen state of the electronic device is not a locked screen state, or the second application does not belong to the preset application type, or the type of the second notification message does not belong to the preset message type, then intercepting the second notification message.
[0022] Based on this possible implementation method, the preset application type and the preset message type are set according to needs. In this way, when the notification level of the notification message is the first level, if the application to which the notification message belongs does not belong to the preset application type or the type of the notification message does not belong to the preset message type, the notification message will not be displayed on the lock screen interface, which can reduce disturbance to the user and improve the user experience.
[0023] In a second aspect, the present application provides a device, which is included in an electronic device, and the device has the function of implementing the electronic device behavior in the above-mentioned first aspect and the possible implementation of the above-mentioned first aspect. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a generation module or unit, a display module or unit, a receiving module or unit, a processing module or unit, etc.
[0024] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution of the first aspect.
[0025] In a fourth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.
[0026] Optionally, the chip also includes memory, which is connected to the processor via circuitry or wires.
[0027] Further optionally, the chip further includes a communication interface.
[0028] In a fifth aspect, the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect.
[0029] In a sixth aspect, the present application provides a computer program product, the computer program product comprising: a computer program code, when the computer program code runs on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of interface changes corresponding to an application notification level setting process provided by the embodiment of this application;
[0031] Figure 2 It is a schematic diagram of an example of electronic devices pushing notification messages of different notification levels provided by the embodiment of this application;
[0032] Figure 3 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0033] Figure 4 It is a software structure block diagram of the electronic device provided by the embodiment of this application;
[0034] Figure 5 It is a module interaction diagram corresponding to an example of the notification message display method provided by the embodiment of the present application;
[0035] Figure 6 It is a diagram of interface changes corresponding to another example of the notification level setting process of the application program provided by the application embodiment;
[0036] Figure 7 It is a schematic diagram of an example notification and status bar interface provided by the embodiment of this application;
[0037] Figure 8 It is a scene diagram of an example of a notification message display method provided by the embodiment of the present application;
[0038] Fig. 9 It is a flow diagram of an example method for displaying notification messages provided by the embodiment of this application;
[0039] Fig.10 It is a flow diagram of another method for displaying notification messages provided by the embodiment of this application;
[0040] Fig.11 It is a structural diagram of an example of a notification message display device provided by the embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0042] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.
[0043] References to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in the specification of the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0044] The following describes the method of displaying the notification message provided by the embodiment of the present application.
[0045] With the continuous development of electronic technology, electronic devices have become a common tool in people's lives and work, and users often need to install various types of applications in electronic devices due to different needs. For example, electronic devices can be installed with phone applications, short message applications, instant messaging applications, social applications, and shopping applications. During the use of electronic devices, the applications installed on the electronic devices may receive some notification messages, and the electronic devices can push these notification messages to remind users of messages.
[0046] When an electronic device pushes a notification message of an application, it usually pushes the notification message of the application in different ways according to the notification level of the application. Among them, the notification level of the application can include a non-silent level and a silent level. If the notification level of the application is a non-silent level, the message is notified in a non-silent manner, that is, when the electronic device receives the notification message of the application, the electronic device will display the notification message of the application, such as the electronic device displays a banner notification of the application on the desktop, or the electronic device displays the notification message of the application on the lock screen interface; if the notification level of the application is a silent level, the message is notified in a silent manner, that is, when the electronic device receives the notification message of the application, the electronic device only displays the notification message of the application in the pull-down notification bar (i.e., notification center), and will not display the banner notification of the application on the desktop, nor will it display the notification message of the application on the lock screen interface.
[0047] During the use of electronic devices, users can set notification levels for each application installed in electronic devices according to their needs. Exemplary, Figure 1 An interface change diagram corresponding to the notification level setting process of an application program provided by an application embodiment is provided. Taking electronic devices as mobile phones as examples, Figure 1In (a), the user can enter the settings interface of the mobile phone by clicking the settings application icon 101 in the desktop, such as Figure 1 In (b). The settings interface may include notification and status bar options 102, and the user clicks the control to enter the notification and status bar interface, such as Figure 1 The notification and status bar interface may include a notification management list 103, which includes notification management controls corresponding to various applications installed on the mobile phone, such as a notification management control 104 for an instant messaging application A. When a user clicks the control, the user enters the notification management interface of the instant messaging application A, such as Figure 1 As shown in (d) in FIG. 1 . The notification management interface of the instant messaging application A may include a notification permission switch 105 and a silent notification switch 106. When the user turns on the notification permission switch 105, the electronic device may notify the notification message of the instant messaging application A. Figure 1 As shown in (d) in FIG. 1 , when the user turns on the notification permission switch 105 and does not turn on the silent notification switch 106, the notification level of the instant notification application is the default level (i.e., non-silent level). When the user turns on the silent notification switch 106, the notification level of the instant notification application is set to the silent level.
[0048] like Figure 1 As shown in 107 of (d) in FIG. 1, when the notification level is set to a non-silent level, the user can further select a reminder method, which includes a lock screen notification and a banner notification. In this way, when the electronic device receives a notification message from the application, it can display the notification message of the application in accordance with the reminder method selected by the user. For example, if the user selects the reminder method as a lock screen notification, when the electronic device receives a notification message from the application and the screen state of the electronic device is the lock screen state, the notification message is displayed on the screen, such as Figure 2 As shown in Figure (a).
[0049] When the notification level of an application is silent, the electronic device only displays the notification message of the application in the pull-down notification bar when receiving the notification message of the application. That is, if the user pulls down the top status bar of the electronic display screen, the electronic device displays the pull-down notification bar and displays the notification message of the application in the pull-down notification bar. However, in the locked screen state, the notification message of the application is not displayed on the screen. Figure 2 As shown in Figure (b).
[0050] In short, users can follow the application they do not pay attention to according to the needs Figure 1The method shown sets the notification level to a silent level, so that when the electronic device receives notification messages from these applications, only the notification messages of these applications will be displayed in the pull-down notification bar without obvious visual and sound prompts, which can avoid various applications frequently pushing notification messages to disturb users.
[0051] However, it is found in use that for some applications, there are some relatively important notification messages. When the user sets the notification level of a certain application to silent level, these important notification messages are only displayed in the pull-down notification bar without obvious visual and sound prompts, which will cause the user to be unable to perceive the notification message in time, resulting in the omission of relatively important notification messages, which affects the user.
[0052] In view of this, an embodiment of the present application provides a method for displaying notification messages, which can avoid the frequent push of notification messages by applications to disturb users, and at the same time enable users to perceive important notification messages in a timely manner, thereby improving user experience.
[0053] The following describes the electronic device applicable to the method of displaying the notification message provided by the present application and the specific process of the method in conjunction with the examples.
[0054] The notification message display method provided in the embodiment of the present application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) and other electronic devices that can install application programs (APP). The embodiment of the present application does not impose any restrictions on the specific type of electronic devices.
[0055] For example, Figure 31 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0056] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0057] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0058] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0059] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0060] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0061] Display screen 194, also referred to as display screen or screen, is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be an OLED display panel. In some embodiments, electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0062] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
[0063] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.
[0064] Figure 4 It is a software structure block diagram of the electronic device 100 of the embodiment of the present application. The hierarchical architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate through software interfaces. If Figure 4 As shown, in the embodiment of the present application, the Android system includes, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library (also referred to as a Native layer), and a kernel layer.
[0065] The application layer may include a series of application packages, which may include camera, gallery, calendar, call, short message, WLAN, instant messaging application (such as Whats APP) and other applications.
[0066] In this embodiment, the application layer also includes a system user interface APP. The system user interface APP is used to control the electronic device to display a user interface (UI). The user interface may include all graphical interface elements seen and used by the user when interacting with the electronic device, such as a status bar, a navigation bar, a notification bar, etc. Exemplarily, the user interface may include a desktop, a lock screen interface, a drop-down notification bar, a negative one screen, etc. Optionally, the system user interface APP is also used to control the electronic device to display notification messages of other applications.
[0067] The application layer also includes setting applications. Set the notification level for the notification message of each application to set various parameters of the electronic device.
[0068] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0069] like Figure 4 As shown, in an embodiment of the present application, the application framework layer may include a notification manager and a status management service, wherein the notification manager enables the application to display notification messages in the status bar, which can be used to convey notification-type messages and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify the completion of downloads, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc. Optionally, the notification manager can receive notification messages sent by the application and send the application's notification message to the system user interface APP, so that the system user interface APP determines whether to display the application's notification message.
[0070] The state management service is used to manage the state of the electronic device, including but not limited to the state of the screen. The state of the screen may include the screen on state, screen off state, screen locked state, etc. Optionally, the state management service may return the screen state of the electronic device to the system user interface APP upon receiving a screen state query request sent by the system user interface APP.
[0071] In addition, Figure 4 As shown, the application framework layer may also include a window manager, a content provider, a phone manager, a view system, and a resource manager. Among them, the window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data and make the data accessible to the application. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text notification icon may include a view for displaying text and a view for displaying pictures. The phone manager is used to provide communication functions for the electronic device 100. For example, the management of call status (including connected, hung up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, etc.
[0072] like Figure 4 As shown in Figure 1, Android runtime includes core library and virtual machine. Android runtime is responsible for scheduling and management of Android system. Core library consists of two parts: one is the function that Java language needs to call, and the other is Android core library.
[0073] like Figure 4 As shown, the system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), and an image processing library.
[0074] like Figure 4 As shown, the kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0075] For ease of understanding, the following examples of the present application will have Figure 3 and Figure 4 The electronic device with the shown structure is as an example, and in conjunction with the accompanying drawings and application scenarios, the method of displaying notification messages provided by the embodiment of the present application will be specifically explained.
[0076] It should be noted that the method for displaying notification messages provided in the embodiments of the present application is applied to display notification messages of applications, wherein the application may be any one of a phone application, a text message application, an instant messaging application, a social application, a calendar application, a shopping application, a settings application, a software store application, and the like. Accordingly, the notification message may be a message related to a certain business of the application sent by the application, which may be used to prompt the user to view the related business of the application. For example, when the application is a phone application, the notification message may be a missed call reminder message. When the application is a text message application, the notification message may be a reminder message of a newly received text message. When the application is a shopping application, the notification message may be a reminder message of product shipment. When the target application is a software store application, the notification message may be a reminder message of software download completion.
[0077] The following examples illustrate the following schematically using the example of an application as an instant communication application (such as Whats APP) and the notification message is a missed voice notification message of the instant communication application.
[0078] Figure 5 It is a module interaction diagram corresponding to an example of the method of displaying notification messages provided by the embodiment of the present application. It's understandable, Figure 5 The timing of execution of each step in the method for displaying the notification message is only one example and does not create any limitations on the order of execution of the action. If Figure 5 As shown, the method may include:
[0079] S501. The instant communication application of the application layer receives voice call requests sent by other electronic devices.
[0080] S502. When no answering operation is received from the user, the instant messaging application of the application layer sends a notification data packet to the notification manager of the application framework layer, wherein the notification data packet includes a missed voice notification message, an application identifier to which the missed voice notification message belongs, a message type of the missed voice notification message, and a notification level corresponding to the message type.
[0081] Missed voice notification message is used to prompt the user to have a voice call request from the instant messaging application that is not answered. For example, a missed voice notification message can be "You have a missed voice call".
[0082] In this embodiment, the application identifier to which the missed voice notification message belongs is the identifier of the instant application. Optionally, the application identifier can be the package name of the application. For example, taking the instant messaging application as Whats APP as an example, the application identifier to which the notification message belongs is com.whatsapp. Optionally, the application identifier can also be the name of the application, such as Whats APP.
[0083] It is understood that, in order to facilitate the management and differentiation of messages, each application may classify messages into different types according to functions or business requirements. Optionally, the message type of the notification message may include a first-level type and a second-level type, wherein the second-level type is a subtype of the first-level type. In other words, the first-level type and the second-level type jointly determine the message type of the notification message.
[0084] For example, even if the communication application is WhatsApp, the first level type of notification message may include: conversation record backup message, group notification message, key application reminder message, silent notification message, media playback message, etc. Among them, the second level type of silent notification message may include missed voice message and missed video message (that is, missed voice message and missed video message are subtypes of silent notification message type). That is to say, in this embodiment, the first level type of missed voice notification message is silent notification message, and the second level type is missed voice message.
[0085] For example, taking a social application as an example, the first-level types of notification message types include: system messages, instant messages, hot messages, etc. Among them, the second-level types of instant message types may include: comment messages, like messages, and private messages, etc. In this regard, taking a comment notification message as an example, the first-level type of the comment message is an instant message, and the second-level type is a comment message.
[0086] It is understood that the rules and ways of setting the message type of notification messages for each application are different, and the present application embodiment does not limit this.
[0087] In some embodiments, the message type can be characterized by a first-level type identifier and a second-level type identifier. In a possible implementation, the first-level type identifier can be a type name, a type number, etc. of the first-level type. The second-level type identifier is similar and will not be described in detail.
[0088] In another possible implementation, the identification of the first-level type can be represented by the channel information corresponding to the notification message. Among them, the notification channel corresponding to the notification message refers to the communication channel through which the electronic device sends the notification message. It should be noted that the application includes multiple first-level types of notification messages, and the electronic device can assign different notification channels to notification messages of different first-level types according to the first-level types of the notification messages, that is, there is a corresponding relationship between the first-level type of the notification message and the notification channel. Since there is a corresponding relationship between the first-level type of the notification message and the notification channel corresponding to the notification message, the first-level type can be represented by the channel information of the notification channel corresponding to the notification message.
[0089] The channel information may be, for example, a channel identification number (channel identification, channel ID or channel ID for short). For example, the first-level type of the missed voice notification message is a silent notification message, and the channel ID corresponding to the silent notification message is silent_notifications. Based on this, the first-level type of the missed voice notification message can be expressed as silent_notifications. For example, taking the application as a setting application and the notification message as a charging status notification message of the setting application as an example, the channel ID corresponding to the charging status notification message is SETTINGS_USB, and therefore the first-level type of the charging status notification message can be expressed as SETTINGS_USB. In this embodiment, the message type is characterized by multiplexing channel information, and there is no need to set the message type separately, which simplifies the algorithm logic and improves the algorithm operation efficiency.
[0090] The identification of the second level type can be represented by preset type information. For example, the second level type of the missed voice notification message may be represented as android.people.list.
[0091] As described in the above embodiments, the notification level may include a non-silent level and a silent level. In some embodiments, notification levels may be set separately for different message types. That is, each message type may correspond to a notification level. In this way, for the message to be notified, the electronic device may notify at the corresponding notification level according to the message type to which it belongs. For example, a missed voice notification message belongs to a silent notification message, and the notification level corresponding to the silent notification message is a non-silent level. When a missed voice notification message is received, the electronic device notifies the message through a banner notification or a lock screen notification.
[0092] Optionally, the notification level corresponding to each message type can be set by the application by default or can be set by the user according to the needs.
[0093] Figure 6An interface change diagram corresponding to the notification level setting process of another application provided by the application embodiment. Combined below Figure 6 , taking the electronic device as a mobile phone, the instant messaging application as Whats APP, and the notification message of the instant messaging application as a missed voice notification message as an example, the setting process of the notification level is schematically described.
[0094] Users can enter the settings interface of the phone by clicking the settings application icon, and enter the notification and status bar interface by clicking the notification and status bar options in the settings interface, such as Figure 6 (a) in the figure (for the specific operation process, please refer to Figure 1 Figure (a) to Figure 1 The notification and status bar interface may include a notification management list 601, in which the application options installed on the mobile phone are displayed, such as a Whats APP option 602. When the user clicks the Whats APP option 602, the notification management interface of the Whats APP is entered, such as Figure 6 As shown in (b) in the figure. The notification management interface of Whats APP may include various message type options, such as conversation record backup message option, group notification message option, key application reminder message option, silent notification message option 603, and media playback message option. The user can enter the silent notification message setting interface by clicking the silent notification message option 603, as shown in FIG. Figure 6 As shown in (c) in FIG. 1 . The setting interface of the silent notification message may include a notification permission switch 604 and a silent notification switch 605. When the user turns on the notification permission switch 604, the electronic device may notify the silent notification message. Figure 6 As shown in (c) in the figure, when the user turns on the allow notification switch 604 and does not turn on the silent notification switch 605, the notification level of the silent notification message is the default level (i.e., non-silent level). When the user turns on the silent notification switch 605, the notification level of the silent notification message is set to the silent level. When the notification level of the silent notification message is the silent level, the electronic device can determine whether to display the missed voice notification message based on the application to which the missed voice notification message belongs, the message type, and the screen status. In addition, the reminder method option, notification ringtone option, and allow disturbance switch are not displayed in the setting interface of the silent notification message, as shown in FIG. Figure 6 As shown in (d) in .
[0095] Optionally, in some embodiments, after setting notification levels for notification messages of various types of applications, the silent level notification messages of various applications may also be uniformly set. Figure 7As shown, the notification and status bar interface also includes a switch 701 for displaying silent notifications. When the user turns on the switch 701 for displaying silent notifications, silent-level notification messages of various applications can be displayed on the lock screen interface of the electronic device.
[0096] It is to be understood that the interface described in the embodiments of the present application is only an example and does not constitute a limitation of the embodiments of the present application.
[0097] The above introduces various types of data in the notification data packet. In some embodiments, the notification data packet of the missed voice notification message can be sent to the notification manager through the notification channel. Exemplarily, the code can be as follows:
[0098] Channel Info:pkg=com.whatsapp id=4importance=2channel Id=silent_notifications shortcut=null contentView=null extra=Bundle[{android.title=positive,android.reduced.images=true,android.subText=null,android.showChronometer=false,android.people.lis t=Supplier{VAL_LIST@256+252},android.text=Missed voice call,android.progress=0,android.progressMax=0,android.appInfo=ApplicationInfo{5f82dbd com.whatsapp},android.showWhen=true,android.largeIcon=null,android.infoText=null,android.progressIndeterminate=false,android.remoteInputHistory=null}]hnExtras=Bundle[EMPTY_PARCEL]
[0099] Among them, "pkg=com.whatsapp" is the package name of the application to which the voice notification message belongs, and it means that the application to which the voice notification message belongs is Whats APP;
[0100] "importance=2" is the notification level corresponding to the message type, which means that the notification level corresponding to the message type that does not receive the voice notification message is a silent level;
[0101] "channel Id=silent_notifications" can represent the first level type of the missed voice notification message, that is, the first level type of the missed voice notification message is the silent notification message type;
[0102] "android.people.list=Supplier{VAL_LIST@256+252}" can represent the second-level type of missed voice notification messages.
[0103] That is to say, as a possible implementation method, the application identifier, message type, and notification level corresponding to the message type can all be represented by the corresponding fields in the information sent through the notification channel. In this way, through the notification channel, the application identifier, message type, and notification level corresponding to the notification message to be judged in the subsequent steps can be sent to the system user interface APP together, which can improve data transmission efficiency.
[0104] It is understandable that the missed voice notification message in the embodiment of the present application is only used as an example and cannot constitute a limitation on the embodiment of the present application. For example, a data packet of a notification information can also be represented as follows:
[0105] notification=Notification(channel=DEVELOPER_IMPORTANT shortcut=null contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x2 color=0x00000000vis=PUBLIC).
[0106] S503. The notification manager of the application framework layer sends notification packets to the system user interface APP of the application layer.
[0107] Optionally, after receiving the notification packet sent by the instant communication application, the notification manager constructs the notification object based on the notification packet and sends the notification object to the system user interface APP.
[0108] S504. The system user interface APP of the application layer determines whether the notification level corresponding to the message type is the silent level. If the notification level corresponding to the message type is the silent level, step S505 is executed; otherwise, step S511 is executed.
[0109] Specifically, after receiving the notification data packet sent by the notification manager, the system user interface APP obtains the notification level corresponding to the message type from the notification data packet, and determines whether the notification level corresponding to the message type is the silent level.
[0110] Optionally, the system user interface APP reads the importance field in the notification data packet. When the value of the importance field is 1, it is judged that the notification level corresponding to the message type is a non-silent level. When the value of the importance field is 2, it is judged that the notification level corresponding to the message type is a silent level.
[0111] S505. The system user interface APP of the application layer obtains screen status from the state management service of the application framework layer.
[0112] The screen status is used to indicate the current screen status of the electronic device. Exemplary, the screen state may include a screen-on state, a screen-off state, and a screen-lock state.
[0113] Optionally, the system user interface APP may obtain the screen status through a status management service or by calling an application programming interface, and this embodiment of the present application does not impose any limitation on this.
[0114] S506. The system user interface APP of the application layer determines whether the screen state is a lock screen state. If the screen state is a lock screen state, then execute step S507, otherwise execute step S510.
[0115] Specifically, after acquiring the current screen state of the electronic device, the system user interface APP determines whether the current screen state of the electronic device is a lock screen state, that is, determines whether the current interface of the electronic device is a lock screen interface.
[0116] S507, the system user interface APP of the application layer determines whether the application to which the missed voice notification message belongs is a preset application. If it is determined that the application to which the missed voice notification message belongs is a preset application, step S508 is executed, otherwise step S510 is executed.
[0117] The preset application may be a pre-set application that allows messages to be displayed on the lock screen interface when the notification level is the silent level. The preset application may be pre-set by the system or by the user. The preset application may be understood as an application that is more important to the user. For example, instant messaging applications, phone applications, email applications, etc. are all applications that are more important to the user.
[0118] In some embodiments, it is determined whether the application to which the missed voice notification message belongs is a preset application by determining whether the application to which the missed voice notification message belongs is in the application whitelist. That is, the preset application may be an application included in the application whitelist. Optionally, the application whitelist may include one preset application or multiple preset applications. Exemplarily, the application whitelist may be a file in .xml format, and the application whitelist includes the package names of one or more preset applications.
[0119] In a possible implementation, the application identifier to which the missed voice notification message belongs is the package name of the application, and the application whitelist includes the package names of multiple preset applications. After the system user interface APP determines that the current screen state of the electronic device is the lock screen state, it can obtain the application whitelist, and compare the package name of the application to which the missed voice notification message belongs obtained from the notification data packet with the package name of each preset application in the application whitelist to determine whether the application to which the missed voice notification message belongs is in the application whitelist. If it is determined that the application to which the missed voice notification message belongs is in the application whitelist, it is determined that the application to which the missed voice notification message belongs is a preset application. If it is determined that the application to which the missed voice notification message belongs is not in the application whitelist, it is determined that the application to which the missed voice notification message belongs is not a preset application. In this embodiment, the application whitelist can be pre-configured according to the needs, and by determining whether the application to which the notification message belongs is in the application whitelist, it can be more accurately and quickly determined whether the application to which the notification message belongs is a preset application. In addition, the user does not need to manually set the notification level and reminder method for each application for the notification message that needs to display the silent level, which simplifies the operation process and provides a better user experience.
[0120] S508, the system user interface APP of the application layer determines whether the message type of the missed voice notification message is a preset type. If it is determined that the message type of the missed voice notification message is a preset type, step S509 is executed, otherwise step S510 is executed.
[0121] The preset type can be a pre-set message type corresponding to the notification message that is allowed to be displayed on the lock screen interface when the notification level is the silent level. The preset type can be pre-set by the application or the user. The preset type can be understood as a message type that is more important to the user. For example, a missed voice message is a message type that is more important to the user.
[0122] In a possible implementation, since the message type of the missed voice notification message may include a first level type and a second level type, the preset type may include a first preset type and a second preset type, and the second preset type is a subtype of the first preset type. Based on this, it is determined whether the message type of the missed voice notification message is a preset type, that is, it is determined whether the first level type of the missed voice notification message is the first preset type, and it is determined whether the second level type of the missed voice notification message is the second preset type; if the first level type of the missed voice notification message is the first preset type, and the second level type of the missed voice notification message is the second preset type, it is determined that the message type of the missed voice notification message is the preset type; if the first level type of the missed voice notification message is not the first preset type, and / or the second level type of the missed voice notification message is not the second preset type, it is determined that the message type of the missed voice notification message is not the preset type.
[0123] In another possible implementation, since the second-level type of the notification message is a subtype of the first-level type, and one second-level type corresponds to only one first-level type, when determining whether the message type of the missed voice notification message is a preset type, it is only necessary to determine whether the second-level type of the missed voice notification message is a second preset type. If the second-level type of the missed voice notification message is the second preset type, it is determined that the message type of the missed voice notification message is the preset type; if the second-level type of the missed voice notification message is not the second preset type, it is determined that the message type of the missed voice notification message is not the preset type. In this way, by determining whether the second-level type of the notification message is the second preset type, it is possible to determine whether the message type of the missed voice notification message is a preset type without determining whether the first-level type of the notification message is the first preset type. This can more accurately determine whether the message type of the missed voice notification message is a preset type, and can simplify the algorithm logic and improve the algorithm operation efficiency.
[0124] Exemplarily, when determining whether the second-level type of a missed voice notification message is the second preset type, the system user interface APP determines whether the notification data packet contains a field corresponding to the second preset type after receiving the notification data packet. If it is determined that the channel information contains a field corresponding to the second preset type, then it is determined that the message type of the missed voice notification message is the preset type; if it is not determined that the channel information does not contain a field corresponding to the second preset type, then it is determined that the message type of the missed voice notification message is not the preset type.
[0125] For example, a schematic illustration is given by the second preset type as android.people.list as an example. After the system user interface APP receives a notification packet, the notification packet can be represented as follows:
[0126] Channel Info:pkg=com.whatsapp id=4importance=2channel Id=silent_notifications_3shortcut=null contentView=null extra=Bundle[{android.title=positive,android.reduced.images=true,android.subText=null,android.showChronometer=false,android.people.lis t=Supplier{VAL_LIST@256+252},android.text=Missed voice call,android.progress=0,android.progressMax=0,android.appInfo=ApplicationInfo{5f82dbd com.whatsapp},android.showWhen=true,android.largeIcon=null,android.infoText=null,android.progressIndeterminate=false,android.remoteInputHistory=null}]hnExtras=Bundle[EMPTY_PARCEL]
[0127] The system user interface APP determines that the channel information carried by the communication message contains the "android.people.list" field, that is, the message type of the notification message is a preset type.
[0128] When the system user interface APP receives the next notification data packet, it obtains the channel information carried by the next communication message from the next notification data packet, where the channel information carried by the next communication message is:
[0129] Channel Info:pkg=com.android.settings id=1000002importance=1channelId=SETTINGS_USB shortcut=null contentView=null extra=Bundle[{android.title=Charging via USB,android.reduced.images=true,android.text=Click to see more options,android.appInfo=ApplicationInfo{cd058c0com.android.settings},android.showWhen=true}]hnExtras=Bundle[EMPTY_PARCEL]
[0130] The system user interface APP determines that the channel information carried by the communication message does not contain the "android.people.list" field, that is, the message type of the notification message is not a preset type.
[0131] In this embodiment, the user does not need to manually set the notification level and reminder method of each message type that needs to be displayed, which simplifies the operation process and has a better user experience.
[0132] S509, the system user interface APP of the application layer displays a missed voice notification message on the lock screen interface of the electronic device.
[0133] After determining that the message type of the missed voice notification message is the preset type, the system user interface APP obtains the missed voice notification message from the notification data packet and displays the missed voice notification message on the lock screen interface. Figure 8 In (a), the missed voice notification message "You have a missed voice call" is displayed on the lock screen interface of the electronic device.
[0134] S510, the system user interface APP of the application layer does not display missed voice notification messages.
[0135] Specifically, when the screen state of the electronic device is not in the lock screen state, and / or the application to which the missed voice notification message belongs is not a preset application, and / or the message type of the missed voice notification message is not a preset type, the system user interface APP intercepts the missed voice notification message, that is, the missed voice notification message is not displayed on the lock screen interface of the electronic device. For example, when the current interface of the electronic device is the desktop (that is, the screen state is not in the lock screen state), the missed voice notification message is not displayed, such as Figure 8 As shown in (b) in .
[0136] S511, the system user interface APP displays a notification message according to the reminder method corresponding to the message type of the voice notification message.
[0137] Specifically, after determining that the notification level corresponding to the message type of the missed voice notification message is not the silent level, that is, the notification level corresponding to the message type of the missed voice notification message is a non-silent level, the system user interface APP obtains the reminder method corresponding to the message type of the missed voice notification message, and displays the notification message according to the reminder method corresponding to the message type of the missed voice notification message.
[0138] Among them, the reminder method may include a lock screen notification method and a banner notification method. Exemplarily, when the reminder method corresponding to the message type of the missed voice notification message is the lock screen notification method, the system user interface APP obtains the current screen state of the electronic device. If the current screen state of the electronic device is the lock screen state, the missed voice notification message is displayed on the lock screen interface; if the current screen state of the electronic device is not the lock screen state, the missed voice notification message is not displayed.
[0139] When the reminder method corresponding to the message type of the missed voice notification message is the banner notification method, the system user interface APP obtains the current screen state of the electronic device. If the current screen state of the electronic device is not a lock screen state, the missed voice notification message is displayed in a banner notification method, such as displaying the missed voice notification message in the current interface of the electronic device (such as the desktop or the display interface of other applications) in a banner notification method; if the current screen state of the electronic device is a lock screen state, the missed voice notification message is not displayed.
[0140] When the reminder method corresponding to the message type of the missed voice notification message includes the lock screen notification method and the banner notification method, the system user interface APP obtains the current screen state of the electronic device. If the current screen state of the electronic device is the lock screen state, the missed voice notification message is displayed on the lock screen interface; if the current screen state of the electronic device is not the lock screen state, the missed voice notification message is displayed in the form of a banner notification, such as displaying the missed voice notification message in the current interface of the electronic device (such as the desktop or the display interface of other applications) in the form of a banner notification.
[0141] In this embodiment, the user can set the notification level of more important message types to a non-silent level as needed, and can set different reminder methods for different message types. In this way, when the notification level corresponding to the message type of the notification message is a non-silent level, the notification message can be displayed according to the reminder method corresponding to the message type of the notification message. The display methods of the notification message are more diverse, which can meet the different needs of users and enhance the user experience.
[0142] The method for displaying notification messages provided in this embodiment is that after an electronic device receives a notification data packet, if the notification level corresponding to the message type of the notification message is the silent level, and the current screen state of the electronic device is the lock screen state, the application to which the notification message belongs is a preset application, and the message type of the notification message is a preset type, then the notification message in the notification data packet is obtained and the notification message is displayed on the lock screen interface. In this way, for a message of a relatively important type sent by a pre-set, relatively important application, even if the notification level corresponding to the message type is set to the silent level, the notification message can be displayed on the lock screen interface, so that the user can notice the message in time and prevent the user from missing important notification messages.
[0143] Furthermore, the present embodiment can set preset applications and preset types as needed. In this way, when the notification level of the notification message is the silent level, if the application to which the notification message belongs is not the preset application or the message type of the notification message is not the preset type, the notification message will not be displayed on the lock screen interface, which can reduce disturbance to the user and improve the user experience.
[0144] Also, since when the screen status of the electronic device is the lock screen status, it means that the user may not be using the electronic device at this time and it is difficult for the user to notice the silent level notification message. Therefore, the silent level notification message is displayed on the lock screen interface, and when the screen status of the electronic device is not the lock screen status, the missed voice notification message is not displayed. This can enable the user to perceive the silent level notification message in time, and can also reduce interference to the user, providing a better user experience.
[0145] It can be understood that the embodiment of this application does not limit the execution order of the above-mentioned S504, S506, S507 and S508, and may be as follows Figure 5 The order of judgment and execution shown in the illustrated embodiment may also be executed in other orders, or S504, S506, S507 and S508 may be executed simultaneously, as long as the judgment logic complies with the logic provided in the embodiment of the present application for determining whether to display a silent level notification message.
[0146] The above method will be described below by one embodiment.
[0147] Fig. 9 It is a flow diagram of an example method for displaying notification messages provided by the embodiment of the present application. If Fig. 9 As shown, the method may include:
[0148] S901. The first application generates a first notification message; the first application does not belong to a preset application type, and / or the type of the first notification message does not belong to a preset message type, and the notification level corresponding to the first notification message is set to the first level; the notification level of any notification message is the first level, which is used to indicate that any notification message is not displayed in the lock screen state.
[0149] The first application (also referred to as the first application program) is any application installed on the electronic device. For example, the first application can be any one of a phone application, a text messaging application, an instant messaging application, a social application, a calendar application, a shopping application, a setting application, a software store application, etc. The type of the first application is not limited in the embodiments of the present application.
[0150] Optionally, the notification level may include a silent level, a non-silent level, etc. The first level is also called the silent level. Generally, after the notification level of a notification message is set to the silent level, the notification message will not be displayed when the screen is in a locked screen state. Among them, when the notification level of any notification message is set to the first level, any notification message will not be displayed in the locked screen state. For example, when the notification level of a missed call notification message is set to the first level, the missed call notification message will not be displayed in the locked screen state. For example, when the notification level of a new email reminder message is set to the first level, the new email reminder message will not be displayed in the locked screen state.
[0151] The preset application type may be a pre-set application type that allows messages to be displayed on the lock screen interface when the notification level is the first level. Applications belonging to the preset application type are preset applications. The preset application may be preset by the system or by the user. The preset application may be understood as an application that is more important to the user. For example, instant messaging applications, phone applications, email applications, etc. are all applications that are more important to the user.
[0152] The preset message type (also referred to as the preset type) can be a pre-set message type corresponding to the notification message that is allowed to be displayed on the lock screen interface when the notification level is the first level. The preset message type can be preset by the application or by the user. The preset message type can be understood as a message type that is more important to the user. For example, a missed voice message is a message type that is more important to the user.
[0153] S902. When the screen state of the electronic device is in the lock screen state, the first notification message is not displayed.
[0154] S903. The second application generates a second notification message. The second application belongs to a preset application type, and the type of the second notification message belongs to a preset message type. The notification level corresponding to the second notification message is set to the first level.
[0155] The second application is different from the first application. The second application (also referred to as the second application program) is any application installed on the electronic device. Exemplarily, the second application can be any one of a phone application, a text messaging application, an instant messaging application, a social application, a calendar application, a shopping application, a settings application, a software store application, etc. The type of the second application is not limited in the embodiments of the present application.
[0156] S904. When the screen state of the electronic device is in the lock screen state, the second notification message is displayed in response to the second notification message.
[0157] In this embodiment, the first application does not belong to the preset application type, which means that the first application does not belong to a relatively important application, and the type of the first notification message does not belong to the preset message type, which means that the first notification message does not belong to a relatively important type of message. Therefore, when the first application generates a first notification message with a notification level of the first level, the first notification message is not displayed on the lock screen interface. The second application belongs to the preset application type and the type of the second notification message belongs to the preset message type, which means that the second notification message is a relatively important type of message sent by a relatively important application. Therefore, when the second application generates a second notification message with a notification level of the first level, the second notification message is displayed on the lock screen interface. In this way, for a relatively important type of message sent by a pre-set relatively important application, even if the notification level corresponding to the message type is set to the first level, the notification message can be displayed on the lock screen interface, so that the user can notice the message in time and prevent the user from missing important notification messages.
[0158] In some embodiments, S904 may include: in response to the second notification message, determining that the notification level corresponding to the second notification message is the first level, and the screen state of the electronic device is the lock screen state, and the second application belongs to a preset application type, and the type of the second notification message belongs to a preset message type, and displaying the second notification message.
[0159] In one possible implementation, Fig.10 As shown, the method also includes:
[0160] S1001. In response to the second notification message, it is determined whether the notification level corresponding to the second notification message is the first level.
[0161] Specifically, the specific implementation method of determining whether the notification level corresponding to the second notification message is the first level in the embodiment of the present application can refer to the specific implementation method of S504 above, which will not be repeated in the embodiment of the present application.
[0162] S1002. If the notification level corresponding to the second notification message is the first level, it is determined whether the screen state of the electronic device is the lock screen state.
[0163] Specifically, the specific implementation method of determining whether the screen status of the electronic device is the locked screen status in the embodiment of the present application can refer to the specific implementation method of S506 mentioned above, which will not be repeated in the embodiment of the present application.
[0164] S1003. If the screen state of the electronic device is in the lock screen state, it is determined whether the second application belongs to the preset application type.
[0165] Exemplarily, determining whether the second application belongs to a preset application type may include: determining whether the second application is in a preset application whitelist; if the second application is in the preset application whitelist, determining that the second application belongs to the preset application type; if the second application is not in the preset application whitelist, determining that the second application does not belong to the preset application type. The preset application whitelist may be, for example, a preset application whitelist. In this way, by pre-configuring a preset application whitelist according to demand and determining whether the application to which the notification message belongs is in the preset application whitelist, it is possible to more accurately and quickly determine whether the application to which the notification message belongs is of the preset application type. Furthermore, the user does not need to manually set the notification level and reminder method for each application separately, which simplifies the operation process and provides a better user experience.
[0166] Specifically, the specific implementation of determining whether the second application belongs to the preset application type in the embodiment of the present application can refer to the specific implementation of S507 above, which will not be repeated in the embodiment of the present application.
[0167] S1004. If the second application belongs to the preset application type, it is determined whether the type of the second notification message belongs to the preset message type.
[0168] Exemplarily, each preset message type corresponds to a preset channel information, and the preset channel information is the information of the communication channel used to transmit the notification message of the preset message type; determining whether the type of the second notification message belongs to the preset message type includes: obtaining the channel information of the second notification message; if the channel information of the second notification message is the preset channel information, then determining that the type of the second notification message belongs to the preset message type; if the channel information of the second notification message is not the preset channel information, then determining that the type of the second notification message does not belong to the preset message type. The preset channel information can be, for example, a channel ID. In this way, by multiplexing the channel information to characterize the message type, there is no need to set the message type separately, which simplifies the algorithm logic and improves the algorithm operation efficiency.
[0169] Specifically, the specific implementation method of determining whether the type of the second notification message belongs to the preset message type in the embodiment of the present application can refer to the specific implementation method of S508 above, which will not be repeated in the embodiment of the present application.
[0170] S1005. If the type of the second notification message belongs to the preset message type, determine that the notification level corresponding to the second notification message is the first level, the screen state of the electronic device is the lock screen state, the second application belongs to the preset application type, and the type of the second notification message belongs to the preset message type.
[0171] In this embodiment, when the electronic device receives a notification message, if the notification level corresponding to the message type of the notification message is the first level, and the current screen state of the electronic device is the lock screen state, the application to which the notification message belongs is a preset application type, and the message type of the notification message is a preset message type, then the notification message is displayed on the lock screen interface. In this way, for a message of a relatively important type sent by a pre-set, relatively important application, even if the notification level corresponding to the message type is set to the silent level, the notification message can be displayed on the lock screen interface, so that the user can notice the message in time and prevent the user from missing important notification messages.
[0172] It can be understood that the embodiment of this application does not limit the execution order of the above-mentioned S1001, S1002, S1003 and S1004, and may be as follows Fig.10 The order of judgment and execution shown in the illustrated embodiment may also be executed in other orders, or S1001, S1002, S1003 and S1004 may be executed simultaneously, as long as the judgment logic complies with the logic provided in the embodiment of the present application for determining whether to display a silent level notification message.
[0173] In some embodiments, when the notification level corresponding to the second notification message is the first level, if the screen state of the electronic device is not the lock screen state, or the second application does not belong to the preset application type, or the type of the second notification message does not belong to the preset message type, the second notification message is intercepted. In this way, the preset application type and the preset message type are set according to the needs, so that when the notification level of the notification message is the first level, if the application to which the notification message belongs does not belong to the preset application type or the type of the notification message does not belong to the preset message type, the notification message is not displayed on the lock screen interface, which can reduce the disturbance to the user and improve the user experience.
[0174] In some embodiments, after S904, the method further comprises:
[0175] S905: Receive a first operation from the user.
[0176] S906. In response to the first operation, the screen state of the electronic device is switched to the unlocked state, and a first interface is displayed, and the first interface does not include the second notification message.
[0177] The first operation may be an unlocking operation of the electronic device by the user, such as a fingerprint unlocking operation or a face unlocking operation. The first interface may be, for example, a desktop of the electronic device or an interface of a certain application.
[0178] In this embodiment, when the screen state of the electronic device is not in the locked screen state, the second notification message is not displayed, which enables the user to perceive the first level notification message in time and reduces interference to the user, providing a better user experience.
[0179] In some embodiments, after S904, the method further comprises:
[0180] S907: Receive a second operation from the user.
[0181] S908. In response to the second operation, a second interface is displayed, the second interface is used to display notification information, and the second interface includes a second notification message.
[0182] The second operation may be an operation for triggering the electronic device to display the second interface. For example, the second operation may be a pull-down operation on the top status bar of the electronic device. The second interface may be a pull-down notification bar (also referred to as a notification center).
[0183] In this embodiment, when the current interface of the electronic device is switched to the second interface, the second notification message is still displayed on the second interface, and the user can be reminded to process the second notification message in a timely manner.
[0184] In some embodiments, the method also includes: the second application generates a third notification message; the third notification message does not belong to the preset message type, and the notification level corresponding to the third notification message is set to the first level; when the screen status of the electronic device is in the lock screen state, in response to the third notification message, the third notification message is not displayed.
[0185] In this embodiment, for the same application, for notification messages of a type that is less concerned, when the notification level of the notification message is the first level, the notification message is not displayed on the lock screen interface, thereby reducing interference to the user and providing a better user experience.
[0186] The above describes the application of the method provided in the embodiment of the present application in one scenario. In addition, the method can also be applied in other scenarios to solve other problems. An exemplary description is given below.
[0187] It is found during use that when the notification level corresponding to a certain message type of an application is set to the silent level, when the electronic device receives a notification message of this message type, the notification message is not displayed on the lock screen interface, which may cause the user to be unable to perceive the notification message in time. In response to this, the user changes the notification level corresponding to the message type from the silent level to the non-silent level. However, the next time the electronic device receives a notification message corresponding to this message type, the application may change the channel information of the notification message when sending the notification message to the notification manager, which may cause the operation of changing the silent level to the non-silent level (i.e. turning off the silent notification switch) to fail to take effect.
[0188] In some scenarios, when the channel id of the notification message sent next time does not change from the channel id of the notification message sent last time, the operation of changing the silent level to a non-silent level takes effect, and when the electronic device receives the next notification message of this message type, the notification message can be displayed on the lock screen interface.
[0189] In other scenarios, because the channel id carried in the next notification message sent by the application is inconsistent with the channel id carried in the last notification message sent, the operation of changing the silent level to a non-silent level cannot take effect, so that the next notification message is still a silent notification. In other words, even if the user turns off the silent notification switch, the next notification message of this message type received by the electronic device is still a silent notification, resulting in the user being unable to perceive the notification in time, causing a certain impact on the user.
[0190] In this regard, in an embodiment of the present application, when the notification level corresponding to the message type of the notification message is the silent level, whether to display the notification message on the lock screen interface is determined by judging whether the application to which the notification message belongs is a preset application and judging whether the message type of the notification message is the preset type, rather than determining whether to display the notification message on the lock screen interface based solely on the notification level corresponding to the notification message. Therefore, even if the operation of turning off the silent notification switch fails to take effect, when the application to which the notification message belongs is the preset application and the message type of the notification message is the preset type, the notification message can also be displayed on the lock screen interface. This can avoid the problem that the operation of turning off the silent notification switch fails to take effect, resulting in the inability to display the notification message in the manner set by the user, thereby enabling users to perceive more important notification messages in a timely manner.
[0191] An example of a method for displaying a notification message provided by an embodiment of the present application is described in detail above. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.
[0192] Corresponding to the method in the aforementioned embodiment, the embodiment of the present application further provides a display device for a notification message. The display device for the notification message can be applied to an electronic device to implement the method in the aforementioned embodiment. The function of the display device for the notification message can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0193] For example, Fig.11 A structural diagram of a display device 1100 showing a notification message, such as Fig.11As shown, the display device 1100 of the notification message may include: a first generation module 1101, a display module 1102, and a second generation module 1103. Among them, the first generation module 1101 is used to generate a first notification message of a first application; the first application does not belong to the preset application type, and / or the type of the first notification message does not belong to the preset message type, and the notification level corresponding to the first notification message is set to the first level; the notification level of any notification message is the first level, which is used to indicate that any notification message is not displayed in the lock screen state. The display module 1102 is used to not display the first notification message when the screen state of the electronic device is in the lock screen state. The second generation module 1103 is used for the second application to generate a second notification message; the second application belongs to the preset application type, and the type of the second notification message belongs to the preset message type, and the notification level corresponding to the second notification message is set to the first level. The display module 1102 is also used to display the second notification message in response to the second notification message when the screen state of the electronic device is in the lock screen state.
[0194] In some examples, the display device 1100 for the above-mentioned notification message may also include: a receiving module; wherein the receiving module is used to receive a first operation of the user; and a display module 1102 is also used to switch the screen state of the electronic device to an unlocked state in response to the first operation, and display a first interface, which does not include the second notification message.
[0195] In some examples, the receiving module is further used to receive a second operation of the user. The display module 1102 is further used to display a second interface in response to the second operation, the second interface is used to display notification information, and the second interface includes a second notification message.
[0196] In some examples, the display device 1100 for the above-mentioned notification message may also include: a third generation module; wherein the third generation module is used for the second application to generate a third notification message; the third notification message does not belong to the preset message type, and the notification level corresponding to the third notification message is set to the first level; the display module 1102 is also used to not display the third notification message when the screen status of the electronic device is in the locked screen state.
[0197] In some examples, display module 1102 is specifically used to respond to a second notification message, determine that the notification level corresponding to the second notification message is the first level, and the screen state of the electronic device is a lock screen state, and the second application belongs to a preset application type, and the type of the second notification message belongs to a preset message type, and display the second notification message.
[0198] In some examples, the display device 1100 for the above-mentioned notification message may also include: a determination module, used to: in response to the second notification message, determine whether the notification level corresponding to the second notification message is the first level; if the notification level corresponding to the second notification message is the first level, determine whether the screen status of the electronic device is the lock screen status; if the screen status of the electronic device is the lock screen status, determine whether the second application belongs to the preset application type; if the second application belongs to the preset application type, determine whether the type of the second notification message belongs to the preset message type; if the type of the second notification message belongs to the preset message type, determine that the notification level corresponding to the second notification message is the first level, and the screen status of the electronic device is the lock screen status, and the second application belongs to the preset application type, and the type of the second notification message belongs to the preset message type.
[0199] In some examples, the determination module is specifically used to: determine whether the second application is in the preset application whitelist; if the second application is in the preset application whitelist, determine that the second application belongs to the preset application type; if the second application is not in the preset application whitelist, determine that the second application does not belong to the preset application type.
[0200] In some examples, each preset message type corresponds to a preset channel information, and the preset channel information is the information of the communication channel used to transmit the notification message of the preset message type; the determination module is also specifically used to: obtain the channel information of the second notification message; if the channel information of the second notification message is the preset channel information, determine that the type of the second notification message belongs to the preset message type; if the channel information of the second notification message is not the preset channel information, determine that the type of the second notification message does not belong to the preset message type.
[0201] In some examples, the display device 1100 for the above-mentioned notification message may also include: a processing module, which is used to intercept the second notification message when the notification level corresponding to the second notification message is the first level, if the screen state of the electronic device is not a locked screen state, or the second application does not belong to the preset application type, or the type of the second notification message does not belong to the preset message type.
[0202] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0203] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here. The electronic device provided in this embodiment is used to execute the display method of the above notification message, so it can achieve the same effect as the above implementation method.
[0204] In the case of an integrated unit, the electronic device may further include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, etc. The communication module may be used to support the electronic device to communicate with other devices.
[0205] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and so on. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.
[0206] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 3 Device of the structure shown.
[0207] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the method for displaying a notification message of any of the above embodiments.
[0208] The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the method for displaying the notification message in the above-mentioned embodiment.
[0209] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer execution instructions, and when the device is running, the processor may execute the computer execution instructions stored in the memory so that the chip executes the notification message display method in the above-mentioned method embodiments.
[0210] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.
[0211] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0212] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0213] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0214] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0215] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0216] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying a notification message, the method being executed by an electronic device, characterized in that: The method comprises: A first application generates a first notification message; the first application does not belong to a preset application type, and / or the type of the first notification message does not belong to a first preset message type, and the notification level corresponding to the first notification message is set to the first level; the notification level of any notification message is the first level, which is used to indicate that any notification message is not displayed in a lock screen state, and the first preset message type is one of the types obtained by classifying the notification message of the first application; When the screen of the electronic device is in a locked state, not displaying the first notification message; The second application generates a second notification message; the second application belongs to the preset application type, and the type of the second notification message belongs to the second preset message type, the notification level corresponding to the second notification message is set to the first level, and the second preset message type is one of the types obtained by classifying the notification message of the second application; When the screen state of the electronic device is in a locked screen state, in response to the second notification message, displaying the second notification message; When the screen state of the electronic device is not the locked screen state, intercepting the second notification message; The second application generates a third notification message; the third notification message does not belong to the second preset message type, and the notification level corresponding to the third notification message is set to the first level; When the screen of the electronic device is in a locked state, the third notification message is not displayed.
2. The method according to claim 1, characterized in that After displaying the second notification message, the method further includes: Receiving a first operation from a user; In response to the first operation, the screen state of the electronic device is switched to an unlocked state, and a first interface is displayed, and the first interface does not include a second notification message.
3. The method according to claim 1 or 2, characterized in that: After displaying the second notification message, the method further includes: receiving a second operation from the user; In response to the second operation, a second interface is displayed, where the second interface is used to display notification information, and the second interface includes the second notification message.
4. The method according to any one of claims 1 to 3, characterized in that The method of displaying the second notification message in response to the second notification message when the screen of the electronic device is in a locked screen state includes: In response to the second notification message, it is determined that the notification level corresponding to the second notification message is the first level, and the screen state of the electronic device is the lock screen state, and the second application belongs to the preset application type, and the type of the second notification message belongs to the second preset message type, and the second notification message is displayed.
5. The method according to claim 4, characterized in that The method further comprises: In response to the second notification message, determining whether the notification level corresponding to the second notification message is the first level; If the notification level corresponding to the second notification message is the first level, determining whether the screen state of the electronic device is a locked screen state; If the screen state of the electronic device is a locked screen state, determining whether the second application belongs to the preset application type; If the second application belongs to the preset application type, determining whether the type of the second notification message belongs to the second preset message type; If the type of the second notification message belongs to the second preset message type, it is determined that the notification level corresponding to the second notification message is the first level, and the screen state of the electronic device is the lock screen state, and the second application belongs to the preset application type, and the type of the second notification message belongs to the second preset message type.
6. The method according to claim 5, characterized in that The determining whether the second application belongs to the preset application type includes: Determining whether the second application is in a preset application whitelist; If the second application is in the preset application whitelist, determining that the second application belongs to the preset application type; If the second application is not in the preset application whitelist, it is determined that the second application does not belong to the preset application type.
7. The method according to claim 5 or 6, characterized in that: The second preset message type corresponds to preset channel information, and the preset channel information is information of a communication channel used to transmit a notification message of the second preset message type; The determining whether the type of the second notification message belongs to the second preset message type includes: Obtaining channel information of the second notification message; If the channel information of the second notification message is the preset channel information, determining that the type of the second notification message belongs to the second preset message type; If the channel information of the second notification message is not the preset channel information, it is determined that the type of the second notification message does not belong to the second preset message type.
8. The method according to any one of claims 5 to 7, characterized in that The method further comprises: When the notification level corresponding to the second notification message is the first level, if the second application does not belong to the preset application type, or the type of the second notification message does not belong to the second preset message type, the second notification message is intercepted.
9. An electronic device, characterized in that: include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other so that the electronic device executes the method as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed on an electronic device, enable the electronic device to perform the method as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Message notification method and device
CN116055617A