Android application notification synchronization system, method, device, medium and product
By designing an Android application notification synchronization system in the OpenHarmony operating system, using the communication connection between the Android system and the OpenHarmony system, cross-system synchronization of Android application notifications is achieved, solving the problem that the OpenHarmony operating system cannot publish Android application notifications, and improving user experience and system compatibility.
Patent Information
- Application Number
- CN202411750867.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-11
AI Technical Summary
The OpenHarmony operating system cannot directly publish notifications for Android application, which limits its ability to be compatible with Android applications and affects the integrity of the user experience.
An Android application notification synchronization system was designed. By setting up the communication connection between the Android system and the OpenHarmony system in the same terminal, it uses components such as Android application, notification subsystem, compatible subsystem and shell application to realize cross-system synchronization of Android application notifications.
It realizes seamless synchronization of notification messages between Android applications and OpenHarmony systems, improves user experience and improves the compatibility of OpenHarmony operating system for Android application notifications.
Smart Images

Figure CN119806859A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer operating systems, and in particular to Android application notification synchronization systems, methods, devices, media and products. Background Art
[0002] With the rapid development of information technology, smart terminal devices are becoming more and more popular. As the core software platform of the device, the importance of the operating system is self-evident. As an open source project incubated and operated by the Open Atom Open Source Foundation, OpenHarmony aims to build a framework and platform for the operating system of smart terminal devices to realize the vision of the Internet of Everything. The project supports a variety of device types, including mobile phones, tablets, smart homes, wearable devices, etc., providing users with a seamless experience while also focusing on security and privacy protection. As one of the current mainstream mobile operating systems, the Android system's application notification function plays an important role in the user experience. Android application notifications can provide users with important information and real-time updates, presented through push, message reminders, etc., to ensure that users get the required information in a timely manner. Developers can use Android's notification system to improve the user's interactive experience and information transmission efficiency through settings such as notification channels, notification types and priorities. However, in the current technical environment, the OpenHarmony operating system does not yet support direct release of Android application notifications, which limits the OpenHarmony system's ability to be compatible with Android applications and also affects the integrity of the user experience. Summary of the invention
[0003] The main purpose of this application is to provide an Android application notification synchronization system, method, device, medium and product, aiming to solve the technical problem that the OpenHarmony operating system cannot publish Android application notifications.
[0004] To achieve the above-mentioned purpose, the present application proposes an Android application notification synchronization system, the Android application notification synchronization system includes an Android system and an OpenHarmony system in the same terminal, the Android system and the OpenHarmony system are communicatively connected to each other, the Android system includes a communicatively connected Android application, a first notification subsystem, and a first Android compatible subsystem, the OpenHarmony system includes a communicatively connected second Android compatible subsystem, a shell application, a second notification subsystem, and a system user interface, and the shell application corresponds to the Android application one by one;
[0005] An Android application, used for generating a notification message and publishing the notification message to the first notification subsystem;
[0006] A first notification subsystem, configured to receive a notification message sent by an Android application, and send the notification message to a first Android compatible subsystem;
[0007] The first Android-compatible subsystem is configured to receive a notification message issued by the first notification subsystem, and send the notification message to the second Android-compatible subsystem;
[0008] The second Android-compatible subsystem is configured to receive a notification message from the first Android-compatible subsystem and send the notification message to a shell application;
[0009] The shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem;
[0010] The second notification subsystem is used to receive the first notification message and send the first notification message to the system user interface;
[0011] The system user interface is used to receive and display the first notification message.
[0012] In one embodiment, the Android system further includes an Everestd subsystem, and the OpenHarmony system further includes an Everest_service subsystem;
[0013] Everest_service subsystem, used to create sockets;
[0014] Everestd subsystem, used to create a client socket and use the client socket to establish a connection with the socket of the Everest_service subsystem;
[0015] A first Android compatible subsystem, used to send a notification message to the Everestd subsystem;
[0016] The Everestd subsystem is used to receive the notification message sent by the first Android compatible subsystem, encode the notification message, and transmit the encoded notification message to the Everest_service subsystem through the client socket;
[0017] The Everest_service subsystem is used to receive the encoded notification message through the socket, decode the encoded notification message, obtain the notification message, and send the notification message to the second Android compatible subsystem;
[0018] The second Android compatible subsystem is used to receive the notification message from the Everest_service subsystem and send the notification message to the shell application.
[0019] In one embodiment, the second notification subsystem is used to process the notification content of the first notification message according to the preset notification setting to obtain the second notification message, wherein the processing of the notification content includes notification content filtering processing, notification content priority notification processing, and notification content notification style processing;
[0020] The system user interface is used to receive and display the second notification message.
[0021] In one embodiment, the Android system is applied to the Android application notification synchronization system, and the Android application notification synchronization method includes:
[0022] Generate notification messages through Android applications in Android systems;
[0023] publishing a notification message to a first Android-compatible subsystem in the Android system according to the first notification subsystem in the Android system;
[0024] A notification message is sent to the OpenHarmony system through the first Android-compatible subsystem, wherein, after receiving the notification message, the second Android-compatible subsystem in the OpenHarmony system utilizes a shell application in the OpenHarmony system to parse the notification message to obtain a first notification message, and sends the first notification message to the system user interface in the OpenHarmony system for display according to the second notification subsystem in the OpenHarmony system.
[0025] In one embodiment, the step of sending the notification message to the OpenHarmony system through the first Android compatible subsystem includes:
[0026] Create a client socket in the Everestd subsystem in the Android system, and use the client socket to establish a connection with the socket of the Everest_service subsystem in the OpenHarmony system, where the Everest_service subsystem creates the socket;
[0027] Sending a notification message to the Everestd subsystem through the first Android compatible subsystem;
[0028] The notification message is encoded according to the Everestd subsystem, and the encoded notification message is transmitted to the Everest_service subsystem through the client socket, wherein after receiving the encoded notification message through the socket, the Everest_service subsystem decodes the encoded notification message to obtain the notification message, and sends the notification message to the shell application through the second Android compatible subsystem.
[0029] In one embodiment, the OpenHarmony system is applied to the Android application notification synchronization system, and the Android application notification synchronization method includes:
[0030] receiving a notification message sent by the Android system through the second Android-compatible subsystem in the OpenHarmony system, wherein, after the Android application in the Android system generates a notification message, the notification message is published to the first Android-compatible subsystem in the Android system according to the first notification subsystem in the Android system, and the notification message is sent to the second Android-compatible subsystem in the OpenHarmony system through the first Android-compatible subsystem;
[0031] Parsing the received notification message according to the shell application in the OpenHarmony system to obtain a first notification message;
[0032] The first notification message is sent to the system user interface for display through the second notification subsystem in the OpenHarmony system.
[0033] In one embodiment, the step of receiving, by the second Android compatible subsystem in the OpenHarmony system, a notification message sent by the Android system includes:
[0034] A socket is created through the Everest_service subsystem in the OpenHarmony system, wherein the Everestd subsystem in the Android system creates a client socket and uses the client socket to establish a connection with the socket, and after the connection is established, the first Android compatible subsystem sends a notification message to the Everestd subsystem;
[0035] The Everest_service subsystem is used to receive a preset encoded notification message through a socket, decode the encoded notification message, obtain the notification message, and send the notification message to the shell application through a second Android-compatible subsystem, wherein the Everestd subsystem encodes the notification message and transmits the encoded notification message to the Everest_service subsystem through the client socket.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the Android application notification synchronization method as described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a product, which is a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the Android application notification synchronization method as described above are implemented.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] The present application provides an Android application notification synchronization system, including an Android system and an OpenHarmony system in the same terminal, the Android system and the OpenHarmony system are connected to each other in communication, the Android system includes a communication-connected Android application, a first notification subsystem, and a first Android-compatible subsystem, the OpenHarmony system includes a communication-connected second Android-compatible subsystem, a shell application, a second notification subsystem, and a system user interface, the shell application corresponds to the Android application one-to-one, thereby achieving seamless synchronization of notification messages between the Android application and the OpenHarmony system and improving the user experience; the Android application is used to generate notification messages and publish notification messages to the first notification subsystem; the first notification subsystem is used to Receive notification messages from Android applications and send them to the first Android compatible subsystem; the first Android compatible subsystem is used to receive notification messages issued by the first notification subsystem and send them to the second Android compatible subsystem; the second Android compatible subsystem is used to receive notification messages from the first Android compatible subsystem and send them to the shell application; the shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem; the second notification subsystem is used to receive the first notification message and send it to the system user interface; the system user interface is used to receive and display the first notification message, so that users can intuitively see notifications from Android applications and perform corresponding operations. The OpenHarmony operating system's compatibility with Android application notifications is improved, which makes up for the defect in the prior art that the OpenHarmony operating system cannot publish Android application notifications, and ensures that Android application notifications can be published and displayed normally on the OpenHarmony system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0042] Figure 1 This is a schematic diagram of the structure of the Android application notification synchronization system for this application;
[0043] Figure 2 This is a flowchart of Embodiment 2 of the Android application notification synchronization method of this application;
[0044] Figure 3This is another flowchart of the Android application notification synchronization method of the present application;
[0045] Figure 4 This is another flowchart of the Android application notification synchronization method of the present application;
[0046] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the Android application notification synchronization method in the embodiment of the present application.
[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0050] Based on this, an embodiment of the present application provides an Android application notification synchronization system.
[0051] In this embodiment, the Android application notification synchronization system includes an Android system and an OpenHarmony system in the same terminal, the Android system and the OpenHarmony system are communicatively connected to each other, the Android system includes a communicatively connected Android application, a first notification subsystem, and a first Android compatible subsystem, the OpenHarmony system includes a communicatively connected second Android compatible subsystem, a shell application, a second notification subsystem, and a system user interface, and the shell application corresponds to the Android application one by one;
[0052] An Android application, used for generating a notification message and publishing the notification message to the first notification subsystem;
[0053] A first notification subsystem, configured to receive a notification message sent by an Android application, and send the notification message to a first Android compatible subsystem;
[0054] The first Android-compatible subsystem is configured to receive a notification message issued by the first notification subsystem, and send the notification message to the second Android-compatible subsystem;
[0055] The second Android-compatible subsystem is configured to receive a notification message from the first Android-compatible subsystem and send the notification message to a shell application;
[0056] The shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem;
[0057] The second notification subsystem is used to receive the first notification message and send the first notification message to the system user interface;
[0058] The system user interface is used to receive and display the first notification message.
[0059] In this embodiment, Android applications refer to various application programs running on the Android system, such as social media applications, email applications, calendar applications, etc., which usually include a user interface (UI), a business logic layer, a data storage layer, etc. Android applications can generate notification messages, which usually contain important information, such as new message reminders, event reminders, etc., and publish these notification messages to the first notification subsystem.
[0060] The first notification subsystem is a component inside the Android system for processing notification messages, including a notification manager, a notification queue, a notification rendering engine, etc. The first notification subsystem is responsible for receiving notification messages issued by Android applications and forwarding these messages to the first Android compatible subsystem for cross-system synchronization.
[0061] The first Android compatible subsystem is a bridge for realizing communication between the Android system and the OpenHarmony system. It may include a communication interface, a data conversion module, etc. The first Android compatible subsystem receives notification messages issued by the first notification subsystem and sends these messages to the second Android compatible subsystem.
[0062] The second Android compatible subsystem may be a component in the OpenHarmony system for receiving and processing notification messages from the Android system. Similar to the first Android compatible subsystem, it may also include a communication interface, a data conversion module, and other parts. The second Android compatible subsystem receives the notification message sent by the first Android compatible subsystem and then sends it to the shell application.
[0063] The shell application is an application in the OpenHarmony system that corresponds to the Android application one-to-one, and is used to receive and process notification messages from the Android system. The shell application may include a notification parser, a user interface renderer, and other parts. The shell application receives the notification message sent by the second Android compatible subsystem, converts it into a format that can be recognized by the OpenHarmony system, parses it to obtain the first notification message, and sends it to the second notification subsystem.
[0064] The second notification subsystem may be a component in the OpenHarmony system for processing notification messages. It may include a notification manager, a notification display engine, and other parts. The second notification subsystem receives the first notification message sent by the shell application and sends it to the system user interface for display.
[0065] The system user interface may be an interface in the OpenHarmony system for displaying user-visible information. The system user interface may include a notification bar, a status bar, and other parts. The system user interface receives and displays the first notification message sent by the second notification subsystem, so that the user can see the notification information from the Android application.
[0066] The Android application generates a notification message and publishes it to the first notification subsystem. After receiving the notification message, the first notification subsystem forwards it to the first Android compatible subsystem. The first Android compatible subsystem receives and sends it to the second Android compatible subsystem. The second Android compatible subsystem receives and converts the notification message, and then sends it to the corresponding shell application. The shell application converts the notification message into a format that the OpenHarmony system can recognize, obtains the first notification message, and sends it to the second notification subsystem. The second notification subsystem sends the first notification message to the system user interface for display.
[0067] This embodiment provides an Android application notification synchronization system, including an Android system and an OpenHarmony system in the same terminal, the Android system and the OpenHarmony system are connected to each other in communication, the Android system includes a communicatively connected Android application, a first notification subsystem, and a first Android compatible subsystem, the OpenHarmony system includes a communicatively connected second Android compatible subsystem, a shell application, a second notification subsystem, and a system user interface, the shell application corresponds to the Android application one-to-one, thereby achieving seamless synchronization of notification messages between the Android application and the OpenHarmony system and improving the user experience; the Android application is used to generate notification messages and publish notification messages to the first notification subsystem; the first notification subsystem is used to Receive notification messages from Android applications and send them to the first Android compatible subsystem; the first Android compatible subsystem is used to receive notification messages issued by the first notification subsystem and send them to the second Android compatible subsystem; the second Android compatible subsystem is used to receive notification messages from the first Android compatible subsystem and send them to the shell application; the shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem; the second notification subsystem is used to receive the first notification message and send it to the system user interface; the system user interface is used to receive and display the first notification message, so that users can intuitively see notifications from Android applications and perform corresponding operations. The OpenHarmony operating system's compatibility with Android application notifications is improved, which makes up for the defect in the prior art that the OpenHarmony operating system cannot publish Android application notifications, and ensures that Android application notifications can be published and displayed normally on the OpenHarmony system.
[0068] In a feasible implementation, the Android system further includes an Everestd subsystem, and the OpenHarmony system further includes an Everest_service subsystem;
[0069] Everest_service subsystem, used to create sockets;
[0070] Everestd subsystem, used to create a client socket and use the client socket to establish a connection with the socket of the Everest_service subsystem;
[0071] A first Android compatible subsystem, used to send a notification message to the Everestd subsystem;
[0072] The Everestd subsystem is used to receive the notification message sent by the first Android compatible subsystem, encode the notification message, and transmit the encoded notification message to the Everest_service subsystem through the client socket;
[0073] The Everest_service subsystem is used to receive the encoded notification message through the socket, decode the encoded notification message, obtain the notification message, and send the notification message to the second Android compatible subsystem;
[0074] The second Android compatible subsystem is used to receive the notification message from the Everest_service subsystem and send the notification message to the shell application.
[0075] In this embodiment, the Everest_service subsystem is a server-side component of network communication, responsible for monitoring and receiving network communications from the Everestd subsystem. It includes a socket creation module for creating sockets required for network communication, and a message receiving and decoding module for receiving encoded notification messages and decoding them.
[0076] The Everestd subsystem is a client component for network communication. It acts as a bridge between the first Android-compatible subsystem and the Everest_service subsystem. It includes a client socket creation module for creating a client socket for communicating with the Everest_service subsystem, and a message encoding and sending module for receiving notification messages from the first Android-compatible subsystem, encoding these messages, and sending them to the Everest_service subsystem through the client socket.
[0077] These subsystems together form a complete communication chain, in which the Everest_service subsystem receives and decodes the message from the Everestd subsystem, and then sends the decoded notification message to the second Android-compatible subsystem, which finally sends the notification message to the shell application for display or processing.
[0078] For example, refer to Figure 1 , Figure 1 The figure shows how the OpenHarmony system and the Android system work together to handle application notifications. The figure contains two main systems: the OpenHarmony system and the Android system, as well as their respective components and data flows. The OpenHarmony system includes shell applications (one-to-one correspondence with Android applications), the system user interface, the second Android-compatible subsystem, the second notification subsystem, and the Everest_service subsystem. The Android system includes Android applications, the first notification subsystem, the first Android-compatible subsystem, and the Everestd subsystem.
[0079] The arrows in the figure represent the data flow between subsystems. Arrow 01 indicates that the Android application publishes a notification through the first notification subsystem. Arrow 02 indicates that the first notification subsystem sends the notification to the first Android-compatible subsystem. Arrow 03 indicates that the first Android-compatible subsystem sends the notification to the Everestd subsystem. Arrow 04 indicates that the Everestd subsystem communicates with the Everest_service subsystem through a socket and sends a notification. Arrow 05 indicates that the Everest_service subsystem receives the notification and sends it to the second Android-compatible subsystem. Arrow 06 indicates that the second Android-compatible subsystem sends the notification to the shell application. Arrow 07 indicates that the second Android-compatible subsystem interacts with the second notification subsystem for the user to respond to the notification. Arrow 08 indicates that the system user interface interacts with the second notification subsystem for displaying notifications or processing user interactions.
[0080] In this embodiment, Android application notification messages can be transferred through the Everestd subsystem and the Everest_service subsystem to achieve cross-system synchronization and display between the Android system and the OpenHarmony system. In this process, the Everestd subsystem and the Everest_service subsystem together form a communication bridge to ensure the accurate delivery and efficient processing of notification messages.
[0081] In a feasible implementation manner, the second notification subsystem is used to process the notification content of the first notification message according to the preset notification setting to obtain the second notification message, wherein the notification content processing includes notification content filtering processing, notification content priority notification processing, and notification content notification style processing;
[0082] The system user interface is used to receive and display the second notification message.
[0083] The second notification subsystem is a module in the OpenHarmony system that is responsible for managing functions such as notification publishing, cancellation, updating, and display. After receiving notification messages from the second Android-compatible subsystem, it will process these notification messages according to the preset notification settings. The preset notification settings may include: notification display mode (such as pop-up windows, banners, icon flashing, etc.), notification priority (such as high, medium, low), notification vibration mode, ringtone selection, etc., notification display duration, automatic hiding or manual clearing settings of notifications. The second notification subsystem will filter the notification content of the received notification messages according to the above settings, format the notification content, sort the notification content priority, update the notification content and notification style, etc., so as to generate a second notification message suitable for display on the OpenHarmony system.
[0084] The system user interface is the component in the OpenHarmony system that is responsible for interacting with the user. It contains various user-visible elements, such as the status bar, navigation bar, notification center, etc. After the second notification subsystem processes the notification message and generates the second notification message, it passes these messages to the system user interface. The system user interface will display these notification messages in an appropriate location (such as the notification center) according to the instructions of the second notification subsystem. The display methods may include: displaying the notification icon in the status bar, displaying the notification details in a list format in the notification center, popping up a notification pop-up window at the top of the screen (for high-priority notifications), and reminding users of notifications through sound, vibration, etc.
[0085] In this embodiment, the second notification subsystem ensures that notification messages can be customized according to user preferences and settings, and the system user interface is responsible for presenting these processed notification messages to users in an intuitive and easy-to-understand manner, thereby improving the user's notification experience.
[0086] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be repeated later.
[0087] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a terminal system, etc. that can realize the above functions. The following takes the Android application notification synchronization system (hereinafter referred to as the system) as an example to illustrate this embodiment and the following embodiments.
[0088] This embodiment also provides an Android application notification synchronization method, which is applied to an Android system in an Android application notification synchronization system. Figure 2 , Figure 2 This is a flow chart of Embodiment 2 of the Android application notification synchronization method of this application. The method includes steps S11 to S13:
[0089] Step S11, generating a notification message through an Android application in the Android system;
[0090] Step S12, publishing the notification message to the first Android compatible subsystem in the Android system according to the first notification subsystem in the Android system;
[0091] Step S13, sending a notification message to the OpenHarmony system through the first Android-compatible subsystem, wherein, after receiving the notification message, the second Android-compatible subsystem in the OpenHarmony system utilizes the shell application in the OpenHarmony system to parse the notification message to obtain a first notification message, and sends the first notification message to the system user interface in the OpenHarmony system for display according to the second notification subsystem in the OpenHarmony system.
[0092] First, on the Android system, a user generates a notification message through an Android application. This notification message may be a reminder about an event, a reminder, or a state change. Then, the first notification subsystem in the Android system receives the notification message and publishes it to the first Android compatible subsystem. The first Android compatible subsystem is designed for the Android system to be compatible with other systems (such as OpenHarmony). It can convert the notification message of the Android system into a format that the OpenHarmony system can understand. Then, the first Android compatible subsystem sends the converted notification message to the OpenHarmony system. In the OpenHarmony system, the second Android compatible subsystem receives the notification message. The second Android compatible subsystem is also designed for compatibility with the Android system, and it can parse the notification message from the Android system. During the parsing process, the second Android compatible subsystem uses the shell application in the OpenHarmony system to parse the notification message. The shell application is an application running on the OpenHarmony system. It acts as a bridge to interact with the Android application and can identify and parse the notification message format from the Android application. Through parsing, the shell application obtains the first notification message, which is a notification message that has been converted into a format that the OpenHarmony system can understand. Finally, the second notification subsystem receives the first notification message and sends it to the system user interface of the OpenHarmony system for display. The system user interface is a user interface provided by the OpenHarmony system, which is used to display various information (such as notifications, status, etc.) and allow users to interact. In this way, users can see notification messages from Android applications on the OpenHarmony system.
[0093] This embodiment of the Android system applied to the Android application notification synchronization system reflects the compatibility and communication capabilities between the Android system and the OpenHarmony system, allowing users to obtain a consistent usage experience on different operating systems.
[0094] In one possible implementation, refer to Figure 3 , step S13 also includes steps A10 to A20:
[0095] Step A10, creating a client socket in the Everestd subsystem in the Android system, and using the client socket to establish a connection with the socket of the Everest_service subsystem in the OpenHarmony system, wherein the Everest_service subsystem creates the socket;
[0096] It should be noted that the client socket is a socket created by the client to communicate with the server in network communication. In network programming, a socket is an abstract endpoint used to identify the communicating parties, including IP addresses and port numbers.
[0097] Step A20, sending a notification message to the Everestd subsystem through the first Android compatible subsystem;
[0098] Step A30, encode the notification message according to the Everestd subsystem, and transmit the encoded notification message to the Everest_service subsystem through the client socket, wherein the Everest_service subsystem receives the encoded notification message through the socket, decodes the encoded notification message, obtains the notification message, and sends the notification message to the shell application through the second Android-compatible subsystem.
[0099] It should be noted that encoding is the process of converting information into a specific format for transmission over a network, and decoding is the process of converting the encoded information back to its original format.
[0100] First, in the Android system, the Everestd subsystem creates a client socket. This socket is the endpoint used by the Everestd subsystem to establish a communication connection with the Everest_service subsystem in the OpenHarmony system. At the same time, in the OpenHarmony system, the Everest_service subsystem has created a corresponding socket to listen for connection requests from the Android system. Next, when there is a notification message in the Android system that needs to be sent to the OpenHarmony system, the notification message is first sent to the first Android compatible subsystem. The first Android compatible subsystem is a component designed by the Android system for compatibility with other systems. It can convert the notification message of the Android system into a format that the Everestd subsystem can understand. Then, the Everestd subsystem receives the notification message from the first Android compatible subsystem and encodes the message. The purpose of encoding is to convert the notification message into a format suitable for transmission in the network to ensure the integrity and security of the message during transmission. The encoded notification message is sent to the Everest_service subsystem in the OpenHarmony system through the client socket created previously. After the Everest_service subsystem receives the encoded notification message, it decodes the message. The decoding process is the opposite of encoding, and is the process of converting the encoded message back to the original format. Through decoding, the Everest_service subsystem obtains the original notification message. Finally, the Everest_service subsystem sends the decoded notification message to the second Android-compatible subsystem. The second Android-compatible subsystem is a component of the OpenHarmony system designed for compatibility with the Android system. It can convert the notification message from the Everest_service subsystem into a format that the shell application can understand. Then, the shell application receives the notification message and displays or processes it on its user interface.
[0101] This embodiment embodies the core principles of cross-system communication and data exchange. By defining compatible subsystems (such as the first Android compatible subsystem and the second Android compatible subsystem) and intermediate service components (such as Everest_service subsystem and Everestd subsystem), seamless communication and data exchange between different systems are achieved. In this process, the socket, as the endpoint of network communication, plays a key role, enabling the Everest_service subsystem and the Everestd subsystem to transmit data across network boundaries. At the same time, data conversion and processing between subsystems are also key steps to achieve cross-system communication, which ensure the accuracy and comprehensibility of the data.
[0102] In a feasible implementation manner, step S12 may include step C10:
[0103] Step C10, registering monitoring with the first notification subsystem through the first Android compatible subsystem;
[0104] It should be noted that a listener is a component in a programming mode, which is used to monitor and respond to the occurrence of a specific event. In this embodiment, the listener is registered on the first notification subsystem to monitor the notification message publishing event from the Android application. When an event occurs, the listener triggers the corresponding processing logic.
[0105] The first Android compatible subsystem first registers a listener with the first notification subsystem. The purpose of this listener is to listen to notification message publishing events from Android applications. The registration process may involve the first Android compatible subsystem sending a registration request to the first notification subsystem, and the request contains relevant information of the listener (such as the identifier of the listener, callback function, etc.). After receiving the registration request, the first notification subsystem will store it in an internal data structure so that the corresponding listener can be found and triggered in subsequent notification message publishing events.
[0106] Step S20 may include step C20:
[0107] Step C20: When the first notification subsystem receives the notification message released by the Android application, the first notification subsystem sends the notification message to the first Android compatible subsystem using inter-process communication.
[0108] It should be noted that inter-process communication is a mechanism that allows data exchange and communication between different processes. In this embodiment, inter-process communication is used for communication between the first notification subsystem and the first Android compatible subsystem to transmit notification messages.
[0109] When an Android application publishes a notification message, it sends the message to the first notification subsystem. After receiving the notification message, the first notification subsystem searches for the previously registered listener and triggers the callback function of the listener. In the callback function, the first notification subsystem uses an IPC communication mechanism (such as sockets, pipes, shared memory, etc.) to send the notification message to the first Android compatible subsystem. After receiving the notification message, the first Android compatible subsystem processes it (such as decoding, format conversion, etc.) so that it can be correctly displayed to the user on the Android system.
[0110] This embodiment embodies the application of the listener mode and IPC communication in cross-system component communication. By registering a listener, the first Android-compatible subsystem can monitor the notification message publishing events from the Android application in real time and respond promptly when the event occurs. The IPC communication mechanism ensures that the notification messages can be transmitted efficiently and reliably between the first notification subsystem and the first Android-compatible subsystem. This design ensures both the flexibility of the system and the integration of the system.
[0111] Based on the first or second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first or second embodiment can be referred to the above description, and no further description will be given later. This embodiment is applied to the OpenHarmony system in the Android application notification synchronization system, refer to Figure 4 The method comprises steps S21 to S23:
[0112] Step S21, receiving a notification message sent by the Android system through the second Android compatible subsystem in the OpenHarmony system, wherein after the Android application in the Android system generates a notification message, the notification message is published to the first Android compatible subsystem in the Android system according to the first notification subsystem in the Android system, and the notification message is sent to the second Android compatible subsystem in the OpenHarmony system through the first Android compatible subsystem;
[0113] Step S22, parsing the received notification message according to the shell application in the OpenHarmony system to obtain a first notification message;
[0114] Step S23: Send the first notification message to the system user interface for display through the second notification subsystem in the OpenHarmony system.
[0115] In the OpenHarmony system, the second Android-compatible subsystem is a key role in communicating with the Android system. When an Android application in the Android system generates a notification message, the message is first captured by the first notification subsystem of the Android system. The first notification subsystem is responsible for managing and publishing notification messages, and it passes these messages to the first Android-compatible subsystem of the Android system. The first Android-compatible subsystem acts as a communication bridge between the Android system and the OpenHarmony system, performs necessary format conversion or encapsulation on the notification message, and then sends the message to the second Android-compatible subsystem in the OpenHarmony system through a preset communication protocol (such as TCP / IP, HTTP, etc.).
[0116] In the OpenHarmony system, the shell application acts as a bridge between the user interaction layer and the application layer, and is responsible for receiving notification messages delivered by the second Android-compatible subsystem. The shell application has a built-in message parsing module that can identify and parse the notification message format from the Android system. The parsing process includes but is not limited to decoding the message content, parsing the message structure, and identifying the message type. Through parsing, the shell application can extract the key information in the notification message and convert it into the first notification message format that can be recognized within the OpenHarmony system.
[0117] After the parsing is completed, the shell application passes the first notification message to the second notification subsystem of the OpenHarmony system. The second notification subsystem is the core component responsible for displaying notification messages in the OpenHarmony system. It receives the first notification message from the shell application and displays it accordingly on the system user interface based on the type and content of the message. The display method may include displaying a new notification entry in the notification bar, or popping up a notification dialog box on the screen to remind the user. In addition, the second notification subsystem can also personalize the display method of the notification message according to the user's preferences, such as adjusting the display style of the notification, sound prompts, etc.
[0118] This embodiment realizes the effective processing and display of notification messages from the Android system by the OpenHarmony system through the steps of receiving by the second Android compatible subsystem, parsing by the shell application, and display by the second notification subsystem. This process not only reflects the ability of the OpenHarmony system in cross-platform communication, but also demonstrates its optimization and improvement in user interaction experience.
[0119] In a feasible implementation manner, step S13 further includes steps B10 to B20:
[0120] Step B10, creating a socket through the Everest_service subsystem in the OpenHarmony system, wherein the Everestd subsystem in the Android system creates a client socket, and uses the client socket to establish a connection with the socket, and after the connection is established, the first Android compatible subsystem sends a notification message to the Everestd subsystem;
[0121] In the OpenHarmony system architecture, the Everest_service subsystem is responsible for network communication. It initializes and creates a socket as an interface for communicating with the Everestd subsystem of the Android system. At the same time, the Everestd subsystem of the Android system creates a client socket and actively initiates a connection request with the Everest_service subsystem socket. The connection process is based on the TCP / IP protocol stack, which ensures the reliability and sequence of data transmission. Once the connection is successfully established, both parties can perform two-way data transmission through the connection.
[0122] Step B20, Everest_service subsystem is used to receive a preset encoded notification message through a socket, decode the encoded notification message, obtain the notification message, and send the notification message to the shell application through a second Android-compatible subsystem, wherein the Everestd subsystem encodes the notification message and transmits the encoded notification message to the Everest_service subsystem through the client socket.
[0123] When an application in the Android system needs to send a notification message to the OpenHarmony system, the message is first passed to the first Android compatible subsystem. As a bridge between the Android system and the OpenHarmony system, the first Android compatible subsystem is responsible for converting the notification message format of the Android system into a format recognizable by the Everestd subsystem. Subsequently, the Everestd subsystem encodes the notification message using a preset encoding algorithm (such as Base64, UTF-8, etc.) to ensure the integrity and readability of the message during transmission. After the encoding is completed, the Everestd subsystem sends the encoded notification message to the Everest_service subsystem of the OpenHarmony system through the previously established client socket. After receiving the encoded notification message from the Everestd subsystem, the Everest_service subsystem first decodes the message using a decoding algorithm corresponding to the encoding algorithm to restore the original notification message content. After successful decoding, the Everest_service subsystem passes the notification message to the second Android compatible subsystem. As another bridge for communication between the OpenHarmony system and the Android system, the second Android compatible subsystem is responsible for converting the notification message format into a format recognizable by the shell application. Finally, the shell application receives the decoded notification message from the second Android compatible subsystem. As the user interaction interface on the OpenHarmony system, the shell application is responsible for parsing and displaying the content of the notification message. Depending on the type and content of the message, the shell application may display a new notification in the notification bar or pop up a dialog box on the screen to remind the user. In addition, the shell application can further process the notification message according to the user's needs, such as opening related applications, performing specific operations, etc.
[0124] This implementation case achieves seamless transmission and display of notification messages between the Android system and the OpenHarmony system through the steps of establishing communication between the Everest_service subsystem and the Everestd subsystem, encoding and transmitting notification messages, decoding and message processing by the Everest_service subsystem, and message reception and display by the shell application.
[0125] It should be noted that, under the condition that the technology is feasible and the logic is clear, the above embodiments can be combined in pairs or in multiple combinations.
[0126] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the Android application notification synchronization method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0127] The present application provides an Android application notification synchronization device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the Android application notification synchronization method in the above-mentioned embodiment one.
[0128] Reference below Figure 5 , which shows a schematic diagram of the structure of an Android application notification synchronization device suitable for implementing the embodiment of the present application. The Android application notification synchronization device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The Android application notification synchronization device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0129] like Figure 5As shown, the Android application notification synchronization device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the Android application notification synchronization device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the Android application notification synchronization device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows an Android application notification synchronization device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0130] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0131] The Android application notification synchronization device provided by the present application adopts the Android application notification synchronization method in the above embodiment, which can solve the technical problem that the OpenHarmony operating system cannot issue Android application notifications. Compared with the prior art, the beneficial effects of the Android application notification synchronization device provided by the present application are the same as the beneficial effects of the Android application notification synchronization method provided by the above embodiment, and other technical features in the Android application notification synchronization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0132] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0133] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0134] The present application provides a medium, which is a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the Android application notification synchronization method in the above-mentioned embodiment.
[0135] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0136] The computer-readable storage medium may be included in the Android application notification synchronization device; or may exist independently without being assembled into the Android application notification synchronization device.
[0137] The computer-readable storage medium carries one or more programs. When the one or more programs are notified by the Android application to the synchronization device to execute, the Android application notifies the synchronization device:
[0138] An Android application, used for generating a notification message and publishing the notification message to the first notification subsystem;
[0139] A first notification subsystem, configured to receive a notification message sent by an Android application, and send the notification message to a first Android compatible subsystem;
[0140] The first Android-compatible subsystem is configured to receive a notification message issued by the first notification subsystem, and send the notification message to the second Android-compatible subsystem;
[0141] The second Android-compatible subsystem is configured to receive a notification message from the first Android-compatible subsystem and send the notification message to a shell application;
[0142] The shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem;
[0143] The second notification subsystem is used to receive the first notification message and send the first notification message to the system user interface;
[0144] The system user interface is used to receive and display the first notification message.
[0145] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0146] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0147] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0148] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned Android application notification synchronization method, and can solve the technical problem that the OpenHarmony operating system cannot issue Android application notifications. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the Android application notification synchronization method provided by the above-mentioned embodiment, and will not be repeated here.
[0149] The present application also provides a product, which is a computer program product, including a computer program, which implements the steps of the Android application notification synchronization method as described above when the computer program is executed by a processor.
[0150] The computer program product provided by this application can solve the technical problem that the OpenHarmony operating system cannot issue Android application notifications. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the Android application notification synchronization method provided by the above embodiment, which will not be repeated here.
[0151] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. An Android application notification synchronization system, characterized in that: The Android application notification synchronization system includes an Android system and an OpenHarmony system in the same terminal, the Android system and the OpenHarmony system are communicatively connected to each other, the Android system includes a communicatively connected Android application, a first notification subsystem, and a first Android compatible subsystem, the OpenHarmony system includes a communicatively connected second Android compatible subsystem, a shell application, a second notification subsystem, and a system user interface, the shell application corresponds to the Android application one by one; The Android application is used to generate a notification message and publish the notification message to the first notification subsystem; The first notification subsystem is used to receive the notification message sent by the Android application, and send the notification message to the first Android compatible subsystem; The first Android-compatible subsystem is configured to receive the notification message issued by the first notification subsystem, and send the notification message to the second Android-compatible subsystem; The second Android-compatible subsystem is configured to receive the notification message from the first Android-compatible subsystem and send the notification message to the shell application; The shell application is used to parse the received notification message, obtain the first notification message, and send the first notification message to the second notification subsystem; The second notification subsystem is used to receive the first notification message and send the first notification message to the system user interface; The system user interface is used to receive and display the first notification message.
2. The Android application notification synchronization system as claimed in claim 1, characterized in that: The Android system also includes an Everestd subsystem, and the OpenHarmony system also includes an Everest_service subsystem; The Everest_service subsystem is used to create a socket; The Everestd subsystem is used to create a client socket and use the client socket to establish a connection with the socket of the Everest_service subsystem; The first Android compatible subsystem is used to send the notification message to the Everestd subsystem; The Everestd subsystem is used to receive the notification message sent by the first Android compatible subsystem, encode the notification message, and transmit the encoded notification message to the Everest_service subsystem through the client socket; The Everest_service subsystem is used to receive the encoded notification message through the socket, decode the encoded notification message to obtain the notification message, and send the notification message to the second Android compatible subsystem; The second Android-compatible subsystem is used to receive the notification message from the Everest_service subsystem and send the notification message to the shell application.
3. The Android application notification synchronization system as claimed in claim 1, characterized in that: The second notification subsystem is used to process the notification content of the first notification message according to the preset notification settings to obtain a second notification message, wherein the notification content processing includes notification content filtering processing, notification content priority notification processing, and notification content notification style processing; The system user interface is used to receive and display the second notification message.
4. An Android application notification synchronization method, characterized in that: An Android system applied to an Android application notification synchronization system according to any one of claims 1 to 3, wherein the Android application notification synchronization method comprises: Generate a notification message through an Android application in the Android system; publishing the notification message to a first Android-compatible subsystem in the Android system according to the first notification subsystem in the Android system; The notification message is sent to the OpenHarmony system through the first Android-compatible subsystem, wherein, after receiving the notification message, the second Android-compatible subsystem in the OpenHarmony system utilizes a shell application in the OpenHarmony system to parse the notification message to obtain a first notification message, and sends the first notification message to the system user interface in the OpenHarmony system for display according to the second notification subsystem in the OpenHarmony system.
5. The Android application notification synchronization method as claimed in claim 4, characterized in that: The step of sending the notification message to the OpenHarmony system through the first Android compatible subsystem includes: Creating a client socket in the Everestd subsystem in the Android system, and using the client socket to establish a connection with a socket of the Everest_service subsystem in the OpenHarmony system, wherein the Everest_service subsystem creates the socket; Sending the notification message to the Everestd subsystem through the first Android compatible subsystem; The notification message is encoded according to the Everestd subsystem, and the encoded notification message is transmitted to the Everest_service subsystem through the client socket, wherein after receiving the encoded notification message through the socket, the Everest_service subsystem decodes the encoded notification message to obtain the notification message, and sends the notification message to the shell application through the second Android-compatible subsystem.
6. An Android application notification synchronization method, characterized in that: The OpenHarmony system applied to the Android application notification synchronization system according to any one of claims 1 to 3, wherein the Android application notification synchronization method comprises: receiving a notification message sent by the Android system through the second Android-compatible subsystem in the OpenHarmony system, wherein, after the Android application in the Android system generates the notification message, the notification message is published to the first Android-compatible subsystem in the Android system according to the first notification subsystem in the Android system, and the notification message is sent to the second Android-compatible subsystem in the OpenHarmony system through the first Android-compatible subsystem; Parsing the received notification message according to the shell application in the OpenHarmony system to obtain a first notification message; The first notification message is sent to the system user interface for display through the second notification subsystem in the OpenHarmony system.
7. The Android application notification synchronization method according to claim 6, characterized in that: The step of receiving the notification message sent by the Android system through the second Android compatible subsystem in the OpenHarmony system comprises: A socket is created by the Everest_service subsystem in the OpenHarmony system, wherein the Everestd subsystem in the Android system creates a client socket and uses the client socket to establish a connection with the socket, and after the connection is established, the first Android compatible subsystem sends the notification message to the Everestd subsystem; The Everest_service subsystem is used to receive a preset encoded notification message through the socket, decode the encoded notification message to obtain the notification message, and send the notification message to the shell application through the second Android-compatible subsystem, wherein the Everestd subsystem encodes the notification message and transmits the encoded notification message to the Everest_service subsystem through the client socket.
8. An Android application notification synchronization device, characterized in that: The Android application notification synchronization device comprises: an Android application notification synchronization system as described in claims 1 to 3, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the Android application notification synchronization method as described in any one of claims 4 to 7.
9. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the Android application notification synchronization method as described in any one of claims 4 to 7.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the Android application notification synchronization method according to any one of claims 4 to 7 are implemented.
Citation Information
Cited By
Method, device and equipment for debugging cross-system agent of swan gap and storage medium
CN122387827A
Harmony cross-system agent debugging method and device, equipment and storage medium
CN122387827B