WO2024078306A1 - 横幅通知消息的显示方法与电子设备 - Google Patents

横幅通知消息的显示方法与电子设备 Download PDF

Info

Publication number
WO2024078306A1
WO2024078306A1 PCT/CN2023/120891 CN2023120891W WO2024078306A1 WO 2024078306 A1 WO2024078306 A1 WO 2024078306A1 CN 2023120891 W CN2023120891 W CN 2023120891W WO 2024078306 A1 WO2024078306 A1 WO 2024078306A1
Authority
WO
WIPO (PCT)
Prior art keywords
window
electronic device
message
application
notification message
Prior art date
Application number
PCT/CN2023/120891
Other languages
English (en)
French (fr)
Inventor
蔡世宗
何书杰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024078306A1 publication Critical patent/WO2024078306A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72427User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for supporting games or graphical animations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72436User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for text messaging, e.g. short messaging services [SMS] or e-mails

Definitions

  • the present application relates to the field of terminal technology, and in particular to a method for displaying a banner notification message and an electronic device.
  • an electronic device detects a notification message generated by an application (APP)
  • the electronic device can display the notification message in the form of a banner notification so that the user can be informed of the notification message in time.
  • APP application
  • an electronic device displays the notification message on a system interface.
  • the electronic device 100 may display a banner notification message on the system interface so that the user can obtain the WeChat message in a timely manner.
  • the method for displaying the banner notification message has the following technical problems: when the electronic device works in multi-window collaboration with other devices, if the system interface window of the electronic device is not displayed on the collaborative device, the collaborative device cannot display the banner notification message, thereby affecting the user's ability to obtain the banner notification message in a timely manner; when the electronic device is in a multi-window working state, the user cannot accurately know the application to which the banner notification message belongs.
  • the electronic device 300 can also support the simultaneous display of other application windows, such as the electronic device 300 in Figure 2 also supports the simultaneous display of the WeChat window.
  • the WeChat application receives a notification message, a banner notification message will be displayed on the user interface.
  • the user places the electronic device 200 next to it and minimizes the window to which the user interface belongs on the electronic device 300, the user will not be able to immediately perceive the banner notification message.
  • the electronic device 400 in a scenario where the electronic device 400 can simultaneously support at least one floating window windowed application, if an application in the terminal device receives a notification at this time, the electronic device 400 will display a banner notification message on the system interface, but the user will not be able to immediately perceive which application the banner notification message specifically comes from, resulting in a poor user experience.
  • the present application provides a method and electronic device for displaying a banner notification message, so that the banner notification message can be displayed in the window of the application that generates the banner notification message, so that even when the system interface window of the first electronic device is not displayed on the collaborative device, the user can immediately know the banner notification message, and even when the first electronic device is in a multi-window working state, the user can accurately know the source of the banner notification message, thereby improving the user experience.
  • the present application provides a method for displaying a banner notification message, which is applied to a first electronic device, and includes: obtaining a banner notification message, the banner notification message including message content and a message package name; when a window of an application corresponding to the message package name is in a display state, displaying the message content in a display area of the window.
  • the first electronic device when the first electronic device obtains the banner notification message, it first determines the application from which the banner notification message comes based on the message package name included in the banner notification message, and then when the window of the application is in the display state, the message content in the banner notification message is displayed in the window of the application by means of a banner notification.
  • the application window in the display state can be understood as a window that can be seen by the user.
  • the application window in the display state is also referred to as the application window being in the foreground.
  • the banner notification message is no longer displayed at a fixed position in the system interface of the first electronic device. Instead, the banner notification message depends on a specific application window and is displayed following the application window. As a result, even when the system interface window of the first electronic device is not displayed on the collaborative device, the user can immediately know the banner notification message. Even when the first electronic device is in a multi-window working state, the user can accurately know the source of the banner notification message, thereby improving the user experience.
  • the method further includes: when the window of the application corresponding to the message package name is in a closed state or a hidden state, displaying the message content at a preset position in the interface currently displayed by the first electronic device.
  • the closed state of the application window can be considered to mean that the application window is not open and cannot be perceived by the user.
  • the hidden state of the application window can be considered to mean that the application window is open but cannot be perceived by the user due to reasons such as minimization.
  • the first electronic device when the first electronic device determines that the window of the application corresponding to the message package name is in a closed state or a hidden state, the first electronic device will still display the message content in a preset position in the interface currently displayed by the first electronic device through a banner notification, so as to be able to notify the user of the notification message.
  • displaying message content in a display area of a window includes: adding a first control in a window component of an application corresponding to the message package name, the first control including the message content; and displaying a window of the application based on the window component of the application.
  • the message content displayed by the banner notification and the window component of the application can be synthesized into one layer, thereby displaying the message content in the banner notification message in the window of the application.
  • a window of an application corresponding to the message package name is displayed in a second electronic device, and the method further includes: sending a window component of the application to the second electronic device, and the second electronic device and the first electronic device are in a multi-window collaborative working state.
  • the first electronic device and the second electronic device are in a multi-window collaborative working state, for example, the first electronic device and the second electronic device are in a multi-screen collaborative state.
  • the first electronic device sends the window component of the application after the first space is added to the second electronic device, so that the second electronic device can display the message content in the banner notification message in the window of the application.
  • the window of the application corresponding to the message package name is different from the window of the interface currently displayed by the first electronic device in the second electronic device.
  • the window of the application corresponding to the message package name is different from the window of the interface currently displayed on the first electronic device in the second electronic device, no matter what the state of the window of the interface currently displayed on the first electronic device in the second electronic device is (for example, whether it is closed, the window is minimized, or it is displayed), the user can instantly perceive the message content in the banner notification message.
  • displaying the message content in the display area of the window includes: calculating the display area of the window of the application corresponding to the message package name in the screen to which the window belongs; creating a second control, the second control containing the message content; and displaying it in the display area based on the second control.
  • the first electronic device when the first electronic device obtains the application corresponding to the message package name and the window of the application is in a display state, it calculates the display area of the application window, and then creates a second message control to display the message content of the banner notification message in the window of the application.
  • the present application provides a device for a banner notification message, which is applied to a first electronic device, and includes: an acquisition module, used to obtain a banner notification message, the banner notification message including a message content and a message package name; a display module, used to display the message content in the display area of the window when the window of the application corresponding to the message package name is in a display state.
  • the display module is also used to: when the window of the application corresponding to the message package name is in a closed state or a hidden state, display the message content at a preset position in the interface currently displayed by the electronic device.
  • the display module is specifically used to: add a first control in the window component of the application corresponding to the message package name, the first control including the message content; and display the window of the application based on the window component of the application.
  • the window of the application corresponding to the message package name is displayed in the second electronic device, and the display module is also used to: send the window component of the application to the second electronic device, and the second electronic device and the first electronic device are in a multi-window collaborative working state.
  • the window of the application corresponding to the message package name is different from the window of the interface currently displayed by the first electronic device in the second electronic device.
  • the display module is specifically used to: calculate the display area of the window of the application corresponding to the message package name in the screen to which the window belongs; create a second control, the second control containing the message content; and display it in the display area based on the second control.
  • the present application provides an electronic device, comprising: a memory, a processor, and a device stored in the memory and operable on the processor.
  • a running computer program when the processor executes the computer program, causes the electronic device to execute the method described in the first aspect or any possible implementation manner thereof.
  • the present application provides a computer-readable medium, wherein the computer-readable medium stores a program code for computer execution, wherein the program code includes a method for executing the method described in the first aspect or any possible implementation thereof.
  • the present application provides a computer program product, which includes a computer program code.
  • the computer program code runs on a computer, the computer implements the method described in the first aspect or any possible implementation method thereof.
  • FIG1 is a schematic diagram showing a display of an existing banner notification message provided by the present application.
  • FIG2 is a schematic diagram showing another existing banner notification message provided by the present application.
  • FIG3 is a schematic diagram showing another existing banner notification message provided by the present application.
  • FIG4 is a schematic diagram showing a display of an existing banner notification message provided by the present application.
  • FIG5 is a schematic diagram of a software implementation scheme for displaying an existing banner notification message provided by the present application.
  • FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a software architecture of an electronic device provided in an embodiment of the present application.
  • FIG8 is a flowchart of a method for displaying a banner notification message provided by an embodiment of the present application.
  • FIG9 is a schematic diagram showing a display of a banner notification message provided by the present application.
  • FIG10 is a schematic diagram showing another display of a banner notification message provided by the present application.
  • FIG11 is a schematic diagram showing another display of a banner notification message provided by the present application.
  • FIG12 is a schematic diagram showing the relationship between a banner notification message instance and an application instance provided by an embodiment of the present application
  • FIG13 is a schematic diagram of the structure of a window component of an application provided by an embodiment of the present application.
  • FIG14 is a schematic diagram of the implementation of the corresponding software when a banner notification message is displayed in an application window provided in one embodiment of the present application;
  • FIG15 is a schematic diagram of displaying a banner notification message in an application window provided by another embodiment of the present application.
  • FIG16 is a schematic flowchart of a method for displaying a banner notification in a screen projection scenario provided by the present application
  • FIG17 is a schematic flowchart of another method for displaying a banner notification in a screen projection scenario provided by the present application.
  • FIG18 is a schematic diagram of the structure of a display device for a banner notification message provided by an embodiment of the present application.
  • FIG. 19 is a schematic diagram of the structure of a device for displaying a banner notification message according to an embodiment of the present application.
  • Multi-screen collaboration is a cross-screen collaboration technology between multiple devices.
  • Multi-screen collaboration technology generally refers to task collaboration between different device attributes based on wireless state, such as between mobile phones, tablet computers and laptops.
  • the biggest difference between multi-screen collaboration and traditional multi-display connection is mainly wireless and cross-system.
  • NFC technology can be used to quickly pair two independent devices, and the mobile phone and laptop can be connected through wireless network technology, so that the content of the mobile phone screen can be displayed on the laptop screen in real time, and the mobile phone can be directly operated by touch or keyboard and mouse.
  • the content of the mobile phone and computer screens is completely synchronized in real time, and the mobile phone can also be operated normally in the multi-screen collaboration state.
  • Multi-screen collaboration enables seamless file transfer between mobile phones and PCs. Data is transmitted between the two devices through the network instead of Bluetooth, and the transmission efficiency is higher. Since the operations between the mobile phone and the device are completely synchronized, it is impossible to perform different operations on the mobile phone screen on the mobile phone and PC at the same
  • the system interface includes the notification center message (Notification), the status bar (status bar) at the top of the interface, the navigation bar (Navigation Bar) at the bottom, the lock screen interface (Keyguard), the power interface (Power UI), the recent task interface (Recent Task), etc.
  • the System UI can be intuitively felt.
  • Banner notifications also known as reminder notifications, are for notifications that users should know immediately. They will briefly float on the current electronic device. On the system UI, it disappears after the display time expires or the user swipes up, and then remains displayed in the notification drawer.
  • an electronic device detects a notification message generated by an application (APP)
  • the electronic device can display the notification message in the form of a banner notification so that the user can be informed of the notification message in time.
  • APP application
  • the electronic device is also referred to as a terminal device.
  • an electronic device displays the notification message on a system interface.
  • the electronic device 100 may display a banner notification message on the system interface so that the user can obtain the WeChat message in a timely manner.
  • the method for displaying the banner notification message has the following technical problems: when the electronic device works in multi-window collaboration with other devices, if the system interface window of the electronic device is not displayed on the collaborative device, the collaborative device cannot display the banner notification message, thereby affecting the user's timely notification of the banner notification message; when the electronic device is in a multi-window working state, the user cannot accurately know the application to which the banner notification message belongs, resulting in a poor user experience.
  • the electronic device 300 can also support the simultaneous display of other application windows, such as the electronic device 300 in FIG2 also supports the simultaneous display of the WeChat window.
  • the WeChat application receives a notification message, a banner notification message will be displayed on the user interface.
  • the user places the electronic device 200 next to it and minimizes the window to which the user interface belongs in the electronic device 300, then the user will not be able to immediately perceive the banner notification, resulting in a poor user experience.
  • the electronic device 400 can simultaneously support at least one floating window windowed application, if an application in the electronic device receives a notification at this time, the electronic device 400 will display a banner notification message on the system interface, but the user will not be able to immediately perceive which application the banner notification message specifically comes from, resulting in a poor user experience.
  • the desktop on the display is already another display screen, which is unrelated to the content displayed on the mobile phone 500.
  • the WeChat application is opened on the display side (also called the projection side), and a friend replies to a WeChat message.
  • the banner notification message can only be displayed on the system interface of the mobile phone side, so that the user cannot immediately perceive the situation of the banner notification message, resulting in a poor user experience.
  • the software implementation scheme of the current electronic device when displaying the notification message of the APP in the form of a banner notification message is shown in Figure 5, wherein the APP, as a client, sends the notification message to the notification management module (for example, the Notification Manager module) in the electronic device, and then the notification management module manages and runs the notification message and sends it to the notification management service module (for example, the Notification Manager Service module), which is responsible for interacting with the system interface module to display the banner notification through the system interface module.
  • the notification management module for example, the Notification Manager module
  • the notification management service module for example, the Notification Manager Service module
  • this embodiment does not limit the specific form of the APP, for example, it can be WeChat, Alipay, or other third-party applications.
  • the screen in the screen projection scenario, there is no restriction on the specific screen projection method used between two electronic devices.
  • the screen can be projected in a wired manner, or in a wireless manner, or in a near field communication (NFC), etc.
  • NFC near field communication
  • FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. It should be noted that in this embodiment, the electronic device is also referred to as a terminal device.
  • the electronic device 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, 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 sensor module 180, a button 190, Indicator 192, camera 193, and display screen 194, etc.
  • USB universal serial bus
  • the above-mentioned 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.
  • the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device.
  • the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain 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.
  • the processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transmit data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other terminal devices, such as AR devices, etc.
  • the charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the charging management module 140 to the processor 110 .
  • the wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to terminal devices.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the wireless communication module 160 can provide wireless communication solutions for application in terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • the terminal device realizes the display function through the GPU, the display screen 194 and the application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel, a backlight, a bias circuit, and a PD.
  • the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • the camera 193 is used to capture static images or videos.
  • the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
  • the internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions.
  • the internal memory 121 can include a program storage area and a data storage area.
  • the terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the speaker 170A also known as the "speaker” is used to convert audio electrical signals into sound signals.
  • the terminal device can listen to music or listen to hands-free calls through the speaker 170A.
  • the receiver 170B also known as the "earpiece”, is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also known as the "microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
  • the pressure sensor 180A can be set on the display screen 194.
  • the gyroscope sensor 180B can be used to determine the motion posture of the terminal device.
  • the air pressure sensor 180C is used to measure the air pressure.
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes).
  • the distance sensor 180F is used to measure the distance.
  • the proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the temperature sensor 180J is used to detect the temperature.
  • the touch sensor 180K is also called a "touch device”.
  • 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 bone conduction sensor 180M can obtain a vibration signal.
  • the button 190 includes a power button, a volume button, etc.
  • the button 190 may be a mechanical button. It may also be a touch button.
  • the terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
  • the electronic device can be a mobile phone, a tablet computer, a personal computer (PC), a smart screen, an artificial intelligence (AI) speaker, a car machine device, a wearable terminal device such as a smart watch, or various teaching auxiliary tools (such as a learning machine, an early education machine), a smart toy, a portable robot, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, etc. It can also be a device with a mobile office function, a device with a smart home function, a device with an audio and video entertainment function, a device supporting smart travel, etc.
  • PDA personal digital assistant
  • AR augmented reality
  • VR virtual reality
  • the software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
  • the layered architecture can adopt an Android system, an Apple (IOS) system, or other operating systems, which are not limited in the embodiments of the present application.
  • the following takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device.
  • FIG7 is a software structure block diagram of an electronic device applicable to an embodiment of the present application.
  • the layered architecture divides the software system of the terminal device into several layers, each layer has a clear role and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system can be divided into four layers, from top to bottom, namely, the application layer (applications), the application framework layer (application framework), the Android runtime (Android runtime) and the system library, the hardware abstraction layer, and the kernel layer (kernel).
  • the application layer can include a series of application packages, and the application layer runs applications by calling the application programming interface (API) provided by the application framework layer.
  • API application programming interface
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, Bluetooth, music, video, and SMS.
  • the application framework layer provides API and programming framework for the applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, an activity manager, a notification manager, a package manager, a resource manager, an application manager, a phone manager, and the like.
  • the window manager is used to manage window programs.
  • the window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • the activity manager is used to manage the life cycle of each application and the navigation fallback function. It is responsible for the creation of the Android main thread and the maintenance of the life cycle of each application.
  • the activity management service includes the process list, remote callback interface, process priority controller, etc.
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, 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 notifications of applications 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 displayed in the status bar, a prompt sound is emitted, the terminal device vibrates, the indicator light flashes, etc.
  • the package manager is used for program management within the system, such as application installation, uninstallation, and upgrades.
  • the resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
  • the phone manager is used to manage mobile device functions, including: mobile phone call status, obtaining phone information (device, SIM card, network information), monitoring phone status, and calling the phone dialer to make calls.
  • the Android system runtime includes the core library and the virtual machine.
  • the Android system runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer run in the virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • Virtual Machine It is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the virtual machine also runs a display synthesis process (for example, surface flinger). The display synthesis process is used to control the synthesis of images.
  • the system library can include multiple functional modules, such as image drawing module, image rendering module, image synthesis module, function library and media library.
  • the image drawing module is used for drawing two-dimensional or three-dimensional images.
  • the image rendering module is used for rendering two-dimensional or three-dimensional images.
  • the image synthesis module is used for synthesizing two-dimensional or three-dimensional images.
  • the application draws the image through the image drawing module, and then the application renders the drawn image through the image rendering module, and then the application sends the rendered image to the cache queue of the display synthesis process.
  • the display synthesis process for example, surface flinger sequentially obtains a frame of image to be synthesized from the cache queue, and then synthesizes the image through the image synthesis module.
  • the function library provides macros, type definitions, string manipulation functions, mathematical calculation functions, and input and output functions used in the C language.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the hardware abstraction layer can contain multiple library modules, such as the hardware configuration module (hwcomposer, HWC), the camera library module, etc.
  • the Android system can load the corresponding library module for the device hardware, thereby enabling the application framework layer to access the device hardware.
  • Device hardware can include LCD screens, cameras, etc. in electronic devices.
  • the kernel layer is a layer between hardware and software.
  • the kernel layer is used to drive the hardware to make the hardware work.
  • the kernel layer at least includes display driver, screen driver, camera driver and sensor driver, etc., which are not limited in the embodiments of the present application.
  • words such as “first” and “second” are used to distinguish the same or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not necessarily limit the difference.
  • At least one means one or more
  • plural means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character “/” generally indicates that the previous and next associated objects are in an “or” relationship. "At least one of the following” or similar expressions refers to any combination of these items, including any combination of single or plural items.
  • At least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
  • FIG8 shows a method for displaying a banner notification message provided by an embodiment of the present application.
  • the method in this embodiment includes: S801 and S802.
  • the method provided by this embodiment can be executed by the electronic device shown in FIG6 or FIG7 .
  • the first electronic device obtains a banner notification message, where the banner notification message includes message content and a message package name.
  • the first electronic device can encapsulate the notification message into a banner notification message to be displayed, and then display the message content of the notification message to the user through a banner notification based on the banner notification message.
  • this embodiment does not limit the specific form of the APP.
  • it can be a chat software, or it can be a music software, etc.
  • the banner notification message obtained by the first electronic device includes the message content of the notification message and the message package name of the notification message.
  • the banner notification message obtained by the first electronic device in this application may also include more content, such as a message icon of the notification message.
  • message package name can usually be used to indicate the source of the notification message, that is, to indicate which application software the notification message comes from. It should also be understood that different message package names can usually indicate different application software.
  • the first electronic device when the first electronic device displays the message content of the notification message by means of a banner notification based on the banner notification message, it first determines the application from which the banner notification message comes based on the message package name in the banner notification message, and then determines whether the window of the application is in a display state.
  • the display state described here can be considered that the window of the application is visible to the user; when it is determined that the window of the application is in a display state, the message content of the notification message is displayed on the window of the application through a banner notification. That is, the banner notification is not displayed in a fixed position on the system interface, but follows the window of the application.
  • the electronic device 200 and the electronic device 300 shown in Figure 2 perform multi-screen collaborative work as an example
  • the banner notification display method provided in the embodiment of the present application when the electronic device 200 projects the current user interface to the electronic device 300, at this time, if the WeChat application receives a notification message, the electronic device 200 will first determine based on the message package name in the banner notification message after obtaining the banner notification message.
  • the message content of the notification message is displayed using the banner notification method, the message content comes from the WeChat application.
  • the window of the current WeChat application is in a display state, the message content of the notification message will be displayed in the WeChat window through a banner notification instead of being displayed in the current user interface.
  • the electronic device 400 shown in Figure 3 can simultaneously support at least one floating window windowed application
  • the banner notification display method provided in the embodiment of the present application is adopted, as shown in Figure 10
  • the electronic device 400 will first determine based on the message package name in the banner notification message after obtaining the banner notification message, that the message content of the notification message comes from the WeChat application when the banner notification method is used to display the message content of the notification message, and then, since the current WeChat application window is in a display state, the message content of the notification message will be displayed in the WeChat window through the banner notification.
  • the desktop on the display is already another display screen, which is unrelated to the content displayed on the mobile phone 500.
  • the WeChat application is opened on the display end (also called the projection end). If the WeChat application receives a notification message at this time, the electronic device 500 will first determine based on the message package name in the banner notification message that the message content of the notification message comes from the WeChat application when the message content of the notification message is displayed using the banner notification method, and then, because the current WeChat application window is in the display state, the message content of the notification message will be displayed in the WeChat window through the banner notification.
  • the first electronic device when the first electronic device obtains the banner notification message, it first determines the application from which the banner notification message comes based on the message package name included in the banner notification message, and then when the window of the application is in a displayed state, displays the message content in the banner notification message in the application window by means of a banner notification.
  • Step 1 The first electronic device obtains the source of the banner notification message to achieve one-to-one binding between the banner notification message and the application.
  • a notification record refers to a specific banner notification message instance, which includes the message content, message package name and other contents (optionally, it may also include a message icon, etc.);
  • an activity stack refers to a specific application instance, each application instance corresponds to a stack, corresponds to a task (Task), and then goes to the specific activity record (for example, also called ActivityRceord) page, the task identifier (also called TaskId in this embodiment) is used to identify a Task, which can be used as a unique identifier of a data structure of the application.
  • a task identifier (TaskId) field is added to the message instance to establish a unique identifier connection with ActivityStack.
  • the specific implementation is that when a NotificationRceord is generated, the corresponding TaskId is found according to the message package name in the NotificationRceord, and the obtained TaskId is assigned to the NotificationRceord.
  • Step 2 The first electronic device implements the display of a banner notification message following the application window.
  • the first device implementing the display of the banner notification message following the application window can also be considered as displaying the message content in the banner notification message in the display area of the application window.
  • it may include: adding a first control (e.g., also called a NotificationView control) in a window component (e.g., an Activity) of an application corresponding to the message package name, the first control including message content; and then displaying the application window based on the application window component.
  • a first control e.g., also called a NotificationView control
  • a window component e.g., an Activity
  • the window component of the application includes different controls, such as the third control (e.g., PhoneWindow control), the fourth control (e.g., DecorView control), and the fifth control (e.g., ContentView control) in the figure, wherein different controls can perform different services, and then a first control (e.g., NotificationView control) is added to the window component of the application to display the specific content of the banner notification message, thereby drawing the display content in the window component following the application process.
  • the third control e.g., PhoneWindow control
  • the fourth control e.g., DecorView control
  • the fifth control e.g., ContentView control
  • a first control e.g., NotificationView control
  • the method in this embodiment further includes: sending the window component of the application to the second electronic device, so that the second electronic device can display the message content in the banner notification message in the window of the application.
  • FIG14 is a schematic diagram of the implementation of the corresponding software when the first electronic device displays the banner notification message in the application window in this embodiment, mainly involving the application framework layer and the application layer. As shown in FIG14, it includes:
  • the notification management module is entered by calling a first service (eg, notify).
  • a first service eg, notify
  • the first service can be considered as a service that needs to be used when entering the notification management module.
  • the notification management module calls a second service (eg, enqueNotificationWithTag) to send a notification message to a notification management.Stub module (eg, NotificationManager.Stub).
  • a second service eg, enqueNotificationWithTag
  • a notification management.Stub module eg, NotificationManager.Stub
  • the second service can be considered as a service that needs to be used when entering the notification management.Stub module.
  • the notification management.Stub module calls a third service (eg, enqueNotificationInternal) to send a notification message to the notification management service module (eg, NotificationManagerService).
  • a third service eg, enqueNotificationInternal
  • the notification management service module eg, NotificationManagerService
  • the third service can be considered as a service that needs to be used when entering the notification management service module.
  • the notification management service module calls the create message instance service to send the notification message to the notification record module (NotificationRecord), thereby obtaining a banner notification message.
  • the notification recording module generates a banner notification message based on the notification message, and returns the banner notification message to the notification management service module.
  • the notification management service module calls the fourth service to obtain the task identifier corresponding to the notification message package name, and adds the task identifier to the banner notification message.
  • the fourth service is a service that can obtain the task identifier of the corresponding application based on the message package name.
  • the notification management service module calls the fifth service (eg, notifyPostedLocked) to send the banner notification message after adding the task identifier to the notification monitoring module.
  • the fifth service eg, notifyPostedLocked
  • the fifth service can be considered as a service that needs to be used when the notification management service needs to enter the notification monitoring module.
  • the notification monitoring module calls the sixth service (eg, onNotificationPosted) to send the banner notification message after adding the task identifier to the first target module (eg, called HwPCManagerService).
  • the sixth service eg, onNotificationPosted
  • the sixth service may be considered as a service that needs to be used when the notification monitoring module needs to enter the first target module and send a banner notification message after adding the task identifier to the first target module.
  • the first target module calls the seventh service (eg, updateNotificationView) to send the banner notification message after adding the task identifier to the notification visual management module (eg, called NotificationViewManager).
  • the seventh service eg, updateNotificationView
  • NotificationViewManager the notification visual management module
  • the seventh service can be understood as the service that the first target module needs to use when it needs to enter the NotificationViewManager and send the banner notification message after adding the task identifier to the NotificationViewManager.
  • the notification visual management module calls the eighth service to send the banner notification message after adding the task identifier to the notification visual module (NotificationView), so that NotificationView determines the application corresponding to the banner notification message based on the task identifier in the banner notification message after adding the task identifier, and displays the banner notification message in the window of the application.
  • NotificationView determines the application corresponding to the banner notification message based on the task identifier in the banner notification message after adding the task identifier, and displays the banner notification message in the window of the application.
  • the APP in the first electronic device acts as a client to send the notification message to the notification management module (for example, the Notification Manager module) in the electronic device, and then the notification management module manages and runs the notification message and sends it to the notification management service module (for example, the Notification Manager Service module).
  • the notification management module for example, the Notification Manager module
  • the notification management service module for example, the Notification Manager Service module.
  • the first electronic device can synthesize the message content displayed by the banner notification and the window component of the application into one layer, thereby displaying the message content in the banner notification message in the application window.
  • it may include: calculating the display area of the application window corresponding to the message package name; creating a second control, wherein the second control includes the message content; and displaying the message in the display area based on the second control.
  • the first electronic device may first calculate the position of the window of the application corresponding to the message package name in the display screen (i.e., the display area of the application window) in real time, and then create an independent second control, the second control including the message content to be displayed in the banner notification message, and finally display it in the display area based on the second control through the window manager service module, so as to realize the display of the message content to be notified in the application window.
  • this embodiment does not limit the specific calculation method for calculating the position of the window of the application corresponding to the message package name in the display screen.
  • a two-dimensional coordinate system can be constructed with the upper left corner of the display screen as the coordinate origin, and then the coordinate values (x, y) of the four corners of the application window relative to the coordinate origin are calculated respectively to obtain the display area of the application window corresponding to the message package name.
  • the method for displaying a banner notification provided in the present application also includes: when the window of the application corresponding to the message package name is in a closed state or a hidden state, displaying the message content at a preset position in the interface currently displayed by the first electronic device.
  • the closed state of the application window can be considered to mean that the application window is not open and cannot be perceived by the user.
  • the hidden state of the application window can be considered to mean that the application window is open but cannot be perceived by the user due to reasons such as minimization.
  • the first electronic device when the first electronic device determines that the window of the application corresponding to the message package name is in a closed state or a hidden state, the first electronic device will still display the message content in a preset position in the interface currently displayed by the first electronic device through a banner notification, so as to notify the user of the notification message. That is, when the first electronic device determines that the window of the application corresponding to the message package name is in a closed state or a hidden state, the first electronic device still displays the banner notification message through the system interface.
  • the first electronic device executes S1601: determining whether the application corresponding to the message package name in the banner notification message is windowed, and if so, executing S1602; otherwise, executing S1607.
  • the first electronic device detects a banner notification message and determines to display the notification message to the user through a banner notification
  • the message content is displayed in the application window by adding a first control in the window component of the application.
  • the window of the application corresponding to the message package name in the banner notification message is not in a display state, for example, the window of the application is not open, or is already open but has been minimized, then the existing System UI process is used for processing.
  • the first electronic device executes S1701: determining whether the application corresponding to the message package name in the banner notification message is windowed, and if so, executing S1702; otherwise, executing S1706.
  • S1703 Calculate the display area of the application window in the screen to which the window belongs.
  • the first electronic device detects a banner notification message and determines to display the notification message to the user through a banner notification
  • the message content is displayed in the application window by adding a second control.
  • the window of the application corresponding to the message package name in the banner notification message is not in a display state, for example, the application window is not open, or is already open but has been minimized, then the existing System UI process is used for processing.
  • Fig. 18 shows a schematic structural diagram of a display device 1800 provided in an embodiment of the present application.
  • the electronic device 1800 includes: an acquisition module 1801 and a display module 1802.
  • the device 1800 can be used to implement the method in any of the above method embodiments.
  • the acquisition module 1801 may be used to implement S801
  • the display module 1802 may be used to implement S802.
  • the terminal device 1800 here is embodied in the form of a functional module.
  • module here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor, etc.) and a memory for executing one or more software or firmware programs, a combined logic circuit and/or other suitable components that support the described functions.
  • ASIC application specific integrated circuit
  • processor such as a shared processor, a dedicated processor or a group processor, etc.
  • memory for executing one or more software or firmware programs, a combined logic circuit and/or other suitable components that support the described functions.
  • the terminal device 1800 may be specifically the terminal device in the above method embodiment, or the functions of the terminal device in the above method embodiment may be integrated in the terminal device 1800, and the terminal device 1800 may be used to execute the various processes and/or steps corresponding to the terminal device in the above method embodiment, and to avoid repetition, it will not be repeated here.
  • the terminal device 1800 has the function of implementing the corresponding steps performed by the terminal device in the above method embodiment; the above functions 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.
  • the terminal device 1800 in Figure 18 may also be a chip or a chip system, for example: a system on chip (SoC).
  • SoC system on chip
  • FIG19 is a schematic block diagram of another terminal device 1900 provided in an embodiment of the present application.
  • the terminal device 1900 includes a processor 1910, a transceiver 1920, and a memory 1930.
  • the processor 1910, the transceiver 1920, and the memory 1930 communicate with each other through an internal connection path, the memory 1930 is used to store instructions, and the processor 1920 is used to execute the instructions stored in the memory 1930 to control the transceiver 1920 to send and/or receive signals.
  • the terminal device 1900 can be specifically a terminal device in the above method embodiment, or the function of the terminal device in the above method embodiment can be integrated in the terminal device 1900, and the terminal device 1900 can be used to execute the various steps and/or processes corresponding to the terminal device in the above method embodiment.
  • the memory 1930 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory.
  • the memory may also store information about the device type.
  • the processor 1910 may be used to execute instructions stored in the memory, and when the processor executes the instruction, the processor may execute the various steps and/or processes corresponding to the terminal device in the above method embodiment.
  • the processor 1910 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • DSP digital signal processor
  • ASIC application-specific integrated circuits
  • FPGA field programmable gate arrays
  • a general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or by instructions in the form of software.
  • the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc.
  • the storage medium is located in a memory, and the processor executes the storage medium.
  • the instructions in the memory are combined with its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
  • the present application also provides a computer-readable storage medium, which is used to store a computer program, and the computer program is used to implement the method corresponding to the terminal device in the above method embodiment.
  • the present application also provides a chip system, which is used to support the terminal device in the above method embodiment to implement the functions shown in the embodiment of the present application.
  • the present application also provides a computer program product, which includes a computer program (also referred to as code or instruction).
  • a computer program also referred to as code or instruction.
  • the computer program runs on a computer, the computer can execute the method corresponding to the terminal device shown in the above method embodiment.
  • modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
  • the disclosed systems, devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, 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 modules, which can be electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art.
  • the computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

