Message reminding method and terminal device
By using application and window identifiers to determine whether to notify the user when an application within the emulator receives a new message, the problem of applications within the emulator failing to provide notifications is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-30
- Publication Date
- 2026-03-27
AI Technical Summary
When applications within the emulator receive new messages, users cannot be notified in a timely manner because these applications are minimized or covered by other applications, resulting in the Android system not generating a notification.
The emulator receives messages from the second application through the first application and determines whether to notify the user of new messages. The emulator judges whether to remind the user based on the application identifier and window identifier, and uses methods such as application icon flashing, window flashing, pop-up window or notification to remind the user.
This allows users to view and process new messages promptly when the application receives them within the emulator, thus improving the user experience.
Smart Images

Figure CN115269212B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a message notification method and terminal device. Background Technology
[0002] Currently, various brands of emulators exist on the market. For example, an Android emulator is software that allows users to run and simulate the Android operating system on their personal computers, in addition to their native computer system, and to install, use, and uninstall Android applications. Using an Android emulator, users can use Android applications on electronic devices with the emulator installed, even without a mobile phone. For instance, an Android emulator can simulate the Android phone's operating environment on a computer, allowing users to experience Android games and applications on their computers.
[0003] Multiple applications can be installed within an emulator. Assuming a user opens multiple applications within the emulator, each application can have its own window. These windows can be displayed minimized in the taskbar or maximized on the screen. Regardless of whether the application's window is minimized or covered by other applications, it is always in the foreground. When an application receives a new message, because it's in the foreground, the Android system will not generate a notification (alert) message. In other words, if an application in the emulator receives a new message but its window is minimized or covered by other applications, the user will not be aware of the new message on their personal computer, and thus, no alert will be generated. Summary of the Invention
[0004] This application provides a message notification method and terminal device to enable notifications when an application within an emulator receives a message, thereby improving the user experience.
[0005] In a first aspect, this application provides a message notification method, the method comprising: a first application receiving a first message sent by a second application, the first message including an identifier of the second application, the second application being the application that received the new message, and the first application and the second application being applications running on the system of the emulator; the first application sending a second message to the emulator application, the second message including an identifier of the second application, the second message being used to instruct the emulator to determine whether to notify the emulator of the new message received by the second application.
[0006] Since the second application is opened as a foreground application, the above technical solution allows the first application in the emulator to send the identifier of the second application to the emulator when the second application receives a new message. This enables the emulator to further determine whether to send a notification for the new message, thereby achieving message notification for the foreground application on the emulator. This allows users to view new messages in a timely manner, improving the user experience.
[0007] In one possible design, the first message includes at least one.
[0008] With the above technical solution, when multiple applications receive new messages, the first application can receive multiple first messages and then send the identifiers of multiple applications to the emulator.
[0009] In one possible design, the first application receiving a first message sent by the second application includes: the first application receiving a first message sent by the second application through a third application.
[0010] With the above technical solution, when the second application receives a new message, the second application can call the interface of the third application to send the first message to the third application, and then forward the first message to the first application.
[0011] In one possible design, the first message may also include: the number of new messages received by the second application and the content of the new messages received by the second application.
[0012] With the above technical solution, when the first message also includes the number and / or content of new messages, the first application can send the number and / or content of new messages to the simulator, so that the simulator will subsequently remind the user of the number and / or content of new messages, thereby improving the user experience.
[0013] In one possible design, the emulator is an Android emulator.
[0014] When the emulator is an Android emulator, the applications within the emulator are Android applications. Of course, this application does not specifically limit the operating system of the emulator.
[0015] In one possible design, the first application is a desktop application, and the second application is an email application or a Huawei video application.
[0016] Secondly, this application also provides a message notification method, including:
[0017] The emulator receives a first message sent by a first application, the first message including the identifier of a second application, the second application being the application that received the new message, and the first application and the second application being applications under the system on which the emulator is installed; the emulator determines the corresponding second window identifier based on the identifier of the second application; the emulator determines whether to notify the second application of the new message received based on the second window identifier and the window identifier of the mouse focus window.
[0018] Using the above technical solution, the emulator can know which application in the emulator has received the new message by the application identifier included in the first message. Then, it compares the window identifier corresponding to the application identifier with the window identifier of the mouse-focused window to determine whether it is necessary to notify the new message.
[0019] In one possible design, the first message is sent from the second application to the first application.
[0020] In one possible design, the first message is sent by the second application to the first application via the third application.
[0021] Through the above technical solution, the first message can be sent directly from the second application to the first application, or it can be sent from the second application to the third application and then forwarded to the first application by the third application.
[0022] In one possible design, the simulator determines whether to notify the second application of a new message based on the second window identifier and the window identifier of the mouse-focused window, including:
[0023] If the simulator determines that the second window identifier is different from the window identifier of the mouse-focused window, it determines to notify the second application of the new message received; if the simulator determines that the second window identifier is the same as the window identifier of the mouse-focused window, it determines not to notify the second application of the new message received.
[0024] With the above technical solution, if the window identifier of the new message is different from the window identifier of the mouse-focused window, a notification is required for the new message; if the window identifier of the new message is the same as the window identifier of the mouse-focused window, it means that the user can see the new message directly, and there is no need to notify the user through a notification method.
[0025] In one possible design, the first message may also include: the number of new messages received by the second application and the content of the new messages received by the second application.
[0026] In one possible design, the notification method for alerting the second application to new messages received includes at least one of the following: application icon flashing, application window flashing, pop-up window, notification, application window shaking, wherein the pop-up window or the notification includes the number and / or content of the new message.
[0027] Through the above technical solutions, the emulator can remind users of new messages by flashing application icons, flashing application windows, notifications, etc., so that users can view and process new messages in a timely manner, thereby improving the user experience.
[0028] Thirdly, this application also provides a terminal device, which includes a display screen; one or more processors; one or more memories; multiple applications; and one or more computer programs; wherein the one or more computer programs are stored in the one or more memories, and the one or more computer programs include instructions that, when the instructions are invoked and executed by the one or more processors, cause the terminal device to perform the first aspect, the second aspect, and any possible design of the first aspect and the second aspect.
[0029] Fourthly, this application also provides a terminal device, which includes modules / units that execute the methods of the first aspect, the second aspect, or any possible design of the first aspect and the second aspect; these modules / units can be implemented in hardware or can be implemented by hardware executing corresponding software.
[0030] Fifthly, embodiments of this application also provide a chip, which is coupled to a memory in an electronic device to execute the technical solutions of the first aspect, the second aspect, and any possible design of the first and second aspects of the embodiments of this application; in the embodiments of this application, "coupling" means that two components are directly or indirectly combined with each other.
[0031] Sixthly, embodiments of this application also provide a computer-readable storage medium, the computer-readable storage medium including a computer program, which, when run on an electronic device, causes the electronic device to execute the first aspect, the second aspect, and any possible design of the first aspect and the second aspect of the embodiments of this application.
[0032] In a seventh aspect, embodiments of this application also provide a computer program product that, when run on a terminal device, causes the computer program product to execute the technical solutions of the second aspect of this application and any possible design of the second aspect.
[0033] For the various aspects from the third to the seventh aspect mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that various possible solutions for the first and second aspects may achieve, which will not be repeated here. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;
[0035] Figure 2 This is a structural block diagram of the terminal device 100 according to an embodiment of this application;
[0036] Figure 3 A user interface diagram provided for an embodiment of this application;
[0037] Figure 4 A flowchart of a message notification method provided in an embodiment of this application;
[0038] Figure 5 A user interface diagram provided for an embodiment of this application;
[0039] Figure 6A A user interface diagram provided for an embodiment of this application;
[0040] Figure 6B A user interface diagram provided for an embodiment of this application;
[0041] Figure 6C A user interface diagram provided for an embodiment of this application;
[0042] Figure 6D A user interface diagram provided for an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of another terminal device provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0045] The applications involved in the embodiments of this application are software programs capable of performing one or more specific functions. Typically, multiple applications can be installed on a terminal device. Examples include camera applications, email applications, video applications, music applications, chat applications, WeChat, WeLink, etc. The applications mentioned below can be those pre-installed on the terminal device at the factory, or those downloaded by the user from the network or obtained from other terminal devices during the use of the terminal device.
[0046] It should be noted that the message notification method provided in this application embodiment can be applied to terminal devices with a display screen, such as personal computers (PCs) (e.g., tablets, laptops, ultra-mobile personal computers (UMPCs)), smart screens, etc., and this application embodiment is not limited thereto. Furthermore, exemplary embodiments of the terminal device include, but are not limited to, those equipped with... HarmonyOS Or terminal devices using other operating systems.
[0047] The structure of the terminal device is described below.
[0048] like Figure 1 As shown, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity 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.
[0049] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the terminal device 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has recently used or is recurring. If processor 110 needs to reuse an instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.
[0050] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge terminal device 100, and can also be used for data transfer between terminal device 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140, providing power to processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0051] The wireless communication function of terminal device 100 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. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0052] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0053] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2. Exemplarily, in this embodiment, different electronic devices can establish communication connections via BT or WLAN.
[0054] In some embodiments, antenna 1 of terminal device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling terminal device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), the fifth generation (5G) mobile communication system, future communication systems such as the sixth generation (6G) system, BT, GNSS, WLAN, NFC, FM and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0055] The display screen 194 is used to display the application's interface, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include one or N display screens 194, where N is a positive integer greater than 1. In this embodiment, the display screen 194 can be used to simultaneously display multiple application interfaces.
[0056] Camera 193 is used to capture still images or videos. Camera 193 may include a front-facing camera and a rear-facing camera.
[0057] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of terminal device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application (e.g., iQiyi application, WeChat application, etc.). The data storage area may store data generated during the use of terminal device 100 (e.g., images, videos, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0058] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external storage card.
[0059] Terminal device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0060] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. Terminal device 100 can receive button inputs and generate key signal inputs related to user settings and function control of terminal device 100. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, touch operations applied to different applications (such as taking photos, playing audio, etc.) can correspond to different vibration feedback effects. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with terminal device 100.
[0061] Understandable, Figure 1 The components shown do not constitute a specific limitation on the electronic device. The electronic device may also include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements. In the following embodiments, [the following text is incomplete and likely refers to a different embodiment]. Figure 1 The terminal device 100 shown is used as an example for introduction.
[0062] Figure 2 This is a structural block diagram of the terminal device 100 according to an embodiment of this application. Figure 2 As shown, terminal device 100 can be an electronic device running a Windows system, under which multiple applications can be installed, such as an emulator application (emulator name.exe). The emulator application can be an application running an Android system, which can include multiple Android applications, such as email applications, Huawei video applications, and desktop applications.
[0063] In this embodiment, when an application (e.g., email) receives a new message, the email app can call the interface of the desktop app on the Android system. This allows the desktop app to know that the email app has received a new message, and it can then inform the emulator app of its application ID (application identifier). Correspondingly, the emulator app can determine whether to alert the user based on the relationship between the user's mouse focus window and the email app's window. If the user's mouse focus window is different from the email app's window, the emulator determines that an alert is needed; if the user's mouse focus window is the same as the email app's window, the emulator determines that no alert is needed.
[0064] The following examples are applied to Figure 1 The architecture shown in the terminal device 100 is used as an example for description.
[0065] Furthermore, the at least one mentioned in the following embodiments includes one or more; wherein, "more" means two or more. Additionally, it should be understood that in the description of this application, terms such as "first" and "second" are used only for descriptive purposes.
[0066] First, the application scenarios of this application's embodiments are introduced. Taking a laptop computer as an example, in this application, an emulator application (hereinafter referred to as: emulator) can be installed on the laptop computer, and the laptop computer can be a Windows system. Assuming the emulator installed on the laptop computer is an Android emulator, then Android applications can be used on the laptop computer. For example, as shown... Figure 3 As shown, assuming a laptop displays interface 300, this interface 300 may include icons for at least one application, such as an emulator application icon 301, an email application icon 302, a Huawei Video application icon 303, an app store application icon 304, a calculator application icon 305, etc. Among these, email, Huawei Video, and the app store can be applications installed in the emulator; that is, after the emulator installs the application, its icon is placed on the Windows desktop. Of course, interface 300 may also include a taskbar 306. It should be understood that in actual product implementation, the emulator application icon 301 may or may not be displayed.
[0067] When a user clicks the email application icon 302, the laptop responds to the click and enters the email application's display interface, such as interface 310. Interface 310 may include the email application window 311. Next, the user can click the Huawei video application icon 303, at which point the laptop will display interface 320. Interface 320 may include both the email application window 311 and the Huawei video application window 321. In other words, the laptop can display multiple application windows, and each application window corresponds to one application.
[0068] It should be noted that application windows 311 and 321 may also include minimize icons, maximize icons, and close buttons. The minimize icon is used to minimize the application window and display it on the taskbar 306, the maximize icon is used to display the application window in full screen on the laptop's display interface, and the close button is used to close the application window.
[0069] It's important to note that once an application is opened within the emulator, whether it's displayed directly on the screen or minimized to the taskbar, it's considered a foreground application by default for the Android system running on the emulator. In Windows, the emulator and the applications opened on its Android system can be understood as different processes, or you can think of the emulator's process as one process, and the applications opened on the Android system as child processes within that process.
[0070] It should be understood that the above interface is only an illustrative example. In actual product implementation, the display interface may show more or fewer icons, and this application does not make any specific limitations in this regard.
[0071] In some embodiments, when an application is opened within the emulator, the emulator can assign a window identity (ID) (or window number, window identifier) to the window containing the application, distinguishing the window of the Android application running in the emulator. Specifically, when a user clicks the application icon of an Android application running on the emulator's Android system, the emulator sends a first notification message to the Android system, informing it which application is to be launched. Upon receiving the notification message, the Android system launches the application and, after launching, returns a second notification message carrying the application ID to the emulator, informing it that the Android application has been opened. When the emulator receives the second notification message, it can assign a corresponding window ID to the application based on the application ID. In other words, in this way, the emulator can proactively assign a window ID to an Android application when it is opened, establishing a correspondence between the Android application ID and the application window ID.
[0072] Of course, users can also open Android applications via voice triggering, etc., and this application does not limit this.
[0073] For example, the correspondence between application IDs and window IDs can be seen in Table 1 below. It should be understood that Table 1 is only an illustrative example, and this application does not limit the method of storing the correspondence, or the representation format of application IDs and window IDs.
[0074] Table 1
[0075] Application ID Window ID Application 1 1 Application 2 2 Application 3 3
[0076] It should be noted that when an application window is closed, i.e., when the application is closed, the mapping between the application ID and the window ID is automatically deleted. When the application is opened again, a new window ID can be assigned to it.
[0077] As one possible implementation, the emulator can number the windows containing the applications according to the order in which they are opened within the emulator. For example, assuming the user opens the applications in the following order: App Store APP, WeChat APP, Reading APP, and Huawei Video APP, then the window containing the App Store APP can be designated as Window 1, the window containing the WeChat APP as Window 2, the window containing the Reading APP as Window 3, and the window containing the Huawei Video APP as Window 4.
[0078] It should be noted that the above numbering is merely illustrative and is not intended to limit the scope of this application. For example, the window containing the app store app could be designated as window 1-1, the window containing the WeChat app as window 1-2, the window containing the reading app as window 1-3, and the window containing the Huawei Video app as window 1-4, etc.
[0079] Optionally, in some embodiments, the window numbering of the application is not fixed. When an application is closed and reopened, the emulator can renumber the window. For example, suppose the window containing the app store is denoted as window 1, the window containing the WeChat app as window 2, the window containing the reading app as window 3, and the window containing the Huawei Video app as window 4. If the user closes one of these applications, such as the WeChat app, and then reopens the WeChat app after a period of time (e.g., 30 seconds or 5 minutes), the window containing the WeChat app can be denoted as window 5.
[0080] Based on the above application scenarios, the message notification method of this application embodiment will be described in detail below.
[0081] like Figure 4 The diagram shown is a flowchart of a message notification method provided in an embodiment of this application. (See attached diagram.) Figure 4 As shown, the method may include the following steps:
[0082] S401: The first application in the emulator receives the first message.
[0083] The first application within the emulator receives the first message, meaning the application within the emulator receives a new message. This new message can be a push notification from the network or a message from another device. It should be understood that the first message here can be a single message or multiple messages; this application does not limit this. The first application is an Android application installed within the emulator, such as Huawei Video or email.
[0084] S402: The first application in the emulator calls the interface of the second application and sends a second message to the second application.
[0085] The second message may include the first application identifier, the number of first messages, and the content of the first message.
[0086] For ease of description, the Android application that receives the new message in the emulator can be called the "first application", the Android desktop application in the emulator can be called the "second application", and the received new message can be called the "first message".
[0087] It's important to note that when an application receives a new message, the Android application that receives the message typically calls the launcher app's badge API to notify the launcher app of the new message. The launcher app then determines whether to update the badge number based on the application's state. When the application is in the foreground, the launcher app does not update the badge number; when the application is in the background, the launcher app updates the badge number. In other words, when an application receives a new message, regardless of whether it's in the foreground or background, it will call the badge API on the launcher app. For example, as shown... Figure 5 As shown, with Figure 3 Taking the application interface shown as an example, when the user clicks the emulator application icon 301 on interface 310, assume the laptop displays interface 500. Interface 500 may include the desktop window 501 of the Android system running on the emulator and the email application window 502. The desktop may include application icons for Android applications, such as the email application icon 503 and the Huawei Video application icon 504. The email application icon 503 may display a badge number 2, which indicates that there are two unread emails in the email app. At this time, assuming the email app under the Android system running on the emulator receives a new message, the email app can call the badge interface on the desktop app. The desktop app then determines whether to update the badge number of the email app based on the status of the email. Since the email app is in the foreground at this time, it does not need to update the badge number on the email application icon.
[0088] It is worth noting that in some special scenarios, such as video chat / voice chat, applications can call the notification interface on the desktop app to display notifications. In this embodiment, when the application in the emulator receives a new message, whether it calls the badge interface or the notification interface, it can register a listener in the interface, thereby notifying the emulator when a new message is detected, and thus reminding the user of the message. For example, assuming that the laptop screen is currently displaying the Huawei Video app, i.e., the Huawei Video app is the foreground application, when the WeChat app receives a video chat notification message, the WeChat app can call the notification interface of the desktop app under the Android system on the emulator to automatically switch the WeChat app to the foreground app.
[0089] S403: The second application within the emulator sends the identifier of the first application to the emulator.
[0090] In this embodiment, when the first application receives the first message, it can send its application name (or application identifier, application ID) to the desktop app. The desktop app then sends the application name to the emulator, enabling the emulator to determine the application window ID corresponding to the application name. As one possible implementation, the desktop app and emulator can transmit information through a pre-negotiated transmission channel. For example, the desktop app can send the application identifier to the emulator via a pipe channel.
[0091] Optionally, when the first application receives the first message, it can also send its own application name to the third application, which in turn sends the first application's application name to the emulator. It should be understood that the third application can be a pre-configured application specifically designed for interacting with the emulator.
[0092] S404: The emulator determines the window identifier where the first message is located based on the first application identifier.
[0093] based on Figure 3 As can be seen from the description of the correspondence between application ID and application window ID in the illustrated embodiment, after an Android application is opened, the emulator application can know the application ID of the Android application, so the emulator can assign a window ID to the application based on the application ID.
[0094] Once the emulator receives the application identifier sent by the first application, it can determine the corresponding window identifier based on that application identifier. For example, suppose an email app receives a new message. The email app can then send a message to the emulator's desktop app, carrying its own application identifier. The desktop app can then send this message back to the emulator. The emulator then determines the window ID corresponding to the email based on the application identifier (email) carried in the message, for example, window ID 1-1.
[0095] S405: The emulator determines whether the window identifier where the first message is located is the same as the window identifier corresponding to the window where the user's mouse focus is located. If not, proceed to S406; if yes, proceed to S407.
[0096] It should be understood that mouse focus refers to the window that receives focus after being clicked by the mouse. When the user moves the mouse to another location, as long as no other window is clicked, the mouse focus remains on the window containing window 1. If the user then clicks on another window, such as window 2, window 1 loses mouse focus, and window 2 gains it. In other words, the window with mouse focus can be understood as the window where the user last interacted with the mouse.
[0097] In some embodiments, before S404 is executed, the emulator can first obtain the window identifier corresponding to the window where the user's mouse focus is located. Then, the emulator determines whether the window identifier of the first message is the same as the window identifier corresponding to the window where the user's mouse focus is located. Specifically, the emulator can determine whether the window where the user's mouse focus is located is the same as the window where the first message is located by reading the value of the window ID. For example, if the emulator reads that the window ID of the window where the user's mouse focus is located is 3, and the window ID of the window where the first message is located is 2, then the window where the user's mouse focus is located is different from the window where the first message is located.
[0098] S406: The emulator confirms and displays a prompt message.
[0099] In this embodiment of the application, when the simulator determines through S405 that the window where the user's mouse focus is located is different from the window where the first message is located, the simulator can determine that a reminder needs to be given to the user so that the user can process the message in a timely manner and improve the user experience.
[0100] For example, when the emulator determines that a new message needs to be sent to the user, that is, when the window corresponding to the new message is the same as the window where the mouse focus is, it can notify the Windows emulator process which child process's window needs to blink. The blinking time interval and blinking duration can be set, so that Windows can blink the corresponding window according to the child process's window identifier, blinking time interval, and blinking duration.
[0101] For ease of description, the window identifier where the first message is located will be referred to as "first identifier," and the window identifier corresponding to the window where the user's mouse focus is located will be referred to as "second identifier." It should be understood that the first identifier and the second identifier may be the same or different. In S405, the first identifier and the second identifier are different, while in S406, the first identifier and the second identifier are the same.
[0102] The following section will detail the situations where the first and second identifiers differ, using several possible application scenarios as examples.
[0103] Scenario 1: The first window containing the first message is displayed on the interface.
[0104] For scenario 1, the following two possible implementation schemes can be included:
[0105] The first type: such as Figure 6AAs shown in (a) above, assuming a laptop computer displays interface 600, which can display two application windows, such as email application window 601, Huawei video application window 602, and taskbar 603. The email application window 601 and the Huawei video application window 602 do not overlap. Furthermore, the taskbar 603 can include icons of the applications opened by the user. Of course, interface 600 can also include other application icons, etc., and this application does not limit this. It should be understood that the application window corresponding to the email application interface is window 601, and the application window corresponding to the Huawei video application interface is window 602. The taskbar can also be displayed on the right side of the screen, etc., and this application does not limit this.
[0106] When a user clicks the Huawei Video application window, the Huawei Video application window 602 gains mouse focus. At this point, regardless of how the user moves the mouse, as long as no other window is clicked, the window with mouse focus will always be the Huawei Video application window. It should be understood that the arrow shown on window 602 indicates the location of the mouse focus.
[0107] It should be noted that the "Inbox (0)" displayed in the email application window 601 can be understood as the email app not having received any new emails at this time. When the email app receives a new message, such as a new email, the "Inbox (0)" can be changed to "Inbox (1)".
[0108] As one possible implementation, the emulator could alert the user by flashing an application icon. For example, suppose the email app within the emulator receives a new email; the email app icon could then flash at a certain frequency, such as... Figure 6A As shown in (b) above. Interface 610 can then be displayed on the laptop. Interface 610 may include an email application window 611 and a taskbar 612. Compared to interface 600, the "Inbox (0)" in window 602 of interface 600 can be updated to the "Inbox (1)" in application window 611, and a new email (i.e., an email from John, received "just now") is added. Furthermore, the email application icon on the taskbar flashes. The flashing stops when the user clicks the email application icon.
[0109] It should be understood that the blinking of the icon in the embodiments of this application is only to indicate blinking by filling the lines shown in the figure. In the actual product implementation, the blinking color can be red, blue, etc., and this application does not limit it.
[0110] The second type: such as Figure 6BAs shown in (a), assuming a laptop computer displays interface 620, which can display two application windows, such as email application window 621, Huawei Video application window 622, and taskbar 623. Email application window 621 is covered by Huawei Video application window 622, meaning there is an overlap between the two windows. Taskbar 623 can include icons of applications opened by the user. At this time, the mouse focus is on Huawei Video application window 622. Regardless of how the user moves the mouse, as long as no other window is clicked, the window with the mouse focus will always be Huawei Video application window. Of course, interface 620 can also include other application icons, etc., which is not limited in this application.
[0111] As another possible implementation, the emulator can use pop-up windows to remind the user. For example, suppose an email app within the emulator receives a new email; a pop-up window can then display the number of new messages, such as... Figure 6B As shown in (b) above. At this time, the laptop can display interface 630, which may include an email application window 631, a pop-up window 632, and a first notification message, such as "Email Notification" 633, a second notification message, "You have a new email." 634, and a "Close" button 635. This allows the user to know which application within the emulator received the new message and the number of new messages received. When the user clicks the "Close" button 635 on the pop-up window, the laptop responds to the user's action and closes the pop-up window displayed on the interface. The user can then click the email application icon to view the received new messages.
[0112] It should be understood that the first notification message is used to inform the user of the source of the new message, and the second notification message is used to inform the user of the number of new messages.
[0113] Of course, another way to provide notifications is to have the email application icon flash at a certain frequency, while simultaneously displaying the number of new messages in a pop-up window. When the user clicks the "close" button on the pop-up, the laptop responds to the user's action, closing the pop-up on the interface. The email application icon can then continue flashing until the user clicks the email application icon again, at which point the flashing stops.
[0114] Scenario 2: The first window containing the first message is minimized.
[0115] Since each application corresponds to an application window in this embodiment, the first window containing the first message is the application window corresponding to the first application. For example... Figure 6CAs shown in (a) above, assuming the user minimizes the email application window, interface 640 can be displayed on the laptop. Interface 640 may include a taskbar 641 and the Huawei Video application window 642. The taskbar 641 may include the minimized email window 643 and the Huawei Video application icon. Of course, interface 640 may also include other application icons, etc., which are not limited in this application.
[0116] As another possible implementation, the emulator can use notifications to alert the user. For example, suppose an email app within the emulator receives a new email; the number of new messages can be displayed through app window blinking and notifications. Figure 6C As shown in (b), interface 650 can be displayed on the laptop at this time. Interface 650 may include a notification box 651, which may include a first notification message, such as "Email Reminder" 652, a third notification message, such as "John" 653, and a fourth notification message, such as "Hello, there is a meeting in the conference room at 2 pm today, please attend on time" 654. Of course, notification box 651 may also display the sender's avatar.
[0117] The first notification message indicates the source of the new message, the third notification message indicates the sender of the new message, and the fourth notification message indicates the content of the new message.
[0118] This allows users to see which application within the emulator received the new message and its content. The notification display time can be set, for example, 30 seconds, and will automatically close after 30 seconds. Users can then click on the flashing email application window to view the received new message.
[0119] Of course, when the application within the emulator receives a new message, it can also alert the user simply by displaying a notification. In some embodiments, the notification can also be displayed at fixed time intervals until the user clicks the email application icon to view the received new message, in order to prevent the user from missing new messages.
[0120] It should be noted that the content of the new message displayed in the notification may include part or all of the content. When the new message content is relatively short, it can be displayed in its entirety in the notification; when the new message content is relatively long, only part of the content can be displayed in the notification. This application does not impose any limitations on this.
[0121] The above are just some possible reminder methods. In actual product implementation, the above reminder methods can be combined or other methods can be used to remind users, such as reminding users by shaking the window. This application embodiment does not make specific limitations.
[0122] It should be understood that the above-described message notification method is merely an illustration of a specific scenario. In practical applications, the message notification method is not limited to a specific fixed scenario, for example... Figure 6A The scenario shown in (a) can also be reminded via pop-up windows or notifications; or Figure 6B The scenario shown in (a) can also be reminded by flashing the application icon, etc.
[0123] S407: The emulator is confirmed not to display any prompt messages.
[0124] If the user's mouse focus is on the first window of the first application, then the first message can be displayed directly in the first window. In this case, the user can see the new message directly without needing to be notified.
[0125] For example, such as Figure 6D As shown in (a), assume that a laptop computer displays interface 660, which can display two application windows, such as email application window 661, Huawei video application window 662, and taskbar 663. Assume that the user's mouse focus is on email application window 661.
[0126] At this point, if a new email is received, the simulator can determine that the user can see the new email, meaning there's no need to notify the user via icon flashing or other means. Therefore, interface 670 can be displayed on the laptop. This interface 670 may include: an email application window 671, a Huawei Video application window 662, and a taskbar 663. The taskbar 663 may include the email application icon and the Huawei Video application icon. As shown in the image, the new email is from "John" and was received "just now".
[0127] According to the solution of this application embodiment, when the application in the emulator receives a new message, the terminal device can remind the application in the emulator of the new message, thereby realizing the message reminder function of the foreground application, and enabling the user to obtain and process the new message in a timely manner, thus improving the user experience.
[0128] The methods provided in the embodiments of this application above are described from the perspective of interaction between applications on a terminal device. To implement the functions of the methods provided in the embodiments of this application above, the electronic device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0129] like Figure 7 As shown, some other embodiments of this application disclose an electronic device, which may be a terminal device with a display screen. See also... Figure 7 As shown, the electronic device 700 includes: a display screen 701; one or more processors 702; one or more memories 703; multiple applications 804 (not shown); and one or more computer programs 805 (not shown). The above devices can be connected via one or more communication buses 806.
[0130] The display screen 801 is used to display the interface of the application in the terminal device or to display prompt information. The memory 803 stores one or more computer programs, each including instructions; the processor 802 invokes the instructions stored in the memory 803, enabling the terminal device 800 to use the message notification method described in the above embodiment.
[0131] In this embodiment, the processor 802 may be a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in this embodiment. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in this embodiment can be directly implemented by the hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules may reside in the memory 803, and the processor 802 reads the program instructions from the memory 803 and, in conjunction with its hardware, completes the steps of the aforementioned methods.
[0132] In this embodiment, the memory 803 can be non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), or it can be volatile memory, such as RAM. The memory can also be any other medium capable of carrying or storing desired program code in the form of instructions or data structures, and accessible by a computer, but is not limited thereto. The memory in this embodiment can also be a circuit or any other device capable of implementing storage functions, used to store instructions and / or data.
[0133] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0134] Based on the above embodiments, this application also provides a computer storage medium storing a computer program, which, when executed by a computer, causes the computer to execute the message notification method provided in the above embodiments.
[0135] This application also provides a computer program product, including instructions, which, when run on a terminal device, cause the computer program product to execute the message notification method provided in the above embodiments.
[0136] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by instructions. These instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0137] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0138] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
Claims
1. A message alerting method, characterized by, The method comprises: The first application receives a first message sent by a second application, the first message comprising an identifier of the second application, the second application being an application that receives new messages, and the first application and the second application being application programs under a system carried by an emulator; The first application sends a second message to the emulator application, the second message comprising the identifier of the second application, the second message being used to instruct the emulator to determine whether to remind of new messages received by the second application.
2. The method of claim 1, wherein, The first message comprises at least one.
3. The method of claim 1 or 2, wherein, The first application receives a first message sent by a second application, the first message comprising an identifier of the second application, the second application being an application that receives new messages, and the first application and the second application being application programs under a system carried by an emulator; The first application receives a first message sent by a second application through a third application.
4. The method of claim 1, wherein, The first message further comprises a number of new messages received by the second application and content of the new messages received by the second application.
5. The method of claim 1, wherein, The emulator is an Android emulator.
6. The method of claim 1, wherein, The first application is a desktop application, and the second application is an email application or a Huawei video application.
7. A message alerting method characterized by, The method comprises: The emulator receives a first message sent by a first application, the first message comprising an identifier of a second application, the second application being an application that receives new messages, and the first application and the second application being application programs under a system carried by the emulator; The emulator determines a corresponding second window identifier according to the identifier of the second application; The emulator determines whether to remind of new messages received by the second application according to the second window identifier and a window identifier of a mouse focus window.
8. The method of claim 7, wherein, The first message is sent by the second application to the first application.
9. The method of claim 7, wherein, The first message is sent by the second application to the first application through a third application.
10. The method of claim 7, wherein, The emulator determines whether to remind of new messages received by the second application according to the second window identifier and a window identifier of a mouse focus window, comprising: If the emulator determines that the second window identifier is different from the window identifier of the mouse focus window, the emulator determines to remind of new messages received by the second application.
11. The method of claim 10, wherein, The method further comprises: If the emulator determines that the second window identifier is the same as the window identifier of the mouse focus window, the emulator determines not to remind of new messages received by the second application.
12. The method according to any one of claims 7 to 11, wherein, The first message further comprises a number of new messages received by the second application and content of the new messages received by the second application.
13. The method according to any one of claims 7 to 12, wherein, The reminding manner of the new messages received by the second application comprises at least one of the following manners: application icon flickering, application window flickering, pop-up window, notification, and application window shaking, the pop-up window or the notification comprising the number and / or content of the new messages.
14. A terminal device, comprising: The electronic device comprises a display screen, one or more processors, one or more memories, a plurality of applications, and one or more computer programs; The one or more computer programs are stored in the one or more memories, and the one or more computer programs comprise instructions that, when executed by the one or more processors, cause the terminal device to perform the method according to any one of claims 1 to 6 or 7 to 13. 15. A computer-readable storage medium having stored therein instructions, the computer-readable storage medium comprising: When the instructions are executed on a computer, cause the computer to perform the method of any one of claims 1 to 6 or 7 to 13.
16. A computer program product comprising instructions, characterized in that, When the computer program product is executed on a simulator of a terminal device, cause the computer program product to perform the method of any one of claims 1 to 6.
17. A computer program product comprising instructions, characterized in that, When the computer program product is executed on a terminal device, cause the computer program product to perform the method of any one of claims 7 to 13.
Citation Information
Patent Citations
Method and device for processing notification message, and mobile terminal
CN108111675A
System and method for terminal control
JP1996129527A