This application relates to the field of terminal technologies, and in particular, to a notification message management method and an electronic device.
Currently, a notification bar (which is also referred to as a notification panel) is set in an electronic device such as a mobile phone, to display notification messages that are received by an operating system or applications. A mobile phone is used as an example. As shown in
If the mobile phone detects that a user drops down the status bar 101, as shown in
However, when there are a relatively large quantity of notification messages (or notification message groups), the user needs to slide up and down in the notification bar 103 to locate a corresponding notification message (or notification message group). Consequently, the user has relatively poor use experience when browsing and managing the notification messages.
This application provides a notification message management method and an electronic device, to provide a user with a function of quickly searching for and managing a notification message in a notification bar, and improve management efficiency and use experience of the user on the notification message in the notification bar.
To achieve the foregoing objective, this application uses the following technical solutions.
According to a first aspect, this application provides a notification message management method, including: An electronic device displays a notification interface, where the notification interface includes N (N is an integer greater than 1) notification messages of M (M is an integer greater than or equal to 1) applications, and these notification messages are usually not read by a user; and the notification interface further includes an operation bar, and identifiers of the M applications are displayed in the operation bar.
In other words, in this application, an operation bar is additionally set in the notification interface, and an identifier of an application corresponding to each current notification message is displayed in the operation bar. In this way, a user can quickly browse, in the operation bar of the notification interface, specific applications to which the current notification messages belong. Subsequently, the user may input a corresponding operation for the identifier of the application in the operation bar, to trigger the electronic device to manage the notification message by using an application as a granularity, so as to improve management efficiency and use experience of the user on the notification message in the notification bar.
In a possible implementation, the identifiers of the M applications include an identifier of a first application (for example, an icon of the first application), and after the electronic device displays the notification interface, the method further includes: The electronic device receives a first filtering operation input by the user for the identifier of the first application; and in response to the first filtering operation, the electronic device displays, in the notification interface, a notification message of the first application in the N notification messages. In this case, a notification message of another application may not be displayed in the notification interface.
In this way, the user may select an identifier of an application in the operation bar, to filter out a notification message of the application in the notification interface, so that the user can quickly find the notification message of the application by using an application as a granularity, thereby improving management efficiency and use experience of the user on the notification message.
In a possible implementation, after the electronic device receives the first filtering operation input by the user for the identifier of the first application, the method further includes: In response to the first filtering operation, the electronic device marks the identifier of the first application in the operation bar as a selected state, to notify the user that the identifier of the first application is currently selected, and a filtering result of the notification message of the first application is presented on the notification interface.
In a possible implementation, the identifiers of the M applications further include an identifier of a second application, and after the electronic device displays, in the notification interface, the notification message of the first application in the N notification messages, the method further includes: The electronic device receives a second filtering operation input by the user for the identifier of the second application; and in response to the second filtering operation, the electronic device may display, in the notification interface, a notification message of the second application in the N notification messages.
In other words, after the electronic device filters out the notification message of the first application in the notification interface, if the user continues to filter the notification message of the second application, the electronic device may no longer filter the notification message of the first application, but filter the notification message of the second application from all notification messages again.
In a possible implementation, after the electronic device displays, in the notification interface, the notification message of the second application in the N notification messages, the method further includes: The electronic device receives a first filtering cancellation operation input by the user for the identifier of the second application; and in response to the first filtering cancellation operation, the electronic device displays the N notification messages in the notification interface.
In other words, when the user inputs the first filtering cancellation operation for the identifier of the second application, the electronic device may display all of the notification messages in the notification interface again.
Alternatively, when the identifiers of the M applications further include the identifier of the second application, the electronic device may further receive a second filtering operation input by the user for the identifier of the second application; and in response to the second filtering operation, the electronic device may display, in the notification interface, the notification messages of the first application and the second application in the N notification messages.
In other words, after the electronic device filters out the notification message of the first application in the notification interface, if the user continues to filter out the notification message of the second application, the electronic device may simultaneously filter out the notification messages of the first application and the second application from all of the notification messages, and present the notification messages of the first application and the second application to the user in the notification interface.
In a possible implementation, after the electronic device displays, in the notification interface, the notification messages of the first application and the second application in the N notification messages, the method further includes: The electronic device may receive a first filtering cancellation operation input by the user for the identifier of the second application; and in response to the first filtering cancellation operation, the electronic device displays, in the notification interface, the notification message of the first application in the N notification messages.
After the electronic device filters out the notification messages of the first application and the second application in the notification interface, if the user inputs the first filtering cancellation for the identifier of the second application, the electronic device may cancel the filtering operation on the notification message of the second application, and retain a filtering result of the notification message of the first application in the notification interface.
Further, after the electronic device displays, in the notification interface, the notification message of the first application in the N notification messages, the method further includes: The electronic device may receive a second filtering cancellation operation input by the user for the identifier of the first application; and in response to the second filtering cancellation operation, the electronic device may display the N notification messages in the notification interface.
That is, after the user cancels a filtering operation on notification messages of all applications, the electronic device may cancel the filtering operation on the notification message of the second application.
In a possible implementation, the identifiers of the M applications include an identifier of a first application, and after the electronic device displays the notification interface, the method further includes: The electronic device receives a first pinning operation input by the user for the identifier of the first application, for example, an operation of dragging the identifier of the first application to slide downwards; and in response to the first pinning operation, the electronic device may display a notification message of the first application in the N notification messages on the top in the notification interface.
In other words, the user may trigger, by operating an identifier of an application in the operation bar, the electronic device to display all notification messages of a corresponding application on the top in the notification interface, so that the user can quickly find a notification message of an application by using an application as a granularity, thereby improving management efficiency and use experience of the user on the notification message.
In a possible implementation, after the electronic device receives the first pinning operation input by the user for the identifier of the first application, the method further includes: In response to the first pinning operation, the electronic device displays a pinning icon around the identifier of the first application, to notify the user that the current notification message of the first application is displayed on the top.
In a possible implementation, after the electronic device receives the first pinning operation input by the user for the identifier of the first application, the method further includes: The electronic device obtains a first notification message; when the first notification message is a notification message of the first application, the electronic device may display the first notification message on the top in the notification interface; or when the first notification message is a notification message of another application other than the first application, the electronic device may display the first notification message after the notification message of the first application. In other words, when a notification message of an application is displayed on the top, a new notification message received by the application is also displayed on the top.
In a possible implementation, the identifiers of the M applications further include an identifier of a second application, and after the electronic device displays the notification message of the first application in the N notification messages on the top in the notification interface, the method further includes: The electronic device receives a second pinning operation (the second pinning operation may be the same as the first pinning operation) input by the user for the identifier of the second application; and in response to the second pinning operation, the electronic device may display a notification message of the second application in the N notification messages on the top in the notification interface. In this way, the electronic device may display each notification message of an application on the top in response to the pinning operation performed by the user on the application identifier in the operation bar. Alternatively, in response to the second pinning operation, the electronic device may display, on the top in the notification interface, the notification messages of the first application and the second application in the N notification messages. In this way, the electronic device may simultaneously display notification messages of a plurality of applications on the top in the notification interface.
In a possible implementation, after the electronic device displays the notification message of the first application in the N notification messages on the top in the notification interface, the method further includes: The electronic device receives an unpinning operation input by the user for the identifier of the first application; and in response to the unpinning operation, the electronic device may restore a display location of the notification message of the first application in the notification interface, that is, the user may cancel a pinning function of the notification message of the first application by using an application as a granularity.
In a possible implementation, after the electronic device displays the notification message of the first application in the N notification messages on the top in the notification interface, the method further includes: The electronic device receives an unpinning operation input by the user for a second notification message, where the second notification message is a notification message that is of the first application and that is displayed on the top; and in response to the unpinning operation, the electronic device may restore a display location of the second notification message in the notification interface, that is, the user may cancel a pinning function of a notification message by using a notification message as a granularity.
After the electronic device cancels a pinning function of a notification message, a pinning function of an application to which the notification message belongs is not affected. Subsequently, if the electronic device receives a notification message of the first application again, the electronic device may further display the notification message of the first application on the top of the notification interface.
In a possible implementation, the method further includes: When the electronic device does not obtain a notification message of a third application, the electronic device may set the third application as a pinned application in response to a related setting operation of the user. In this way, after the electronic device displays the notification interface, if the electronic device obtains the notification message of the third application, the electronic device may display the notification message of the third application on the top in the notification interface, and display an identifier of the third application in the operation bar. In other words, before the notification message of the third application is received, the user may preset that the notification message of the third application needs to be displayed on the top. In this way, after receiving the notification message of the third application, the electronic device may directly display the notification message of the third application on the top in the notification interface.
In a possible implementation, the identifiers of the M applications include an identifier of a first application, and after the electronic device displays the notification interface, the method further includes: The electronic device receives a deletion operation input by the user for the identifier of the first application, for example, an operation of dragging the identifier of the first application to slide upwards; and in response to the deletion operation, the electronic device may delete a notification message of the first application in the notification interface.
In this way, the user may delete, in the notification interface, notification messages of an application in batches by operating an identifier of the application in the operation bar, so that the user manages notification messages in the notification interface by using an application as a granularity, thereby improving user experience.
In a possible implementation, the operation bar may further include a first button used to display all notification messages. If a first operation (for example, a tap operation) input by the user on the first button is detected, the electronic device may display the N notification messages in the notification interface.
In a possible implementation, the operation bar may further include a second button used to delete all notification messages. If a second operation (for example, a tap operation) input by the user on the second button is detected, the electronic device may delete all notification messages (namely, the N notification messages) in the notification interface.
In a possible implementation, a badge is set on each of the identifiers of the M applications, and the badge is used to indicate a quantity of notification messages currently received by a corresponding application.
In addition, when the electronic device displays the identifiers of the applications in the operation bar, the electronic device may sort the identifiers of the applications based on a receiving time point at which each application receives a notification message last time; or the electronic device may sort the identifiers of the applications based on a parameter such as a use frequency or use duration of each application by the user. This is not limited in this application.
According to a second aspect, this application provides an electronic device, including: a touchscreen, one or more processors, one or more memories, and one or more computer programs. The processor is coupled to both the touchscreen and the memory, the one or more computer programs are stored in the memory, and when the electronic device runs, the processor executes the one or more computer programs stored in the memory, so that the electronic device performs the notification message management method according to any one of the foregoing implementations.
According to a third aspect, this application provides a computer storage medium, including computer instructions. When the computer instructions are run on an electronic device, the electronic device is enabled to perform the notification message management method according to any one of the implementations of the first aspect.
According to a fourth aspect, this application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to perform the notification message management method according to any one of the implementations of the first aspect.
It may be understood that, the electronic device in the second aspect, the computer storage medium in the third aspect, and the computer program product in the fourth aspect are all configured to perform the corresponding method. Therefore, for beneficial effects that can be achieved by the electronic device, the computer storage medium, and the computer program product, refer to beneficial effects in the corresponding method. Details are not described again herein.
The following describes implementations of embodiments in detail with reference to the accompanying drawings.
A notification message management method provided in embodiments of this application may be applied to an electronic device such as a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a handheld computer, a netbook, a personal digital assistant (personal digital assistant, PDA), a wearable electronic device, or a virtual reality device. This is not limited in embodiments of this application.
For example,
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (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, a headset jack 170D, a sensor module 180, a camera 193, a display 194, and the like.
It may be understood that the structure shown in this embodiment of the present application does not constitute a specific limitation on the electronic device 100. In some other embodiments of this application, the electronic device 100 may include more or fewer components than those shown in the figure, or some components may be combined, or some components may be split, or different component arrangements may be used. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a neural-network processing unit (neural-network processing unit, NPU), and/or the like. Different processing units may be independent components, or may be integrated into one or more processors.
A memory may be further disposed in the processor 110, and is configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data that has been used or cyclically used by the processor 110. If the processor 110 needs to use the instruction or the data again, the processor may directly invoke the instruction or the data from the memory. This avoids repeated access, reduces waiting time of the processor 110, and improves system efficiency.
In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (inter-integrated circuit, I2C) interface, an inter-integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (general-purpose input/output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive charging input of a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 supplies power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is configured to connect to the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input of the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may be further configured to monitor a parameter such as a battery capacity, a quantity of battery cycles, and a battery health status (electric leakage or impedance). In some other embodiments, the power management module 141 may alternatively be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may alternatively be disposed in a same component.
A wireless communication function of the electronic device 100 may be implemented by using the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
The antenna 1 and the antenna 2 are configured to transmit and receive an electromagnetic wave signal. Each antenna in the electronic device 100 may be configured to cover one or more communication frequency bands. Different antennas may be further multiplexed, to improve antenna utilization. For example, the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.
The mobile communication module 150 may provide a wireless communication solution that includes 2G/3G/4G/5G or the like and that is applied to the electronic device 100. The mobile communication module 150 may include one or more filters, a switch, a power amplifier, a low noise amplifier (low noise amplifier, LNA), and the like. The mobile communication module 150 may receive an electromagnetic wave through the antenna 1, perform processing such as filtering or amplification on the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may further amplify a signal modulated by the modem processor, and convert, by using the antenna 1, the signal into an electromagnetic wave for radiation. In some embodiments, at least some functional modules in the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some function modules of the mobile communication module 150 may be disposed in a same device with at least some modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is configured to modulate a to-be-sent low-frequency baseband signal into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transfers the low-frequency baseband signal obtained through demodulation to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal by using an audio device (not limited to the speaker 170A, the receiver 170B, or the like), or displays an image or a video by using the display 194. In some embodiments, the modem processor may be an independent component. In some other embodiments, the modem processor may be independent of the processor 110, and is disposed in a same device as the mobile communication module 150 or another function module.
The wireless communication module 160 may provide a solution for wireless communication including a wireless local area network (wireless local area network, WLAN) (such as a wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (Bluetooth, BT), a global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), a near field communication (near field communication, NFC) technology, an infrared (infrared, IR) technology, and the like applied to the electronic device 100. The wireless communication module 160 may one or more components integrated with one or more communication processing modules. The wireless communication module 160 receives an electromagnetic wave through the antenna 2, performs frequency modulation and filtering processing on an electromagnetic wave signal, and sends a processed signal to the processor 110. The wireless communication module 160 may further receive a to-be-sent signal from the processor 110, perform frequency modulation and amplification on the to-be-sent signal, and convert, by using the antenna 2, the signal into an electromagnetic wave for radiation.
In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 may communicate with a network and another device by using a wireless communication technology. The wireless communication technology may include a global system for mobile communications (global system for mobile communications, GSM), a general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, a GNSS, a WLAN, NFC, FM, an IR technology, and/or the like. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a BeiDou navigation satellite system (BeiDou navigation satellite system, BDS), a quasi-zenith satellite system (quasi-zenith satellite system, QZSS), and/or a satellite based augmentation system (satellite based augmentation system, SBAS).
The electronic device 100 implements a display function by using the GPU, the display 194, the application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is configured to perform mathematical and geometric computation, and render an image. The processor 110 may include one or more GPUs, and the GPUs execute program instructions to generate or change display information.
The display 194 is configured to display an image, a video, and the like. The display 194 includes a display panel. The display panel may be a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (flexible light-emitting diode, FLED), a mini-LED, a micro-LED, a micro-OLED, a quantum dot light-emitting diode (quantum dot light-emitting diode, QLED), or the like. In some embodiments, the electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
The electronic device 100 may implement a photographing function by using the ISP, the camera 193, the video coder/decoder, the GPU, the display 194, the application processor, and the like.
The ISP is configured to process data fed back by the camera 193. For example, during photographing, a shutter is pressed, and light is transmitted to a photosensitive element of the camera through a lens. An optical signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, to convert the electrical signal into a visible image. The ISP may further perform algorithm optimization on noise, brightness, and complexion of the image. The ISP may further optimize parameters such as exposure and a color temperature of a photographing scenario. In some embodiments, the ISP may be disposed in the camera 193.
The camera 193 is configured to capture a static image or a video. An object generates, through a lens, an optical image to be projected to a photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal oxide semiconductor (complementary metal-oxide-semiconductor, CMOS) optoelectronic transistor. The photosensitive element converts an optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert the electrical signal into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard image signal in a format such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
The external memory interface 120 may be used to connect to an external storage card, for example, a micro SD card, to extend a storage capability of the electronic device 100. The external memory card communicates with the processor 110 by using the external memory interface 120, to implement a data storage function. For example, a music file or a video file is stored in the external storage card.
The internal memory 121 may be configured to store one or more computer programs, and the one or more computer programs include instructions. The processor 110 may run the instructions stored in the internal memory 121, so that the electronic device 100 performs a method provided in some embodiments of this application, various functional applications, data processing, and the like. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system. The program storage area may further store one or more applications (for example, Gallery and Contacts), and the like. The data storage area may store data (for example, a photo and a contact) created during use of the electronic device 101, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more disk storage components, a flash component, or a universal flash storage (universal flash storage, UFS). In some other embodiments, the processor 110 runs the instructions stored in the internal memory 121 and/or the instructions stored in the memory disposed in the processor, so that the electronic device 100 performs the method provided in the embodiments of this application, various functional applications, and data processing.
The electronic device 100 may implement an audio function by using the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headset jack 170D, the application processor, and the like, for example, music playing and recording.
The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and is also configured to convert analog audio input into a digital audio signal. The audio module 170 may be further configured to code and decode an audio signal. In some embodiments, the audio module 170 may be disposed in the processor 110, or some function modules in the audio module 170 are disposed in the processor 110.
The speaker 170A, also referred to as a “loudspeaker”, is configured to convert an electrical audio signal into a sound signal. The electronic device 100 may be used to listen to music or answer a call in a hands-free mode over the speaker 170A.
The receiver 170B, also referred to as an “earpiece”, is configured to convert an audio electrical signal into a sound signal. When a call is answered or speech information is received through the electronic device 100, the receiver 170B may be put close to a human ear to listen to a voice.
The microphone 170C, also referred to as a “mike” or a “mic”, is configured to convert a sound signal into an electrical signal. When making a call or sending a voice message, a user may make a sound near the microphone 170C through the mouth of the user, to input a sound signal to the microphone 170C. One or more microphones 170C may be disposed in the electronic device 100. In some other embodiments, two microphones 170C may be disposed in the electronic device 100, to collect a sound signal and further implement a noise reduction function. In some other embodiments, three, four, or more microphones 170C may alternatively be disposed in the electronic device 100, to collect a sound signal, implement noise reduction, and identify a sound source, so as to implement a directional recording function and the like.
The headset jack 170D is configured to connect to a wired headset. The headset jack 170D may be the USB interface 130, or may be a 3.5 mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface or cellular telecommunications industry association of the USA (cellular telecommunications industry association of the USA, CTIA) standard interface.
The sensor module 180 may include a pressure sensor, a gyroscope sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a range sensor, an optical proximity sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
In addition, the electronic device may further include one or more components such as a button 190, a motor 191, an indicator 192, and a subscriber identification module (subscriber identification module, SIM) card interface 195. This is not limited in this embodiment of this application.
A layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture may be used for a software system of the electronic device 100. In an embodiment of this application, an Android system with a layered architecture is used as an example to describe the software structure of the electronic device 100.
In the layered architecture, software is divided into several layers, and each layer has a clear role and task. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers: an application layer, an application framework layer, an Android runtime (Android runtime) and system library, and a kernel layer from top to bottom.
1. Application Layer
The application layer may include a series of applications.
As shown in
In this embodiment of this application, the application may further include a notification center app. If a notification message received by another application is not read by a user, the application may send the notification message to the notification center app, and the notification center app displays the received notification message in a notification bar (which may also be referred to as a notification panel). An interface in which the notification bar is located may be referred to as a notification interface. For example, the notification interface may be an interface in which a drop-down menu is located, or the notification interface may be a home screen, a leftmost screen, a lock screen interface, an application interface of an application, or the like.
As shown in
Certainly, the notification message in the notification bar 400 may be a notification message from an application, or may be a notification message (for example, a version upgrade message) from an operating system, or may be a notification message from an FA (Feature Ability, FA) or a PA (Particle Ability). This is not limited in this embodiment of this application.
2. Application Framework Layer
The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for the applications at the application layer. The application framework layer includes some predefined functions.
Still as shown in
For example, the notification manager stores, in a preset database 1, a notification object sent by each application. For example, as shown in Table 1, the notification manager stores, in the database 1, two notification objects from the application A and one notification object from an application B. Each notification object corresponds to one notification message. For example, a notification object 1 corresponds to the notification message 401, a notification object 2 corresponds to a notification message 406, and a notification object 3 corresponds to a notification message 407.
After obtaining the notification object 1 sent by the application A, the notification manager may add the notification object 1 to the database 1 shown in Table 1. Further, as shown in
In this embodiment of this application, as shown in
For example, if the notification center app detects that the user inputs a first operation on the identifier 502 of the application A in the operation bar 501, the notification center app may send a deletion instruction to the notification manager, where the deletion instruction is used to delete a notification message from the application A in the notification bar 400. In response to the deletion instruction, the notification manager may delete all notification objects corresponding to the application A in Table 1. Further, the notification manager may indicate the notification center app to redraw each notification message in the notification bar 400 based on an updated Table 1. Because no notification object of the application A exists in the updated Table 1, the notification message finally drawn by the notification center app in the notification bar 400 based on the updated Table 1 does not include a notification message of the application A. This implements a function of deleting notification messages in batches at a granularity of application.
Certainly, the user may further input another operation on the identifier 502 of the application A (or the identifier 503 of the application B) in the operation bar 501, to implement functions such as filtering and pinning a notification message of an application. This is described in detail in a subsequent embodiment, and therefore details are not described herein.
It can be learned that in this embodiment of this application, the operation bar 501 is set in the notification bar 400, so that an identifier of an application that currently has a notification message may be displayed in the operation bar 501. The user may quickly and conveniently manage, by using an application as a granularity, all notification messages of an application by operating an identifier of the corresponding application in the operation bar 501, so that the user does not need to search for each notification message in the notification bar 400 and manage the notification message. This improves management efficiency and use experience of the user on the notification message in the notification bar 400.
Certainly, the application framework layer may further include an activity manager, a window manager, a content provider, a view system, a resource manager, an input method manager, and the like.
The activity manager can be configured to manage a life cycle of each application. The application usually runs in an operating system in a form of an activity. The activity manager may schedule an activity process of the application to manage the life cycle of each application. The window manager is configured to manage a window program. The window manager may obtain a size of a display, determine whether there is a status bar, perform screen locking, take a screenshot, and the like. The content provider is configured to: store and obtain data, and enable the data to be accessed by an application. The data may include a video, an image, audio, calls that are made and answered, a browsing history and bookmarks, an address book, and the like. The view system includes visual controls such as a control for displaying a text and a control for displaying an image. The view system may be configured to construct an application. A display interface may include one or more views. For example, a display interface including an SMS message notification icon may include a text display view and an image display view. The resource manager provides various resources such as a localized string, an icon, an image, a layout file, and a video file for an application.
3. Android Runtime and System Library
The Android runtime includes a kernel library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
The kernel library includes two parts: a function that needs to be called in Java language and a kernel library of Android.
The application layer and the application framework layer are run on the virtual machine. The virtual machine executes Java files at the application layer and the application framework layer as binary files. The virtual machine is configured to implement functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
The system library may include a plurality of functional modules, for example, a surface manager (surface manager), a media library (Media Library), a three-dimensional graphics processing library (for example, OpenGL ES), and a 2D graphics engine (for example, SGL).
The surface manager is configured to manage a display subsystem, and provide fusion of 2D and 3D layers for a plurality of applications. The media library supports playback and recording in a plurality of commonly used audio and video formats, static image files, and the like. The media library may support a plurality of audio and video encoding formats such as MPEG-4, H.264, MP3, AAC, AMR, JPG, and PNG. The three-dimensional graphics processing library is configured to implement three-dimensional graphics drawing, image rendering, composition, layer processing, and the like. The 2D graphics engine is a drawing engine for 2D drawing.
4. Kernel Layer
The kernel layer is a layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, an audio driver, a sensor driver, and the like. This is not limited in this embodiment of this application.
The following describes in detail the notification message management method provided in embodiments of this application with reference to the accompanying drawings by using an example in which a mobile phone is the electronic device.
For example, a notification center app (which may also be referred to as a notification app) may be installed at an application layer of the mobile phone. As shown in
Certainly, the notification bar 602 may further display more notification messages. When there are too many notification messages that cannot be all displayed in the notification bar 602, the notification center app may hide some notification messages in the notification bar 602, and the user may trigger, by inputting a sliding operation, the notification center app to display the hidden notification messages in the notification bar 602.
In some embodiments, still as shown in
For example, when displaying the identifiers of the applications in the operation bar 700, the notification center app may sort the identifiers of the applications based on a receiving time point at which each application receives a notification message last time. For example, a receiving time point T1 at which the application A receives the notification message 603 last time is later than a receiving time point T2 at which the application B receives the notification message 604 last time, and the receiving time point T2 at which the application B receives the notification message 604 last time is later than a receiving time point T3 at which the application C receives the notification message 606 last time (that is, T1>T2>T3). In this case, the notification center app may sequentially arrange the identifier 701, the identifier 702, and the identifier 703 in a sequence of the application A, the application B, and the application C.
Alternatively, when displaying the identifiers of the applications in the operation bar 700, the notification center app may sort the identifiers of the applications based on duration of using the application A, the application B, and the application C by the user. For example, the notification center app may collect statistics about the duration of using the application A, the application B, and the application C by the user in a last period (for example, 24 hours). If the use duration of the application C is greater than the use duration of the application B, and the use duration of the application B is greater than the use duration of the application A, the notification center app may sequentially arrange the identifier 701, the identifier 702, and the identifier 703 in a sequence of the application C, the application B, and the application A.
Similarly, when displaying the identifiers of the applications in the operation bar 700, the notification center app may alternatively sort the identifiers of the applications based on frequencies of using the application A, the application B, and the application C by the user. For example, the notification center app may collect statistics about quantities of times that the user uses the application A, the application B, and the application C in a last period (for example, 24 hours). If the use duration of the application C is greater than the use duration of the application A, and the use duration of the application A is greater than the use duration of the application B, the notification center app may sequentially arrange the identifier 701, the identifier 702, and the identifier 703 in a sequence of the application C, the application A, and the application B.
Alternatively, the user may manually set an identifier of an application that is preferentially displayed in the operation bar 700. As shown in (a) in
In addition, after the notification center app displays identifiers of a plurality of applications in the operation bar 700, the user may also manually change a sequence relationship between the identifiers of the applications. For example, in the notification bar 602 shown in
In this embodiment of this application, the user may input a corresponding operation on an identifier of an application in the operation bar 700, to trigger the notification center app to perform a management operation such as filtering, pinning, or deleting on the notification message by using an application as a granularity, so as to improve management efficiency and use experience of the user on the notification message in the notification bar.
In some embodiments, as shown in
For example, a notification manager located at an application framework layer of the mobile phone may store, in a preset database 1, notification objects sent by applications, where each notification object corresponds to one notification message. The notification bar 602 shown in
When it is detected that the user taps the button 801, the notification center app may send a first instruction to the notification manager, where the first instruction is used to instruct to display all of the notification messages in the notification bar 602. In this way, the notification manager may instruct, in response to the first instruction, the notification center app to draw a corresponding notification message in the notification bar 602 based on each notification object shown in Table 2 in this case, and finally display, in the notification bar 602, all of the notification messages currently received by the applications.
For example, after obtaining each notification object in Table 2, the notification center app may invoke ViewPager (a view page turning tool) to create a viewpager 1. In this way, ViewPager can draw each notification object as a control (View) in the viewpager 1. Subsequently, the notification center app may display content in the viewpager 1 in the notification bar 602, to display all of the currently received notification messages.
In some embodiments, the user may further trigger, by operating identifiers of one or more applications in the operation bar 700, the notification center app to filter the current notification message in the notification bar 602 by using an application as a granularity.
For example, still as shown in
For example, after it is detected that the user taps the identifier 701 of the application A, the notification center app may send a second instruction to the notification manager, where the second instruction is used to instruct to display all of the notification messages of the application A in the notification bar 602. Further, in response to the second instruction, the notification manager may filter out, from the notification objects shown in Table 2, one or more notification objects corresponding to the application A, that is, the notification object 1 and the notification object 3. In this way, the notification manager may instruct the notification center app to draw, in the notification bar 602 based on the notification object 1 and the notification object 3 that are filtered out, the notification message 603 and the notification message 605 that are currently received by the application A.
For example, the notification center app may invoke ViewPager to create a viewpager 2. Further, ViewPager may draw the notification object 1 that is filtered out as a control (View) in the viewpager 2, and draw the notification object 3 that is filtered out as a control (View) in the viewpager 2. Subsequently, the notification center app may display content in the viewpager 2 in the notification bar 602, to display all of the notification messages currently received by the application A. In some embodiments, the notification center app may set a sequence of the notification message 603 and the notification message 605 in the notification bar 602 based on receiving time points of the notification message 603 and the notification message 605.
In this way, the user may select the identifier 701 of the application A in the operation bar 700, to filter out all of the notification messages of the application A in the notification bar 602, so that the user can quickly find a notification message of an application by using an application as a granularity, thereby improving management efficiency and use experience of the user on the notification message in the notification bar 602.
The notification bar 602 shown in
Alternatively, if it is detected that the user inputs a filtering operation on the identifier 702 of the application B in the operation bar 700, for example, taps the identifier 702 of the application B, as shown in
The notification bar 602 shown in
Further, if the user wants to continue to cancel filtering of the notification message of the application B in the notification bar 602, the user may further input the preset filtering cancellation operation for the identifier 702 of the application B in the operation bar 700. For example, if it is detected that the user taps again (that is, a filtering cancellation operation) the identifier 702 of the application B in the operation bar 700, as shown in
It can be learned that the user may select identifiers of one or more applications in the operation bar 700, to trigger the notification center app to filter out, in the notification bar 602, corresponding notification messages of the one or more applications for the user, so that the user can quickly find a notification message of an application by using an application as a granularity, thereby improving management efficiency and use experience of the user on the notification message in the notification bar 602.
In some embodiments, the user may further trigger, by operating identifiers of one or more applications in the operation bar 700, the notification center app to display corresponding notification messages of the one or more applications on the top in the notification bar 602.
For example, as shown in (a) in
In response to the third instruction, the notification manager may add, in the database 1, a preset status identifier to the notification objects (that is, the notification object 1 and the notification object 3) corresponding to the application A, where the status identifier is used to indicate that the corresponding notification objects are in a pinned state. Further, as shown in Table 3, the notification manager may rearrange notification objects in the database 1 based on the database 1 shown in Table 2, and arrange notification objects in a pinned state at the top of the database 1. Further, the notification manager may indicate the notification center app to draw a corresponding notification message in the notification bar 602 based on each notification object shown in Table 3. Finally, as shown in (b) in
Still as shown in (b) in
Because the notification message of the application A is displayed on the top, when the notification center app subsequently receives a notification message (for example, a notification message 1301) from the application A again, as shown in
For example, after receiving the notification message 1301, the application A may send a notification object 5 corresponding to the notification message 1301 to the notification manager. Because the notification object 5 comes from the application A, and the application A is set to a pinned state by the user, the notification manager may add a status identifier indicating the pinned state to the notification object 5, and add the notification object 5 to the top of the database 1 shown in Table 3, to obtain the database shown in Table 4. Further, the notification manager may indicate the notification center app to draw a corresponding notification message in the notification bar 602 based on each notification object shown in Table 4, and finally obtain the notification bar 602 shown in
Correspondingly, if the new notification message received by the notification center app is not from an application that is pinned to the top in the operation bar 700, the notification center app may display the received new notification message after a notification message that is pinned to the top in the notification bar 602.
In other words, the user may select identifiers of one or more applications in the operation bar 700, to trigger the notification center app to display all notification messages of the application on the top in the notification bar 602, so that the user can quickly find a notification message of an application by using an application as a granularity, thereby improving management efficiency and use experience of the user on the notification message in the notification bar 602.
In some embodiments, in addition to displaying a notification message of one application on the top, the notification center app may further display notification messages of a plurality of applications on the top. As shown in (a) in
Alternatively, as shown in (b) in
An example in which the notification messages of the application A and the application C in the notification bar 602 are displayed on the top is still used. If it is detected that the user drags the identifier 701 of the application A in the operation bar 700 again to slide downwards, that is, the user inputs a preset unpinning operation, it indicates that the user does not need to display the notification message of the application A on the top in the notification bar 602. In this case, as shown in Table 5, the notification center app may indicate the notification manager to delete the status identifiers indicating the pinned state in the notification object 1 and the notification object 3. In this case, only the notification object 4 of the application C includes a status identifier indicating the pinned state. Further, as shown in (a) in
Similarly, the notification bar 602 shown in (a) in
In some embodiments, in addition to displaying notification messages of one or more applications on the top in the notification bar 602 by using an application as a granularity, the notification center app may further display one or more notification messages on the top in the notification bar 602. For example, as shown in (a) in
Further, still as shown in (b) in
Alternatively, after the notification center app displays all notification messages of an application on the top in the notification bar 602, the user may cancel a pinning function of one or more notification messages of the notification messages.
As shown in
For another example, as shown in (a) in
In other words, a pinning operation or an unpinning operation performed by the user on a notification message does not affect a pinning function set for another notification message of a corresponding application.
In some embodiments, the user may also preset one or more applications (which may be referred to as a pinned application) that need to display a notification message on the top in the notification bar 602. As shown in (a) in
In some embodiments, the user may further trigger, by operating identifiers of one or more applications in the operation bar 700, the notification center app to delete, from the notification bar 602, notification messages of the corresponding one or more applications.
For example, as shown in (a) in
In response to the fourth instruction, the notification manager may delete all of the notification objects of the applications A from the database 1 shown in Table 2. In this case, as shown in Table 6, an updated database 1 includes only the notification objects of the application B and the application C. Further, the notification manager may indicate the notification center app to draw corresponding notification messages in the notification bar 602 based on each notification object shown in Table 6. Finally, as shown in (b) in
For another example, as shown in (a) in
For another example, as shown in (a) in
Alternatively, as shown in
In this way, by selecting the identifier 701 of the application A in the operation bar 700, the user may delete notification messages of one or more applications in the notification bar 602 in batches, so that the user manages the notification messages in the notification bar 602 by using an application as a granularity, thereby improving user experience.
In some embodiments, as shown in (a) in
Alternatively, as shown in
Alternatively, still as shown in
It can be learned that, according to the notification message management method provided in this embodiment of this application, an identifier of an application that currently has a notification message may be displayed in the operation bar. The user may quickly and conveniently filter, pin, or delete, by using an application as a granularity, notification messages of one or more applications by operating the identifier of the application in the operation bar, so that the user does not need to search for each notification message in the notification bar and manage the notification message, thereby improving management efficiency and use experience of the user on the notification message in the notification bar.
An embodiment of this application discloses an electronic device, including a processor, and a memory, an input device, and an output device that are connected to the processor. The input device and the output device may be integrated into one device. For example, a touch sensor may serve as the input device, a display may serve as the output device, and the touch sensor and the display may be integrated to form a touchscreen.
In this case, as shown in
For example, the processor 2602 may be specifically the processor 110 shown in
The foregoing descriptions about implementations allow a person skilled in the art to understand that, for the purpose of convenient and brief description, division of the foregoing functional modules is taken as an example for illustration. In actual application, the foregoing functions can be allocated to different modules and implemented according to a requirement, that is, an inner structure of an apparatus is divided into different functional modules to implement all or some of the functions described above. For a detailed working process of the foregoing system, apparatus, and unit, refer to a corresponding process in the foregoing method embodiments, and details are not described herein again.
Functional units in embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit. The foregoing integrated unit may be implemented in a form of hardware, or may be implemented in a form of a software functional unit.
When the integrated unit is implemented in the form of the software functional unit and sold or used as an independent product, the integrated unit may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of embodiments of this application essentially, or the part contributing to the conventional technology, or all or some of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or some of the steps of the methods described in embodiments of this application. The foregoing storage medium includes any medium that can store program code, such as a flash memory, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disc.
The foregoing descriptions are merely specific implementations of embodiments of this application, but are not intended to limit the protection scope of embodiments of this application. Any variation or replacement within the technical scope disclosed in embodiments of this application shall fall within the protection scope of embodiments of this application. Therefore, the protection scope of embodiments of this application shall be subject to the protection scope of the claims.
Number | Date | Country | Kind |
---|---|---|---|
202011257002.0 | Nov 2020 | CN | national |
This application is a national stage of International Application No. PCT/CN2021/129387, filed on Nov. 8, 2021, which claims priority to Chinese Patent Application No. 202011257002.0, filed on Nov. 11, 2020. Both of the aforementioned applications are incorporated herein by reference in their entireties.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2021/129387 | 11/8/2021 | WO |