Landscapes

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

Abstract

本申请提供一种横幅通知消息的显示方法与装置。本申请提供的横幅通知消息的显示方法包括:第一电子设备获取到包括消息内容和消息包名的横幅通知消息后,若该消息包名对应的应用的窗口处于显示状态,则在消息包名对应的应用的窗口的显示区域中显示消息内容。本申请提供的横幅通知消息的显示方法,可以实现将横幅通知消息显示在产生该横幅通知消息的应用的窗口中,从而使得即使在与第一电子设备处于协同工作状态的协同设备上没有显示第一电子设备的系统界面窗口时,也可以使得用户立即获知该横幅通知消息,以及即使是在第一电子设备处于多窗口工作状态时,可以让用户准确获知该横幅通知消息的来源,从而提升用户体验。

Description

横幅通知消息的显示方法与电子设备
本申请要求于2022年10月10日提交中国专利局、申请号为202211232886.3、申请名称为“横幅通知消息的显示方法与电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及终端技术领域,尤其涉及一种横幅通知消息的显示方法与电子设备。
背景技术
随着手机等智能电子设备的发展,电子设备的功能越来越强。目前,电子设备检测到应用程序(application,APP)产生的通知消息时,电子设备可以通过横幅通知的方式显示该通知消息,以便于用户能够及时获知该通知消息。
目前,电子设备通过横幅通知的方式显示应用的通知消息的一种方式如下:电子设备在系统界面上显示该通知消息。例如,参见图1,电子设备100接收到微信消息时,电子设备100可以在系统界面上显示横幅通知消息,以便用户可以及时获取该微信消息。
但是,该横幅通知消息的显示方法存在如下技术问题:电子设备与其他设备多窗口协同工作时,若协同设备上没有显示电子设备的系统界面窗口,则协同设备不能显示横幅通知消息,从而影响用户及时获知该横幅通知消息;电子设备处于多窗口工作状态时,用户不能准确获知该横幅通知消息所属的应用。
例如,在多屏协同场景中,如图2所示,当电子设备200将当前的用户界面投屏至电子设备300时,电子设备300中除了可以显示当前的用户界面,电子设备300中还可以支持同时显示其他应用窗口,如图2中的电子设备300中还支持同时显示微信窗口。此时,若微信应用收到一条通知消息,则会在用户界面上展示横幅通知消息。但若此时,若用户将电子设备200放置在旁边且将用户界面在电子设备300所属的窗口最小化,那么就会出现用户无法即时感知到横幅通知消息的情况。
又例如,如图3所示,在电子设备400可以同时支持至少一个悬浮窗的窗口化应用的场景下,若此时终端设备中的某个应用程序接收到了一条通知,那么电子设备400会在系统界面上显示横幅通知消息,但是会存在用户无法立即感知到该横幅通知消息具体来源于哪个应用程序,导致体验感不佳。
因此,需要一种新的横幅通知消息的显示方法,使得即使是在上述场景中,也可以让用户立即知晓,从而提升用户体验。
发明内容
本申请提供了一种横幅通知消息的显示方法与电子设备,使得横幅通知消息可以显示在产生该横幅通知消息的应用的窗口中,从而使得即使在协同设备上没有显示第一电子设备的系统界面窗口时,也可以使得用户立即获知该横幅通知消息,以及即使是在第一电子设备处于多窗口工作状态时,也可以让用户准确获知该横幅通知消息的来源,从而提升用户体验。
第一方面,本申请提供一种横幅通知消息的显示方法,应用于第一电子设备,包括:获取横幅通知消息,横幅通知消息中包括消息内容和消息包名;当消息包名对应的应用的窗口处于显示状态时,在窗口的显示区域中显示消息内容。
本实施例提供的横幅通知消息的显示方法中,第一电子设备在获取到横幅通知消息时,首先基于横幅通知消息中包括的消息包名确定出该横幅通知消息来自的应用,然后当该应用的窗口处于显示状态时,将横幅通知消息中的消息内容通过横幅通知的方式显示在该应用的窗口中。其中,应用的窗口处于显示状态可以理解为是能够被用户看得见的窗口,本实施例中也将应用的窗口处于显示状态称为应用的窗口处于前台。
即,本实施例中,不再让横幅通知消息依附第一电子设备的系统界面中的固定位置进行显示,而是让横幅通知消息依赖于具体的应用窗口,以跟随应用窗口进行显示,从而使得即使在协同设备上没有显示第一电子设备的系统界面窗口时,也可以使得用户立即获知该横幅通知消息,以及即使是在第一电子设备处于多窗口工作状态时,也可以让用户准确获知该横幅通知消息的来源,从而提升用户体验。
结合第一方面,在一种可能的实现方式中,所述方法还包括:消息包名对应的应用的窗口处于关闭状态或隐藏状态时,在第一电子设备当前显示的界面中预设位置显示消息内容。
其中,应用的窗口处于关闭状态可以认为是指应用的窗口没有打开从而不能被用户感知的状态。应用的窗口处于隐藏状态可以认为是指应用的窗口已经打开但由于最小化等原因不能被用户感知的状态。
该实现方式中,当第一电子设备确定出消息包名对应的应用的窗口处于关闭状态或隐藏状态时,第一电子设仍会在第一电子设备当前显示的界面中的预设位置通过横幅通知的方式显示消息内容,以能够将通知消息通知给用户。
结合第一方面,在一种可能的实现方式中,在窗口的显示区域中显示消息内容,包括:在消息包名对应的应用的窗口组件中添加第一控件,第一控件中包含消息内容;基于应用的窗口组件显示应用的窗口。
在该实现方式中,由于将第一控件添加到了窗口组件中,因此可以实现将横幅通知显示的消息内容和应用的窗口组件合成一个图层,从而实现将横幅通知消息中的消息内容显示在应用的窗口中。
结合第一方面,在一种可能的实现方式中,消息包名对应的应用的窗口显示在第二电子设备中,所述方法还包括:向第二电子设备发送应用的窗口组件,第二电子设备与第一电子设备处于多窗口协同工作的状态。
其中,第一电子设备与第二电子设备处于多窗口协同工作的状态,例如第一电子设备与第二电子设备处于多屏协同的状态。
该实现方式中,第一电子设备通过向第二电子设备发送添加第一空间后的应用的窗口组件,以使得第二电子设备可以将横幅通知消息中的消息内容显示在应用的窗口中。
结合第一方面,在一种可能的实现方式中,消息包名对应的应用的窗口不同于第一电子设备当前显示的界面在第二电子设备中的窗口。
该实现方式中,由于消息包名对应的应用的窗口不同于第一电子设备当前显示的界面在第二电子设备中的窗口,因此,无论第一电子设备当前显示的界面在第二电子设备中的窗口的状态如何(例如无论是关闭的、或者是窗口最小化的、又或者是显示的),都可以实现让用户即时感知到横幅通知消息中的消息内容。
结合第一方面,在一种可能的实现方式中,在窗口的显示区域中显示消息内容,包括:计算消息包名对应的应用的窗口在窗口所属的屏幕中的显示区域;创建第二控件,第二控件中包含消息内容;在显示区域内基于第二控件进行显示。
该实现方式中,第一电子设备在获得消息包名对应的应用并在该应用的窗口处于显示状态时,会通过计算该应用的窗口的显示区域,然后在通过创建第二消息控件的方式以将横幅通知消息的消息内容显示在该应用的窗口中。
第二方面,本申请提供一种横幅通知消息的装置,应用于第一电子设备,包括:获取模块,用于获取横幅通知消息,横幅通知消息中包括消息内容和消息包名;显示模块,用于所述消息包名对应的应用的窗口处于显示状态时,在所述窗口的显示区域中显示所述消息内容。
结合第二方面,在一种可能的实现方式中,所述显示模块还用于:消息包名对应的应用的窗口处于关闭状态或隐藏状态时,在电子设备当前显示的界面中预设位置显示所述消息内容。
结合第二方面,在一种可能的实现方式中,所述显示模块具体用于:在消息包名对应的应用的窗口组件中添加第一控件,第一控件中包含所述消息内容;基于应用的窗口组件显示应用的窗口。
结合第二方面,在一种可能的实现方式中,所述消息包名对应的应用的窗口显示在第二电子设备中,所述显示模块还用于:向所述第二电子设备发送所述应用的窗口组件,所述第二电子设备与所述第一电子设备处于多窗口协同工作的状态。
结合第二方面,在一种可能的实现方式中,所述消息包名对应的应用的窗口不同于所述第一电子设备当前显示的界面在所述第二电子设备中的窗口。
结合第二方面,在一种可能的实现方式中,所述显示模块具体用于:计算消息包名对应的应用的窗口在窗口所属的屏幕中的显示区域;创建第二控件,第二控件中包含所述消息内容;在显示区域内基于所述第二控件进行显示。
第三方面,本申请提供一种电子设备,包括:存储器、处理器以及存储在存储器中并可在处理器上 运行的计算机程序,所述处理器执行所述计算机程序时,使得所述电子设备执行第一方面或其中任意一种可能的实现方式中所述的方法。
第四方面,本申请提供一种计算机可读介质,所述计算机可读介质存储用于计算机执行的程序代码,该程序代码包括用于执行第一方面或其中任意一种可能的实现方式中所述的方法。
第五方面,本申请提供一种计算机程序产品,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得所述计算机实现第一方面或其中任意一种可能的实现方式中所述的方法。
附图说明
图1为本申请提供的现有的一种横幅通知消息的显示示意图;
图2为本申请提供的现有的另一种横幅通知消息的显示示意图;
图3为本申请提供的现有的又一种横幅通知消息的显示示意图;
图4为本申请提供的现有的一种横幅通知消息的显示示意图;
图5为本申请提供的现有的一种横幅通知消息进行显示时的软件实现方案的示意图;
图6为本申请实施例提供的一种电子设备的结构示意图;
图7为本申请实施例提供的电子设备的一种软件架构示意图;
图8为本申请一个实施例提供的横幅通知消息的显示方法的流程性示意图;
图9为本申请提供的一种横幅通知消息的显示示意图;
图10为本申请提供的另一种横幅通知消息的显示示意图;
图11为本申请提供的又一种横幅通知消息的显示示意图;
图12为本申请一个实施例提供的横幅通知消息实例与应用实例之间的关系示意图;
图13为本申请一个实施例提供的应用的窗口组件的结构示意图;
图14为本申请一个实施例中提供的将横幅通知消息显示在应用的窗口时对应的软件上的实现示意图;
图15为本申请另一个实施例提供的将横幅通知消息显示到应用的窗口的示意图;
图16为本申请提供的在投屏场景下的一种横幅通知的显示方法的示意性流程图;
图17为本申请提供的在投屏场景下的另一种横幅通知的显示方法的示意性流程图;
图18为本申请一个实施例提供的横幅通知消息的显示装置的结构示意图;
图19为本申请一个实施例提供的横幅通知消息的显示装置的结构示意图。
具体实施方式
为了更好地理解本申请实施例的技术方案,下面先对本申请实施例中使用到的一些概念进行介绍。
1、多屏协同
多屏协同是一种多设备之间的跨屏协作技术,多屏协同技术一般是指基于无线状态下的不同设备属性之间的任务协作,如在手机、平板电脑和笔记本之间。多屏协同区别于传统多显示屏连接的最大不同主要是无线和跨系统两点,例如可以使用NFC技术使得两个独立设备快速配对,并通过无线网络技术将手机和笔记本进行连接,使得笔记本屏幕上能够实时显示手机屏幕的内容,且可以直接通过触控或者键鼠对手机端进行操作,手机端和电脑端屏幕的内容是完全实时同步的,在多屏协同状态下也可也正常操作手机。多屏协同能够使手机和PC的文件无缝传输,两个设备间通过网络而非蓝牙传输数据,传输效率更高。由于手机和设备之间的操作是完全同步的,所以无法同时在手机和PC上对手机屏幕进行不同的操作。
2、系统界面
系统界面(System UI),包括了通知中心的消息(Notification),界面上方的状态栏(status bar),下方的导航栏(Navigation Bar),锁屏界面(Keyguard),电源界面(Power UI),近期任务界面(Recent Task)等等。对于用户而言,System UI是能直观感受到的。
3、横幅通知
横幅通知,也称为提醒式通知,适用于用户应该立即知晓的通知,它会短暂地悬浮在当前电子设备 系统界面(SystemUI)上,等到显示时间耗尽或用户上划后消失,随后仍显示在通知抽屉中。
下面,结合图1至图4,说明本申请实施例的应用场景。
随着手机等智能电子设备的发展,电子设备的功能越来越强。目前,电子设备检测到应用程序(application,APP)产生的通知消息时,电子设备可以通过横幅通知的方式显示该通知消息,以便于用户能够及时获知该通知消息。
在此说明的是,本实施例中,也将电子设备称为终端设备。
目前,电子设备通过横幅通知的方式显示应用的通知消息的一种方式如下:电子设备在系统界面上显示该通知消息。例如,参见图1,电子设备100接收到微信消息时,电子设备100可以在系统界面上显示横幅通知消息,以便用户可以及时获取该微信消息。
但是,该横幅通知消息的显示方法存在如下技术问题:电子设备与其他设备多窗口协同工作时,若协同设备上没有显示电子设备的系统界面窗口,则协同设备不能显示横幅通知消息,从而影响用户及时获知该横幅通知消息;电子设备处于多窗口工作状态时,用户不能准确获知该横幅通知消息所属的应用,从而使得用户的体验感不佳。
示例性地,在电子设备与其他设备多窗口协同工作时,如图2所示,当电子设备200将当前的用户界面投屏至电子设备300时,电子设备300中除了可以显示当前的用户界面,电子设备300中还可以支持同时显示其他应用窗口,如图2中的电子设备300中还支持同时显示微信窗口。此时,若微信应用收到一条通知消息,则会在用户界面上展示横幅通知消息。但若此时,用户将电子设备200放置在旁边且将用户界面在电子设备300所属的窗口最小化,那么就会出现用户无法即时感知到横幅通知的情况,从而导致用户的体验感不佳。
又例如,如图3所示,在电子设备400可以同时支持至少一个悬浮窗的窗口化应用的场景下,若此时电子设备中的某个应用程序接收到了一条通知,那么电子设备400会在系统界面上显示横幅通知消息,但是会存在用户无法立即感知到该横幅通知消息具体来源于哪个应用程序,从而导致用户的体验感不佳。
又例如,如图4所示,在电子设备500投屏至显示器600的生产力桌面场景下,显示器上的桌面已经是另一种显示画面,与手机500上显示的内容不相关。此时,若在显示器端(也称为投屏端)打开了微信应用,并且好友回复了一条微信消息。此时的横幅通知消息仅能显示在手机端的系统界面上,使得用户无法即时感知到横幅通知消息的情况,从而导致用户的体验感不佳。
具体地,当前的电子设备在将APP的通知消息通过横幅通知消息的方式进行显示时的软件实现方案如图5所示,其中,APP作为客户端将通知消息发送给电子设备中的通知管理模块(例如为Notification Manager模块),然后通知管理模块对该通知消息进行管理和运行并发送给通知管理服务模块(例如为Notification Manager Service模块),该通知管理服务模块负责与系统界面模块交互,以使得通过系统界面模块显示横幅通知。可以看出,当前的电子设备在将横幅通知进行显示时,依赖于SystemUI进程。
在此说明的是,本实施例对APP的具体形态不做限制。例如可以是微信、或者是支付宝、又或者是其他第三方应用程序。
在此说明的是,本申请实施例中,在投屏场景中,对两个电子设备之间采用的具体投屏方式不做限制。例如,可以通过有线的方式进行投屏、或者可以通过无线的方式进行投屏、又或者可以通过近场通信(near field communication,NFC)等。
综上所述,电子设备通过横幅通知的本意时为了悬浮在窗口上,以使得一些重要的通知立即让用户知晓。但是针对多窗口、投屏等场景,由于横幅通知消息显示依赖于System UI进程,导致用户无法立即感知应用产生的通知消息,从而导致用户的体验感不佳。
因此,需要一种新的横幅通知消息的显示方法,使得即使是在上述场景中,也可以让用户立即知晓,从而提升用户体验。
下面,介绍本申请实施例提出的横幅通知消息的显示方法。为了能够更好地理解本申请实施例,下面对本申请实施例的电子设备的硬件结构进行介绍。示例性地,图6为本申请实施例提供的一种电子设备的结构示意图。在此说明的是,本实施例中,也将电子设备称为终端设备。
电子设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,传感器模块180,按键190, 指示器192,摄像头193,以及显示屏194等。
可选地,上述传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对终端设备的具体限定。在本申请另一些实施例中,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器110中还可以设置存储器,用于存储指令和数据。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备充电,也可以用于终端设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备,例如AR设备等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141用于连接充电管理模块140与处理器110。
终端设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端设备中的天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。
移动通信模块150可以提供应用在终端设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。
无线通信模块160可以提供应用在终端设备上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM)等无线通信的解决方案。
终端设备通过GPU,显示屏194以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。
显示屏194用于显示图像,视频等。显示屏194包括显示面板、背光、偏压电路以及PD。在一些实施例中,终端设备可以包括1个或N个显示屏194,N为大于1的正整数。
终端设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
摄像头193用于捕获静态图像或视频。在一些实施例中,终端设备可以包括1个或N个摄像头193,N为大于1的正整数。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。
终端设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备可以通过扬声器170A收听音乐,或收听免提通话。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。陀螺仪传感器180B可以用于确定终端设备的运动姿态。气压传感器180C用于测量气压。磁传感器180D包括霍尔传感器。加速度传感器180E可检测终端设备在各个方向上(一般为三轴)加速度的大小。距离传感器180F,用于测量距离。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。骨传导传感器180M可以获取振动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备可以接收按键输入,产生与终端设备的用户设置以及功能控制有关的键信号输入。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
在此说明的是,本申请的实施例对电子设备所采用的具体技术和具体设备形态不做限定。例如,该电子设备可以为手机、平板电脑、个人计算机(personal computer,PC)、智慧屏、人工智能(artificial intelligence,AI)音箱、车机设备以及智能手表等可穿戴终端设备,还可以是各种教学辅助工具(例如学习机、早教机)、智能玩具、便携式机器人、个人数字助理(personal digital assistant,PDA)、增强现实技术(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备等,也可以是具有移动办公功能的设备、具有智能家居功能的设备、具有影音娱乐功能的设备、支持智能出行的设备等。
电子设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。分层架构可以采用安卓(Android)系统,也可以采用苹果(IOS)系统,还可以采样其他操作系统,本申请实施例对此不作限定。下面以分层架构的Android系统为例,示例性说明电子设备的软件结构。
图7为本申请实施例适用的一种电子设备的软件结构框图。分层架构将终端设备的软件系统分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,可以将Android系统分为四层,从上到下依次为应用程序层(applications)、应用程序框架层(application framework)、安卓运行时(Android runtime)和系统库、硬件抽象层以及内核层(kernel)。
应用程序层可以包括一系列应用程序包,应用程序层通过调用应用程序框架层所提供的应用程序接口(application programming interface,API)运行应用程序。如图7所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,蓝牙,音乐,视频,短信等应用程序。
应用程序框架层为应用程序层的应用程序提供API和编程框架。应用程序框架层包括一些预先定义的函数。
如图7所示,应用程序框架层可以包括窗口管理器,活动管理器、通知管理器、包管理器、资源管理器、应用程序管理器、电话管理器等等。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。
活动管理器用于管理各个应用程序的生命周期以及导航回退功能,负责Android的主线程创建,各个应用程序的生命周期的维护。活动管理服务包括进程列表,远程回调接口,进程优先级控制器等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。
包管理器用于系统内的程序管理,例如:应用程序安装、卸载和升级等。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
电话管理器用于管理移动设备功能,包括:手机通话状态、获取电话信息(设备、sim卡、网络信息),监听电话状态以及调用电话拨号器拨打电话。
安卓系统运行时包括核心库和虚拟机。安卓系统运行时负责安卓系统的调度和管理。核心库包含两部分:一部分是Java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的Java文件执行为二进制文件。虚拟机 用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。虚拟机中还运行有显示合成进程(例如,surface flinger)。显示合成进程用于控制图像的合成。
系统库可以包括多个功能模块。例如:图像绘制模块、图像渲染模块、图像合成模块、函数库和媒体库等。
图像绘制模块用于二维或三维图像的绘制。图像渲染模块用于二维或三维图像的渲染。图像合成模块用于二维或三维图像的合成。
可能的实现方式中,应用通过图像绘制模块对图像进行绘制,然后应用通过图像渲染模块对绘制后的图像进行渲染,然后应用将渲染后的图像发送至显示合成进程的缓存队列中。每当Vsync到来时,显示合成进程(例如,surface flinger)从缓存队列中按顺序获取待合成的一帧图像,然后通过图像合成模块进行图像合成。
函数库提供C语言中所使用的宏、类型定义、字符串操作函数、数学计算函数以及输入输出函数等
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。
硬件抽象层,可以包含多个库模块,库模块如可以为硬件配置模块(hwcomposer,HWC)、摄像头库模块等。Android系统可以为设备硬件加载相应的库模块,进而实现应用程序框架层访问设备硬件的目的。设备硬件可以包括如电子设备中的LCD屏幕、摄像头等。
内核层是硬件和软件之间的层。内核层用于驱动硬件,使得硬件工作。内核层至少包含显示驱动,屏幕驱动、摄像头驱动以及传感器驱动等,本申请实施例对此不做限制。
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。
需要说明的是,本申请中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。
此外,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b和c中的至少一项(个),可以表示:a,或b,或c,或a和b,或a和c,或b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。
图8示出了本申请实施例提供的一种横幅通知消息的显示方法。如图8所示,本实施例中的方法包括:S801和S802。本实施例提供的方法可以由图6或图7所示的电子设备执行。
S801,第一电子设备获取横幅通知消息,横幅通知消息中包括消息内容和消息包名。
应理解,在第一电子设备中的APP产生通知消息后,第一电子设备可以将该通知消息封装成需要显示的横幅通知消息,然后基于该横幅通知消息,通过横幅通知的方式向用户显示通知消息的消息内容。其中,本实施例对APP的具体形态不做限制。例如可以是聊天软件、或者可以是音乐软件等。
具体地,本实施例中,第一电子设备获取到的横幅通知消息中会包括通知消息的消息内容和通知消息的消息包名。可选地,本申请中的第一电子设备获取到的横幅通知消息中还可以包括更多的内容,例如还可以包括通知消息的消息图标等。
S802,在消息包名对应的应用的窗口处于显示状态时,在窗口的显示区域中显示消息内容。
应理解,消息包名通常可以用于指示通知消息的来源,即指示通知消息是来自哪个应用软件的。还应理解,不同的消息包名通常可以指示不同的应用软件。
因此,本实施例中,第一电子设备在基于横幅通知消息,通过横幅通知的方式显示通知消息的消息内容时,首先会基于横幅通知消息中的消息包名确定出该横幅通知消息来自的应用程序,然后判断该应用程序的窗口是否处于显示状态。其中,此处所述的显示状态可以认为该应用程序的窗口为可以被用户看见;当确定应用程序的窗口处于显示状态时,便将通知消息的消息内容通过横幅通知显示在该应用程 序的窗口中,即不是将横幅通知显示在系统界面的固定位置,而是跟随应用程序的窗口。
应理解,当使用本申请实施例提供的横幅通知消息的显示方法时,即使是在第一电子设备与其他设备处于多窗口协同工作的场景下,也能够让用户及时获知该横幅通知消息。以及即使是在第一电子设备处于多窗口工作状态的场景下,也能够让用户准确获知该横幅通知消息所属的应用。
示例性地,以图2所示的电子设备200和电子设备300进行多屏协同工作的场景为例,当采用本申请实施例提供的横幅通知显示方法时,如图9所示,当电子设备200将当前的用户界面投屏至电子设备300时,此时,若微信应用收到一条通知消息,则电子设备200在基于通知消息获得横幅通知消息后,会先基于该横幅通知消息中的消息包名确定出在使用横幅通知方式显示通知消息的消息内容时该消息内容来源于微信应用程序,然后由于当前的微信应用程序的窗口处于显示状态,因此会将通知消息的消息内容通过横幅通知显示在微信的窗口中,而不是显示在当前用户界面中。
可以看出,在该方式中,虽然消息包名对应的微信的窗口不同于电子设备200当前显示的界面在电子设备300中的窗口,此时,即使用户将电子设备200放置在旁边且将电子设备200当前显示的界面在电子设备300中所属的窗口最小化,那么用户也可以即时感知到横幅通知消息的情况,从而提升用户体验感。
示例性地,以图3所示的电子设备400可以同时支持至少一个悬浮窗的窗口化应用的场景为例,当采用本申请实施例提供的横幅通知显示方法时,如图10所示,若此时微信应用收到一条通知消息,则电子设备400在基于通知消息获得横幅通知消息后,会先基于该横幅通知消息中的消息包名确定出在使用横幅通知方式显示通知消息的消息内容时该消息内容来源于微信应用程序,然后由于当前的微信应用程序的窗口处于显示状态,因此会将通知消息的消息内容通过横幅通知显示在微信的窗口中。
可以看出,在该方式中,由于直接将微信应用的横幅通知显示在了微信的窗口中,而不是显示在当前用户界面的固定位置处,因此可以使得用户知道立即知晓该横幅通知具体来源于哪个应用程序,从而提升用户体验感。
应理解,在该场景下,若电子设备400当前的用户界面可以同时支持悬浮窗的窗口大于1个时,在使用本申请的将横幅通知消息显示在对应的应用的窗口时,可以使得用户区分横幅通知具体来源于哪个应用的体验更明显。
示例性地,以图4所示的电子设备500投屏至显示器600的生产力桌面场景下,显示器上的桌面已经是另一种显示画面,与手机500上显示的内容不相关。如图11所示,此时,在显示器端(也称为投屏端)打开了微信应用,若此时微信应用收到了一条通知消息,则电子设备500在基于通知消息获得横幅通知消息后,会先基于该横幅通知消息中的消息包名确定出在使用横幅通知方式显示通知消息的消息内容时该消息内容来源于微信应用程序,然后由于当前的微信应用程序的窗口处于显示状态,因此会将通知消息的消息内容通过横幅通知显示在微信的窗口中。
可以看出,在该场景下,即使显示器上的桌面已经是另一种显示画面,但用户仍可以感知到横幅通知,并且可以立即知晓该横幅通知中的消息内容来自于微信应用程序,从而提升了用户的体验感。
本实施例提供的横幅通知消息的显示方法中,第一电子设备在获取到横幅通知消息时,首先基于横幅通知消息中包括的消息包名确定出该横幅通知消息来自的应用,然后当该应用的窗口处于显示状态时,将横幅通知消息中的消息内容通过横幅通知的方式显示在该应用窗口中。
下面,说明一种横幅通知消息的显示方法的详细实施方式。
步骤一:第一电子设备获取横幅通知消息来源,实现横幅通知消息与应用一对一绑定。
如图12所示,一个通知记录(例如也称为NotificationRceord)指一个具体的横幅通知消息实例,横幅通知消息实例中包含了消息内容、消息包名等内容(可选地,还可以包括消息图标等);活动栈(例如也称为ActivityStack)指具体的应用实例,每个应用实例对应一个栈,对应一个任务(Task),然后到具体的活动记录(例如也称为ActivityRceord)页面,任务标识(本实施例中也称为TaskId)就是用于标识一个Task,可以作为应用的一个数据结构的唯一标识。
本实施例中,在消息实例中增加一个任务标识(TaskId)字段,用于与ActivityStack建立唯一标识的联系。具体实现为在产生一个NotificationRceord时,根据NotificationRceord中的消息包名,寻找对应的TaskId,并将得到的TaskId赋值到NotificationRceord。
步骤二:第一电子设备实现横幅通知消息跟随应用窗口显示。
可以理解的是,第一设备实现横幅通知消息跟随应用窗口显示也可以认为是在应用的窗口的显示区域中显示横幅通知消息中的消息内容。
在第一种实施方案中,可以包括:在消息包名对应的应用的窗口组件(例如为Activity)中添加第一控件(例如也称为NotificationView控件),第一控件中包含消息内容;然后基于应用的窗口组件显示应用的窗口。
示例性地,如图13所示,应用的窗口组件中包括不同的控件,例如图中的第三控件(例如为PhoneWindow控件)、第四控件(例如为DecorView控件)、第五控件(例如为ContentView控件),其中,不同的控件可以执行不同的服务,然后在应用的窗口组件新增第一控件(例如称为NotificationView控件)以用于显示横幅通知消息的具体内容,从而跟随应用进程再窗口组件中绘制显示内容。可选地,在该实现方式中,若确定出应用的窗口是显示在第二电子设备(第二电子设备与所述第一电子设备处于多窗口协同工作的状态)中的,那么本实施例中的方法还包括:向所述第二电子设备发送所述应用的窗口组件,以使得第二电子设备可以将横幅通知消息中的消息内容显示在应用的窗口中。
更具体地,图14为该实施例中的第一电子设备将横幅通知消息显示在应用的窗口时对应的软件上的实现示意图,主要涉及在应用程序框架层和应用程序层。如图14所示,包括:
S1401,当应用程序APP产生通知消息时,通过调用第一服务(例如为notify),以进入通知管理模块。
本实施例中,第一服务可以认为是需要进入通知管理模块中时需要使用的服务。
S1402,通知管理模块调用第二服务(例如enqueNotificationWithTag),以将通知消息发送给通知管理.Stub模块(例如NotificationManager.Stub)。
本实施例中,第二服务可以认为是需要进入通知管理.Stub模块中时需要使用的服务。
S1403,通知管理.Stub模块调用第三服务(例如enqueNotificationInternal),以将通知消息发送给通知管理服务模块(例如NotificationManagerService)。
本实施例中,第三服务可以认为是需要进入通知管理服务模块中时需要使用的服务。
S1404,通知管理服务模块调用创建消息实例服务,以将通知消息发送给通知记录模块(NotificationRecord),从而获得横幅通知消息。
其中,通知记录模块会基于通知消息产生横幅通知消息,并将该横幅通知消息返回给通知管理服务模块。
S1405,通知管理服务模块调用第四服务获得通知消息包名对应的任务标识,并在横幅通知消息中加入该任务标识。
本实施例中,第四服务为可以基于消息包名获得对应的应用的任务标识的服务。
S1406,通知管理服务模块调用第五服务(例如notifyPostedLocked),以将加入任务标识之后的横幅通知消息发送给通知监听模块。
本实施例中,第五服务可以认为是通知管理服务需要进入通知监听模块时需要使用的服务。
S1407,通知监听模块调用第六服务(例如onNotificationPosted),以将加入任务标识之后的横幅通知消息发送给第一目标模块(例如称为HwPCManagerService)。
其中,第六服务可以认为是通知监听模块需要进入第一目标模块并将加入任务标识之后的横幅通知消息发送给第一目标模块时需要使用的服务。
S1408,第一目标模块调用第七服务(例如updateNotificationView),以将加入任务标识之后的横幅通知消息发送给通知可视管理模块(例如称为NotificationViewManager)。
其中,第七服务可以理解为是第一目标模块需要进入NotificationViewManager并将加入任务标识之后的横幅通知消息发送给NotificationViewManager时所需要使用的服务。
S1409,通知可视管理模块调用第八服务,以将加入任务标识之后的横幅通知消息发送给通知可视模块(NotificationView),以使得NotificationView基于加入任务标识之后的横幅通知消息中的任务标识确定出横幅通知消息对应的应用,并在应用的窗口中显示横幅通知消息。
可以看出,本实施例中,第一电子设备中的APP作为客户端将通知消息发送给电子设备中的通知管理模块(例如为Notification Manager模块),然后通知管理模块对该通知消息进行管理和运行并发送给通知管理服务模块(例如为Notification Manager Service模块)后,Notification Manager Service模 块在基于通知消息获得横幅通知消息后,不再需要依赖于系统界面进程,而是通过获取横幅通知消息对应的任务标识以获得该横幅通知消息对应的应用,然后在该应用的窗口中显示横幅通知消息。
可以理解的是,在该实施方案中,由于将第一控件添加到了Activity中,因此第一电子设备可以将横幅通知显示的消息内容和应用的窗口组件合成一个图层,从而实现将横幅通知消息中的消息内容显示在应用的窗口中。
在第二种实施方案中,可以包括:计算消息包名对应的应用的窗口的显示区域;创建第二控件,第二控件中包含消息内容;在显示区域内基于第二控件进行显示。
示例性地,如图15所示,第一电子设备可以先实时计算与消息包名对应的应用的窗口在显示屏幕中的位置(即应用的窗口的显示区域),然后创建一个独立的第二控件,该第二控件中包括横幅通知消息中需要显示的消息内容,最后可以通过窗口管理服务(window manager service)模块在显示区域中基于第二控件进行显示,以实现在应用窗口中显示需要通知的消息内容。在此说明的是,本实施例对计算与消息包名对应的应用的窗口在显示屏幕中的位置的具体计算方式不做限制,例如可以以显示屏幕的左上角作为坐标原点构建二维坐标系,然后分别计算出应用的窗口的四个角相对坐标原点的坐标值(x,y),以获得与消息包名对应的应用的窗口的显示区域。
可选地,本申请提供的横幅通知的显示方法还包括:在消息包名对应的应用的窗口处于关闭状态或隐藏状态时,在第一电子设备当前显示的界面中预设位置显示消息内容。
其中,应用的窗口处于关闭状态可以认为是指应用的窗口没有打开从而不能被用户感知的状态。应用的窗口处于隐藏状态可以认为是指应用的窗口已经打开但由于最小化等原因不能被用户感知的状态。
该实现方式中,当第一电子设备确定出消息包名对应的应用的窗口处于关闭状态或隐藏状态时,第一电子设仍会在第一电子设备当前显示的界面中的预设位置通过横幅通知的方式显示消息内容,以能够将通知消息通知给用户。即,在当第一电子设备确定出消息包名对应的应用的窗口处于关闭状态或隐藏状态时,第一电子设备仍通过系统界面来显示横幅通知消息。
下面,以投屏场景为例,说明在投屏场景下的一种横幅通知的显示方法的示意性流程图。
如图16所示,当第一电子设备检测到横幅通知消息时,第一电子设备执行S1601:判断横幅通知消息中的消息包名对应的应用是否窗口化,若是,执行S1602,否则,执行S1607。
S1602,判断应用的窗口是否为显示状态(即窗口是否在前台),若是,执行S1603,否则,执行S1605。
S1603,在应用的窗口组件中添加第一控件。
其中,有关窗口组件、第一控件的描述可以参考上述实施例中的描述,此处不再赘述。
S1604,更新视图动画。
S1605,基于系统界面进程处理。
也就是说,在横幅通知消息中的消息包名对应的应用没有窗口化、以及即使窗口化但是该应用的窗口不为显示状态时,通过现有的SystemUI进程进行处理。
S1606,图层合成;
S1607,图层送显。
该实施方式中,在投屏场景下,当第一电子设备检测到横幅通知消息并确定通过横幅通知方式向用户显示通知消息时,若确定横幅通知消息中的消息包名对应的应用的窗口为显示状态,则通过在应用的窗口组件中添加第一控件的方式将消息内容显示在应用窗口中。否则,若确定横幅通知消息中的消息包名对应的应用的窗口不为显示状态,例如应用的窗口没有打开,或者已经打开但是已经缩小化,那么便使用现有的System UI进程进行处理。
下面,仍以投屏场景为例,说明在投屏场景下的另一种横幅通知的显示方法的示意性流程图。
如图17所示,当第一电子设备检测到横幅通知消息时,第一电子设备执行S1701:判断横幅通知消息中的消息包名对应的应用是否窗口化,若是,执行S1702,否则,执行S1706。
S1702,判断应用的窗口是否为显示状态,若是,执行S1703,否则,执行S1706。
S1703,计算应用的窗口在该窗口所属的屏幕中的显示区域。
其中,有关窗口的显示区域的描述可以参考上述实施例中的描述,此处不再赘述。
S1704,添加第二控件。
其中,有关第二控件的详细描述可以参考前述实施例中的描述,此处不再赘述。
S1705,更新视图动画。
S1706,基于系统界面进行处理。
也就是说,在横幅通知消息中的消息包名对应的应用没有窗口化、以及即使窗口化但是该应用的窗口不为显示状态时,通过现有的SystemUI进程进行处理。
S1707,图层合成;
S1708,图层送显。
该实施方式中,在投屏场景下,当第一电子设备检测到横幅通知消息并确定通过横幅通知方式向用户显示通知消息时,若确定横幅通知消息中的消息包名对应的应用的窗口为显示状态,则通过在添加第二控件的方式将消息内容显示在应用窗口中。否则,若确定横幅通知消息中的消息包名对应的应用的窗口不为显示状态,例如应用的窗口没有打开,或者已经打开但是已经缩小化,那么便使用现有的System UI进程进行处理。
上文中结合图1至图17,详细描述了本申请实施例提供的方法,下面将结合图18和图19,详细描述本申请实施例提供的横幅通知消息的显示装置。
图18示出了本申请实施例提供的显示装置1800的结构性示意图。如图18所示,该电子设备1800包括:获取模块1801和显示模块1802。装置1800可以用于实现前述任意方法实施例中的方法。
作为一个示例,获取模块1801可以用于实现S801,显示模块1802可以用于实现S802。
应理解,这里的终端设备1800以功能模块的形式体现。这里的术语“模块”可以指应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。在一个可选的例子中,本领域技术人员可以理解,终端设备1800可以具体为上述方法实施例中的终端设备,或者,上述方法实施例中终端设备的功能可以集成在终端设备1800中,终端设备1800可以用于执行上述方法实施例中与终端设备对应的各个流程和/或步骤,为避免重复,在此不再赘述。
上述终端设备1800具有实现上述方法实施例中终端设备执行的相应步骤的功能;上述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
在本申请的实施例中,图18中的终端设备1800也可以是芯片或者芯片系统,例如:片上系统(system on chip,SoC)。
图19是本申请实施例提供的另一种终端设备1900的示意性框图。该终端设备1900包括处理器1910、收发器1920和存储器1930。其中,处理器1910、收发器1920和存储器1830通过内部连接通路互相通信,该存储器1930用于存储指令,该处理器1920用于执行该存储器1930存储的指令,以控制该收发器1920发送信号和/或接收信号。
应理解,终端设备1900可以具体为上述方法实施例中的终端设备,或者,上述方法实施例中终端设备的功能可以集成在终端设备1900中,终端设备1900可以用于执行上述方法实施例中与终端设备对应的各个步骤和/或流程。可选地,该存储器1930可以包括只读存储器和随机存取存储器,并向处理器提供指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。例如,存储器还可以存储设备类型的信息。该处理器1910可以用于执行存储器中存储的指令,并且该处理器执行该指令时,该处理器可以执行上述方法实施例中与终端设备对应的各个步骤和/或流程。
应理解,在本申请实施例中,该处理器1910可以是中央处理单元(central processing unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器执行存 储器中的指令,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
本申请还提供了一种计算机可读存储介质,该计算机可读存储介质用于存储计算机程序,该计算机程序用于实现上述方法实施例中终端设备对应的方法。
本申请还提供了一种芯片系统,该芯片系统用于支持上述方法实施例中终端设备实现本申请实施例所示的功能。
本申请还提供了一种计算机程序产品,该计算机程序产品包括计算机程序(也可以称为代码,或指令),当该计算机程序在计算机上运行时,该计算机可以执行上述方法实施例所示的终端设备对应的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应所述以权利要求的保护范围为准。

Claims (15)

  1. 一种横幅通知消息的显示方法,其特征在于,应用于第一电子设备,包括:
    获取横幅通知消息,所述横幅通知消息中包括消息内容和消息包名;
    所述消息包名对应的应用的窗口处于显示状态时,在所述窗口的显示区域中显示所述消息内容。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述消息包名对应的应用的窗口处于关闭状态或隐藏状态时,在所述第一电子设备当前显示的界面中预设位置显示所述消息内容。
  3. 根据权利要求1或2所述的方法,其特征在于,所述在所述窗口的显示区域中显示所述消息内容,包括:
    在所述消息包名对应的应用的窗口组件中添加第一控件,所述第一控件中包含所述消息内容;
    基于所述应用的窗口组件显示所述应用的窗口。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述消息包名对应的应用的窗口显示在第二电子设备中,所述方法还包括:
    向所述第二电子设备发送所述应用的窗口组件,所述第二电子设备与所述第一电子设备处于多窗口协同工作的状态。
  5. 根据权利要求4所述的方法,其特征在于,所述消息包名对应的应用的窗口不同于所述第一电子设备当前显示的界面在所述第二电子设备中的窗口。
  6. 根据权利要求1或2所述的方法,其特征在于,所述在所述窗口的显示区域中显示所述消息内容,包括:
    计算所述消息包名对应的应用的窗口在所述窗口所属的屏幕中的显示区域;
    创建第二控件,所述第二控件中包含所述消息内容;
    在所述显示区域内基于所述第二控件进行显示。
  7. 一种横幅通知消息的装置,其特征在于,应用于第一电子设备,包括:
    获取模块,用于获取横幅通知消息,所述横幅通知消息中包括消息内容和消息包名;
    显示模块,用于所述消息包名对应的应用的窗口处于显示状态时,在所述窗口的显示区域中显示所述消息内容。
  8. 根据权利要求7所述的装置,其特征在于,所述显示模块还用于:
    所述消息包名对应的应用的窗口处于关闭状态或隐藏状态时,在所述电子设备当前显示的界面中预设位置显示所述消息内容。
  9. 根据权利要求7或8所述的装置,其特征在于,所述显示模块具体用于:
    在所述消息包名对应的应用的窗口组件中添加第一控件,所述第一控件中包含所述消息内容;
    基于所述应用的窗口组件显示所述应用的窗口。
  10. 根据权利要求9所述的装置,其特征在于,所述消息包名对应的应用的窗口显示在第二电子设备中,所述显示模块还用于:
    向所述第二电子设备发送所述应用的窗口组件,所述第二电子设备与所述第一电子设备处于多窗口协同工作的状态。
  11. 根据权利要求10所述的装置,其特征在于,所述消息包名对应的应用的窗口不同于所述第一电子设备当前显示的界面在所述第二电子设备中的窗口。
  12. 根据权利要求7或8所述的装置,其特征在于,所述显示模块具体用于:
    计算所述消息包名对应的应用的窗口在所述窗口所属的屏幕中的显示区域;
    创建第二控件,所述第二控件中包含所述消息内容;
    在所述显示区域内基于所述第二控件进行显示。
  13. 一种电子设备,其特征在于,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使得所述终端设备执行权利要求1至6中任一项所述的方法。
  14. 一种计算机可读介质,其特征在于,所述计算机可读介质存储用于计算机执行的程序代码,该程序代码包括用于执行如权利要求1至6中任一项所述的方法的指令。
  15. 一种计算机程序产品,其特征在于,所述计算机程序产品中包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得所述计算机实现如权利要求1至6中任一项所述的方法。
PCT/CN2023/120891 2022-10-10 2023-09-22 横幅通知消息的显示方法与电子设备 WO2024078306A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211232886.3 2022-10-10
CN202211232886.3A CN117880412A (zh) 2022-10-10 2022-10-10 横幅通知消息的显示方法与电子设备

Publications (1)

Publication Number Publication Date
WO2024078306A1 true WO2024078306A1 (zh) 2024-04-18

Family

ID=90592324

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/120891 WO2024078306A1 (zh) 2022-10-10 2023-09-22 横幅通知消息的显示方法与电子设备

Country Status (2)

Country Link
CN (1) CN117880412A (zh)
WO (1) WO2024078306A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2818997A1 (en) * 2013-06-28 2014-12-31 BlackBerry Limited Generating message notifications providing direction actions
CN108345483A (zh) * 2018-01-10 2018-07-31 深圳市金立通信设备有限公司 一种通知消息的提示方法、终端及计算机可读存储介质
CN113885759A (zh) * 2021-06-25 2022-01-04 荣耀终端有限公司 通知消息处理方法、设备、系统及计算机可读存储介质

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2818997A1 (en) * 2013-06-28 2014-12-31 BlackBerry Limited Generating message notifications providing direction actions
CN108345483A (zh) * 2018-01-10 2018-07-31 深圳市金立通信设备有限公司 一种通知消息的提示方法、终端及计算机可读存储介质
CN113885759A (zh) * 2021-06-25 2022-01-04 荣耀终端有限公司 通知消息处理方法、设备、系统及计算机可读存储介质

Also Published As

Publication number Publication date
CN117880412A (zh) 2024-04-12

Similar Documents

Publication Publication Date Title
WO2021013158A1 (zh) 显示方法及相关装置
CN110377250B (zh) 一种投屏场景下的触控方法及电子设备
US20220342850A1 (en) Data transmission method and related device
WO2021057830A1 (zh) 一种信息处理方法及电子设备
WO2021129253A1 (zh) 显示多窗口的方法、电子设备和系统
WO2021121052A1 (zh) 一种多屏协同方法、系统及电子设备
WO2021196970A1 (zh) 一种创建应用快捷方式的方法、电子设备及系统
US20230004259A1 (en) Card sharing method, electronic device, and communications system
US20230229300A1 (en) Cross-Device Object Drag Method and Device
WO2022033342A1 (zh) 数据传输方法和设备
CN116360725B (zh) 显示交互系统、显示方法及设备
WO2022052662A1 (zh) 显示方法及电子设备
WO2021175272A1 (zh) 一种应用信息的显示方法及相关设备
WO2023030099A1 (zh) 跨设备交互的方法、装置、投屏系统及终端
CN110045958B (zh) 纹理数据生成方法、装置、存储介质及设备
WO2022089102A1 (zh) 一种控制方法、装置及电子设备
CN115016697A (zh) 投屏方法、计算机设备、可读存储介质和程序产品
WO2021052488A1 (zh) 一种信息处理方法及电子设备
WO2024078306A1 (zh) 横幅通知消息的显示方法与电子设备
US20230362782A1 (en) Data Sharing Method, Electronic Device, and System
CN113886070A (zh) 设备信息管理方法、装置、设备及计算机可读存储介质
CN112148499A (zh) 数据上报方法、装置、计算机设备及介质
CN116708647B (zh) 通知消息回复方法及电子设备
WO2024104131A1 (zh) 一种多窗口场景下的窗口获焦方法、设备及系统
WO2024066976A1 (zh) 控件显示方法及电子设备