Application program multi-window display method and electronic equipment

By running the activity created by the system in the process of third-party applications, the system memory usage and user experience problems caused by multi-window display in the prior art are solved, and the stable and efficient management of multiple display windows is achieved.

CN119690551AActive Publication Date: 2025-03-25HUAWEI TECH CO LTD

Patent Information

Application Number
CN202311256872.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-03-25
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

When the prior art realizes multi-window display of application programs, it leads to an increase in system memory usage, and it is impossible to manage two display windows at the same time, reducing the user experience.

Method used

By running the activity created by the system in the process of a third-party application, avoiding the occupancy of system memory and ensuring that two display windows are run in the same process, thus achieving simultaneous management of multiple display windows.

Benefits of technology

It effectively avoids the system memory usage, improves the user experience, and ensures the stability and efficiency of multi-window display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690551A_ABST
    Figure CN119690551A_ABST
Patent Text Reader

Abstract

The invention provides an application program multi-window display method and electronic equipment, and the method comprises the steps that the electronic equipment receives a first operation of a user, the first operation is used for opening an application, the application supports a parallel vision field mode, the parallel vision field mode comprises a first window and a second window, the first window corresponds to a component started by the application, and the second window corresponds to a component started by the application; the second window corresponds to a component created by a system of the electronic equipment; in response to the first operation, the electronic equipment creates a moving object and starts a component created by the system, and the moving object comprises a process name and a unique identifier of the application; and starting the component created by the system in the process of the application according to the process name and the unique identifier of the application in the moving object. According to the method provided by the invention, the activity corresponding to the first window and the activity corresponding to the second window are ensured to be started in the same application process, so that the electronic equipment is ensured to simultaneously manage the two display windows on the basis of avoiding occupying a system memory, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and more specifically, to a method for displaying multiple windows of an application program and an electronic device. Background Art

[0002] With the continuous development of smart terminals, devices such as smart phones, tablets, and car displays are becoming more and more popular, bringing great convenience to people's life, study, and work. With the development of electronic device screen technology, users' demand for multi-tasking and multi-window processing capabilities of smart terminals is also increasing.

[0003] In order to facilitate users to operate and view electronic devices with display screens, the relevant technologies support in-application split-screen display technology, that is, parallel vision mode. The parallel vision mode can realize dual-window display of application content. Two pages of the application can be displayed separately on the two display windows, for example, the application homepage and content page, or two different content pages, so that users can use one screen for two purposes, thereby improving user experience.

[0004] However, the activities corresponding to the two display windows run in the application process and the system process respectively, which results in the occupation of system memory and the inability to manage the two display windows simultaneously, thereby reducing the user experience. Summary of the invention

[0005] The present application provides a method for displaying multiple windows of an application and an electronic device. The method can run an activity created by the system in the process of a third-party application, thereby ensuring simultaneous management of two display windows while avoiding occupying system memory, thereby improving the user experience.

[0006] In the first aspect, the present application provides a method for displaying multiple windows of an application. The method provided in the first aspect can be executed by an electronic device, or by a module applied in the electronic device (such as a processor, chip, or chip system, etc.), or by a logical node, logical module or software that can realize all or part of the functions of the electronic device. The present application does not limit this.

[0007] Specifically, the method includes: the electronic device receives a first operation from a user, the first operation is used to open an application, the application supports a parallel vision mode, the parallel vision mode includes a first window and a second window, the first window corresponds to a component started by the application, and the second window corresponds to a component created by the system of the electronic device; in response to the first operation, the electronic device creates an activity and starts the component created by the system, the activity object includes the process name and unique identifier of the application; the system-created component is started in the process of the application according to the process name and unique identifier of the application in the activity object.

[0008] The method provided in the first aspect, based on the user's first operation, after opening the parallel vision mode of the application, creates a corresponding active object for the newly added component of the system, and the active object includes the process name and unique identifier of the application. Therefore, based on the process name and unique identifier of the application in the active object, the newly added component of the system is started in the process of the application, ensuring that the components corresponding to the first window and the second window are started in the same application process, thereby avoiding occupying system memory and ensuring that the two display windows can be managed simultaneously, thereby improving the user experience.

[0009] In a possible implementation of the first aspect, before the electronic device creates the active object, the method further includes: the system of the electronic device determines the process name and unique identifier of the application based on the first operation. In this implementation, the system side of the electronic device parses the process name and unique identifier of the application based on the user's operation of opening the application, so that the component created by the system is launched into the process of the application based on the process name and unique identifier.

[0010] In a possible implementation of the first aspect, the process name and unique identifier of the application are stored in the first field of the intent. In this implementation, the intent describes the component to be started and carries some necessary data of the started component, so storing the process name and unique identifier of the application in the first field of the intent can start the component to be started into the corresponding process.

[0011] In a possible implementation of the first aspect, the electronic device creates an activity object, including: the electronic device creates an empty activity object, reads a process name and a unique identifier in a first field of an intent, and saves the process name and the unique identifier in the empty activity object to obtain the activity object. In this implementation, in order to enable a component created by the system to be launched into a corresponding application, the process name and the unique identifier of the application need to be saved in the empty activity object, so that when the activity object is run in a task stack, the activity created by the system is launched into the corresponding application.

[0012] In a possible implementation manner of the first aspect, the first field is an extra field.

[0013] In a possible implementation of the first aspect, a component created by the system is started in the process of the application according to the process name and unique identifier of the application in the active object, including: when the process name and unique identifier of the application in the active object match the process name and unique identifier of the currently running process, the component created by the system is started in the currently running process; when the process name and unique identifier of the application in the active object do not match the process name and unique identifier of all currently running processes, a new process is created according to the process name and unique identifier of the application in the active object, and the component created by the system is started in the new process. In this implementation, it can be determined whether the component created by the system is running in an existing process or a newly created process according to the process name and unique identifier of the application in the active object. It should be understood that both the existing process and the newly created process are processes in the application.

[0014] In a possible implementation of the first aspect, the components created by the system are stored in a jar package of the system that is loaded when the application is started.

[0015] In this implementation, when the components created by the system run in the application process and the application loads the window to be displayed, the components on the window or other functional logic implementations on the components are still on the system side. Therefore, when the components created by the system are saved in the system jar package that will be loaded when the application starts, the application can load these jar packages when it starts, thereby ensuring that the window corresponding to the activity created by the system can be displayed normally.

[0016] Exemplarily, the jar package of the system may be any one of framework.jar, hwEmui.jar, and services.jar. Of course, the jar package of the system loaded when the application starts may also be other jar packages, which is not specifically limited in the embodiments of the present application.

[0017] In a possible implementation of the first aspect, in response to the first operation, the display status of the display component of the first window and the display status of the display component of the second window are consistent. In this implementation, in response to the first operation, the activity created by the system is started in the process of the application, and the first window and the second window correspond to the same process, so that the display status of the drag component of the first window and the drag component of the second window can be consistent.

[0018] In a possible implementation of the first aspect, the drgbar of the first window and the drgbar of the second window are both highlighted, the drag component of the first window includes the drgbar of the first window, and the drag component of the second window includes the drgbar of the second window. In this implementation, the first window and the drgbar and the drgbar of the second window are all highlighted to give the user the same experience.

[0019] In a possible implementation manner of the first aspect, the second window is displayed on the display screen of the electronic device in a full-screen or floating window manner.

[0020] In a possible implementation of the first aspect, when the application is started, the verification of the package name and the unique identifier of the system-created component is skipped. In this implementation, since the system-created component only modifies the process name and the unique identifier, the package name of the component is still the system package name, and therefore the verification of the package name and the unique identifier of the system-created component is skipped, which can ensure that the window corresponding to the system-created component is successfully displayed when the application is started.

[0021] In a possible implementation of the first aspect, the operating system of the electronic device is an Android operating system.

[0022] In a second aspect, a communication device is provided, which includes a unit for executing each step in the above first aspect or any possible implementation manner of the first aspect.

[0023] According to a third aspect, a communication device is provided, comprising at least one processor and a memory, wherein the processor and the memory are coupled, and the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the method in the above first aspect or any possible implementation of the first aspect is executed.

[0024] According to a fourth aspect, a communication device is provided, comprising at least one processor and an interface circuit, wherein the at least one processor is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0025] In a fifth aspect, an electronic device is provided, which includes a processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory, so that the electronic device executes the method in the above first aspect or any possible implementation of the first aspect.

[0026] In a possible implementation of the fifth aspect, the electronic device may be any one of a mobile phone, a tablet, a personal computer or a car computer.

[0027] In a possible implementation of the fifth aspect, the operating system of the electronic device is an Android operating system.

[0028] In a sixth aspect, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0029] In a seventh aspect, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed, it is used to execute the method in the above first aspect or any possible implementation of the first aspect.

[0030] In an eighth aspect, a chip is provided, comprising: a processor for calling and running a computer program from a memory, so that a communication device equipped with the chip executes a method for executing the above first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A schematic diagram of a display style of a parallel horizon display mode is shown;

[0032] Figure 2 Another example of a parallel horizon display mode display style schematic diagram is shown;

[0033] Figure 3 A schematic diagram of the interface when an application is started for the first time is shown;

[0034] Figure 4 A logical diagram of the process of searching for an activity to start in the Android operating system is shown;

[0035] Figure 5 A schematic diagram showing the structure of an electronic device 100 provided in the present application;

[0036] Figure 6 A software structure block diagram of the electronic device 100 according to an embodiment of the present application is shown;

[0037] Figure 7 A schematic diagram of an interface for displaying multiple windows of an application program provided in an embodiment of the present application is shown;

[0038] Figure 8 A schematic flowchart of a multi-window display of an application provided by an embodiment of the present application is shown;

[0039] Fig. 9 Another schematic flowchart of multi-window display of an application provided by an embodiment of the present application is shown;

[0040] Fig.10 A schematic flowchart of another example of multi-window display of an application provided by an embodiment of the present application is shown;

[0041] Fig.11 A schematic flow chart of a method 1100 for displaying multiple application windows provided in an embodiment of the present application is shown;

[0042] Fig.12 A schematic structural diagram of an electronic device provided by the present application is shown. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0044] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one or more (including two); "and / or" describes the association relationship of associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0045] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0046] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0047] With the continuous development of smart terminals, mobile phones, tablets, PCs, and car displays are widely used in home entertainment, office learning and other scenarios, and consumers' demand for multi-task and multi-window processing capabilities of smart terminal devices is gradually increasing. In order to improve the multi-task parallel processing experience, the floating window of the terminal device can now support free size changes. When the user drags the floating window to the horizontal screen window size, it can be displayed in parallel view mode in the floating window.

[0048] The parallel horizon mode is based on the activity (a component) in the application, which can also be called an activity. It expands the display framework and realizes the independent and separate display of the activity, so that each activity of the application can be displayed in different positions on the screen. The parallel horizon mode can be understood as the split-screen function within the application, that is, in the horizontal screen display state, different interface information of an application can be displayed in the left and right windows at the same time, giving full play to the characteristics of the large screen of the tablet. In response to different user needs, the parallel horizon mode can be divided into navigation bar mode, shopping mode and custom mode. Among them, the navigation bar mode means that the left side always keeps the main interface of the application, and the right window displays the new content clicked on the left. The application using this mode is generally an instant messaging application; the shopping mode means that in order to facilitate users to compare products, the screen will always display the latest two windows of the application, the right side is the latest window, and the left side is the second latest window. The application using this mode is generally a shopping application; the custom mode supports developers to customize the window display mode. Developers can use full-screen or split-screen display according to business scenarios. Developers only need to integrate the UIKit development framework and support some video playback applications through configuration.

[0049] It should be understood that the parallel vision mode is different from the split-screen function in the traditional sense. The split screen only displays an additional interface, while the parallel vision mode displays an application interface in split screen.

[0050] For example, Figure 1 A schematic diagram of a display style of a parallel horizon display mode is shown, such as Figure 1 As shown, a floating window 105 of a certain application is displayed on the display screen 102 of the tablet computer 101, and two windows are displayed in the floating window 105, namely, window 103 and window 104. That is, the display content in the window 103 and the display content in the window 104 are from the same application, and the display interface of the same application can be displayed simultaneously in the left and right windows in parallel view mode.

[0051] For example, Figure 2 FIG. 2 shows another example of a display style diagram of a parallel horizon display mode. Figure 2As shown, a floating window 205 of another application is displayed on the display screen 202 of the tablet computer 201, and two windows are displayed in the floating window 205, namely window 203 and window 204. The floating window 205 can be understood as an application task stack, and the window 203 in the floating window 205 corresponds to an activity of an application, and the window 204 corresponds to an activity. The floating window 205 also includes a title bar 206, which is composed of the title bars of window 203 and window 204. The title bar 206 includes a zoom-in and zoom-out button on the left and a close button on the right. A drag button 207 is displayed in the middle of the entire application task stack, and the position of the floating window can be moved by clicking the drag button 207.

[0052] based on Figure 1 and Figure 2 It can be seen from the display interface shown that in order to display multiple windows in parallel view mode in a floating window, at least two activities are required. However, when the application is first started, there is usually only one activity, and the parallel view cannot be entered at this time. Another activity must be started before entering the parallel view. So, from the user's perspective, it is not clear under what circumstances clicking on the content in the application can enter the parallel view. Therefore, the system side of the electronic device can add an empty activity to the application that supports parallel view. When the user starts the application for the first time, the system side starts the empty activity. After there are two activities, the application can directly enter the floating window parallel view state.

[0053] For example, Figure 3 FIG. 1 shows a schematic diagram of an interface when an application is started for the first time. Figure 3 As shown in FIG. 1 (a), a floating window 305 of an application is displayed on the display screen 302 of the tablet computer 301, and the floating window 305 can support free size change. When the application supports the parallel horizon mode, the user can change the size of the floating window 305 by dragging the floating window 305. When the size of the floating window 305 changes to the horizontal screen size, the parallel horizon mode is entered. After entering the parallel horizon mode, as shown in FIG. Figure 3 As shown in FIG. 5( b ), two windows are displayed in the floating window 305 , namely, window 303 and window 304 .

[0054] It can be seen that when an application is first launched, there is usually only one activity, and the user is not clear whether he can enter the parallel view after changing the size of the floating window. Therefore, the system side of the electronic device can add an empty activity to the application, and when the user first launches the application, the system side starts the empty activity, that is, when the user first launches the application, Figure 3As shown in Figure (b) in the figure, the system starts an empty activity to remind the user that the application supports the parallel vision mode.

[0055] Therefore, in order to display multiple windows in a floating window in parallel view mode, in addition to the activity started when the application is first started, the system side of the electronic device also needs to start another empty activity to support the floating window parallel view state of the application.

[0056] The following takes the Android operating system as an example to specifically explain the activity startup process.

[0057] In general, all components in the same application run in the same process. However, if you want to control a specific component to belong to a certain process, you can also configure it in the manifest file. Each component element in the manifest file (for example, activity) supports an "android:process" attribute, through which you can specify the process in which a component runs. That is, by setting this attribute, you can let each component run in its own process, let some components share a process, and let components in different applications run in the same process.

[0058] It should be understood that each application corresponds to a manifest file, which describes the basic information and functions of an application, such as the application name, icon, version number, components, and permissions, etc., and the manifest file includes information to ensure the compatibility, security, and stability of the application with other applications and system components.

[0059] It should also be understood that android:process is generally used to start multiple processes for an application, that is, to set a running process name for the components under the application. Each component defines its own process name by setting its own process attribute. By default, Android creates a process for the application. When the first component of the application runs, all components run under the same process. The name of this process can be the same as the backage (package name) in the manifest file.

[0060] All activities in an application need to be declared in the application's manifest.xml file, which includes the activity tag and the application tag. Therefore, the declaration can be configured by configuring android:process under the activity tag or by configuring android:process in the application tag to specify the startup process of the activity.

[0061] For example, Figure 4 FIG. 1 shows a logic diagram of the process of searching for an activity to start in the Android operating system. Figure 4 As shown, first check whether the process attribute is configured in the activity tag. If the process attribute is configured in the activity tag, processname is the name configured in the activity tag. If this field is not configured in the activity tag, check whether this field is configured in the application tag. If the process attribute is configured in the application tag, processname is the name configured in the application tag. If neither is configured, processName is the package name of the application.

[0062] When the processname is determined, the processname and the unique identifier (UID) are used together to find a match in the current process list. If there is a match, the activity is started in that process to reduce resource usage. If no match is found, a new process is created. The uid is assigned by the system and is generally the uid of the application where the activity is located.

[0063] Similarly, in parallel vision mode, when the system creates an empty activity, the startup process of the activity is as described above. That is, the empty activity can only be declared in the system manifest file. If the process attribute is not specified, the process will run in the corresponding system process instead of the application process. If the process of the empty activity runs in the system process, two problems will arise: first, it will occupy system memory and affect performance and power consumption; second, the floating window double window corresponds to two activities, one from the application's activity, which runs in the application's process, and the other from the system's activity, which runs in the system's process. If the application's activity and the system's activity are not in the same process, it will make cross-process activity communication difficult, and it will be impossible to ensure that the life cycles of the two display windows are managed simultaneously. When the user operates one side of the screen, the content on the other side is easily affected. Ultimately, many synchronization functions cannot be implemented.

[0064] For example, see Figure 2 ,like Figure 2 As shown, if the activity corresponding to window 203 and the activity corresponding to window 204 are not in the same process, then when the user clicks the title bar of the left window, the dragbar of the right window cannot be highlighted, and the dragbars of the left window and the right window cannot be focused or out of focus at the same time, which will make the user confused about the two focus states in the same application, thereby affecting the user's usage experience.

[0065] In summary, since the android:process field in the activity tag and the application tag is a static field, it cannot dynamically adapt to all third-party applications. Therefore, the process of the system-supplemented activity cannot run in the corresponding application. So how to modify the startup process of the system-supplemented activity so that the system-supplemented activity can adapt to any third-party application is a problem that needs to be solved at present.

[0066] In view of this, the present application provides a method for displaying multiple windows of an application, the method comprising: creating an activity object based on a system activity startup request, the system side of the electronic device simultaneously determining the processName and uid of the third-party application that needs to be changed, saving the processName and uid of the third-party application to the created activity object, the electronic device determining whether there is a running process based on the saved processName and uid, and if there is, launching the system activity into the process, and if not, creating a new process. This method can enable multiple windows of an application to run in the process of the application, thereby ensuring that the electronic device manages multiple display windows simultaneously while avoiding occupying system memory.

[0067] Before introducing the method for displaying multiple windows of an application provided by the present application, the electronic device provided by the present application is first specifically described. An embodiment of the present application provides an electronic device, which is used to execute the method for displaying multiple windows of an application provided by the present application. For example, the electronic device in the embodiment of the present application may be a personal computer, various portable notebooks, various tablet computers, mobile phones, car computers, etc. Optionally, the electronic device may also be a personal digital assistant (PDA), a handheld device with a larger display screen, a computing device, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in an evolved public land mobile communication network (public landmobile network, PLMN), etc., and the embodiment of the present application is not limited to this.

[0068] In the electronic devices mentioned above, the electronic device may be a single screen, a folding screen, a curved screen, etc., wherein the folding screen may be a structure with two physical screens or a structure with one physical screen, which is not specifically limited here. For electronic devices that physically have two screens, they may include a main screen and a secondary screen, wherein the main screen may be used as the left window of the electronic device, and the secondary screen may be used as the right window of the electronic device. In the embodiments of the present application, the display method of multiple application windows provided by the present application may also be applied to electronic devices with more than three screens, which is not specifically limited here.

[0069] For example, Figure 5The figure shows a schematic diagram of the structure of an electronic device 100 provided by the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0070] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0071] In the embodiment of the present application, the processor 110 can receive an instruction from a user to open an application. For example, after the user executes the startup operation of the application, the display screen can realize split-screen display, that is, the first window and the second window are displayed horizontally on the display screen. And the processor 110 runs the activity created by the system in the process of the third-party application based on the user's operation, thereby ensuring that the two display windows can be managed at the same time, thereby improving the user experience.

[0072] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0073] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0074] Among them, the memory is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 110. The processor 110 is used to execute the application code stored in the memory to control the electronic device 100 to implement the application multi-window display method provided in the embodiment of the present application.

[0075] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0076] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0077] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0078] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0079] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0080] The display screen 194 is used to display images, videos, 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0081] In an embodiment of the present application, the display screen 194 can be used to display a floating window, which includes multiple windows, namely a window corresponding to an activity started by an application and a window corresponding to an activity created by the system.

[0082] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0084] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0085] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0086] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0087] For example, in the embodiment of the present application, the user's operation of opening the application can be obtained through the touch sensor 180K. After receiving the user's operation of opening the application, the processor 110 starts the activity created by the system in the process of the third-party application in response to the operation.

[0088] The buttons 190 include a power button, a volume button, etc. The motor 191 can generate a vibration prompt. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect a SIM card. It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0089] Figure 6 The software structure block diagram of the electronic device 100 of the embodiment of the present application is shown. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, respectively, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer.

[0090] like Figure 6 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0091] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 6 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, a layout manager, and an activity manager, etc.

[0092] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0093] Content providers are used to store and retrieve data and make it accessible to applications.

[0094] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. The display interface can be composed of one or more views.

[0095] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0096] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0097] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0098] The layout manager is used to arrange the views composed of components in sequence according to the layout requirements to form a display interface.

[0099] The activity manager is used to manage the life cycle of each application and the navigation fallback function. It is responsible for creating the Android main thread and maintaining the life cycle of each application.

[0100] Exemplarily, in the embodiment of the present application, the activity manager is used to start the activity created by the system, and create an activityrecord (activity object) according to the requested parameters, and save the processname (process name) and uid (unique identifier) ​​parsed by the system side to the activityrecord; then initialize the startup parameters; the activity manager is also used to find the corresponding startup stack in the activity stack manager based on the processname and uid. Then, the activity stack manager in the activity manager searches for a match in the current process list according to the processname and uid saved in the activityrecord. If there is a match, the activity created by the system is started into the process; otherwise, a new process is created according to the processname and uid, and then the activity created by the system is started in the new process.

[0101] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0102] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0103] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0104] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0105] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0106] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0107] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing, etc.

[0108] A 2D graphics engine is a drawing engine for 2D drawings.

[0109] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0110] The following is an illustrative description of the software and hardware workflow of the electronic device 100 in conjunction with the parallel vision scenario.

[0111] When the touch sensor 180K receives a touch operation, the corresponding hardware triggers the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the controls corresponding to the input events. For example, if the touch operation is a single-finger touch and click operation, and the control corresponding to the click operation is a split-screen control, when the touch event is determined to be an application that opens the parallel vision mode based on the user's touch operation, the split-screen application calls the interface of the application framework layer to start the split-screen application, and then starts the display driver by calling the kernel layer, and realizes the presentation of the parallel vision mode through the display driver, that is, the split-screen display of the display screen.

[0112] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0113] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 5 and Figure 6 Taking the electronic device with the structure shown as an example, the method for displaying multiple windows of an application provided in an embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.

[0114] Before introducing the method for displaying multiple windows of an application provided by the present application, the application scenarios to which the method is applicable are first described.

[0115] For example, Figure 7 FIG. 1 shows a schematic diagram of an interface of a multi-window display of an application provided in an embodiment of the present application. Figure 7 As shown in FIG. 7 (a), multiple applications are displayed on the display screen 702 of the tablet computer 701. When the user clicks on the chat application 703, the chat application 703 responds to the user's opening operation to start the application's activity, and the electronic device's system starts an empty activity. Figure 7 The interface (a) shown switches to Figure 7 The (b) interface shown is as follows: Figure 7 As shown in the interface (b), a floating window 704 corresponding to the Changchat application 703 is displayed on the display screen 702. The floating window 704 includes a display window 705 and a display window 706. The display window 705 corresponds to the activity started by the Changchat application and displays the main interface of the Changchat application. The display window 706 corresponds to the activity started by the system and displays the application icon of the Changchat application, indicating that the Changchat application supports the parallel horizon mode. Figure 7 When you click on the dialog box with Xiao Wang in the interface shown in Figure (b) of the figure, the display interface of the tablet computer changes from Figure 7 The (b) interface shown switches to Figure 7 The (c) interface shown is as follows: Figure 7 As shown in FIG. (c), the left display window 705 always maintains the main interface of the application, and the right display window 706 displays the new content clicked on the left, that is, the right display window is switched from the display window 706 to the display window 708. Figure 7 Figure (b) and Figure 7It can also be seen from Figure (c) that after entering the floating window parallel field of view, both sides of the dragbar control 707 above the display interface are highlighted, indicating that display window 705 and display window 706 are in the same process, or display window 705 and display window 708 are in the same process and are in the focused state at the same time, giving the user a unified experience, thereby improving the user experience.

[0116] It should be understood that the systems of the electronic devices mentioned in the embodiments of the present application may include but are not limited to Harmony, Symbian, apple blackberries For example, a function related to creating an activity can be started through an interface created by the system of the electronic device. For example, an activity can be created through an interface created by the system of the electronic device. For another example, the processname and uid of the activity can be determined through an interface created by the system of the electronic device. The interface created by the system can be a parallel horizon service interface.

[0117] It should be noted that Figure 7 The example is illustrated with the navigation bar mode in the parallel horizon mode, but it does not constitute a limitation on the use scenario of the application multi-window display method provided by this application. The application multi-window display method provided by this application is also applicable to other modes of the parallel horizon mode, such as the shopping mode and the custom mode, etc., which will not be given any more examples here.

[0118] It should also be noted that in the above examples, the display mode of the electronic device is a split-screen display when the electronic device is in a horizontal state. In other embodiments of the present application, it may also be a split-screen display in a vertical state. The embodiments of the present application do not specifically limit the display state of the electronic device.

[0119] Combine the following Figure 8 Yes Figure 7 In the illustrated scenario, how the display window 705 and the display window 706 are located in the same application process is specifically described.

[0120] Figure 8 A schematic flow chart of a multi-window display of an application provided by an embodiment of the present application is shown, Figure 8As shown, when the user clicks on the icon of the application, the electronic device responds to the opening operation of the application, and the activity management service of the electronic device sends a request to start the activity to the activitystarter (activity startup class). After receiving the request to start the activity, the activitystarter creates a corresponding activityrecord according to the parameters of the request. It should be understood that one activityrecord corresponds to one activity, and one activityrecord stores all the information of the activity. The activity manager can also be called an activity management service.

[0121] It should be understood that activitystarter is a new class in the Android operating system, which is mainly responsible for starting the activity. Among them, activitystarter is mainly responsible for processing activity start requests, including parsing Intent, selecting the appropriate activity, handling permissions, etc.; processing various parameters when the activity is started, such as flags, options and lauchBounds; managing the state of the activity when it is started, such as waiting to start, starting, started, etc.; monitoring the state changes when the activity is started, such as successful start, failed start, canceled, etc. In short, the role of activitystarter is to make the activity startup process more flexible, controllable and scalable.

[0122] The system side of the electronic device parses the application configuration and determines the processname and uid of the activity added by the system. Figure 7 In the example shown, the processName and uid of the activity added by the system can be the processName and uid of the chat application. The activitystarter saves the determined processname and uid in the activityrecord, and then the activitystarter searches for the corresponding startup stack in the activity stack manager. The activity stack manager searches multiple process lists based on the processname and uid to see if there is a match with the processName and uid. If there is, the activity is started into the process, and if not, a new process is started. For example, when the list of processes running in the activity stack manager includes the processname and uid of the chat application, the activity is directly started into the process. If not, a new process is created based on the processname and uid, and then the activity created by the system is started into the newly created process.

[0123] It should be understood that the activity stack manager is used to manage task stacks, and a task stack consists of one or more activity records. Therefore, the activity stack manager includes multiple running task stacks. In order to reduce resource usage, when starting an activity process, the activity starter can first search in the activity stack manager to see if there is a matching process running. If so, the activity process is started into the process, and if not, a new process is started.

[0124] In some embodiments, Fig. 9 Another schematic flow chart of a multi-window display of an application provided by an embodiment of the present application is shown. Fig. 9 As shown, the system side of the electronic device starts the activity supplemented by the system side through the parallel vision service interface. After determining the processname and uid, the processname and uid of the application can be saved in the extra field of the Intent. When the system side of the electronic device goes to the activitystarter to create an activityrecord after a series of calls, it reads the value saved in the extra field of the Intent, and then saves the read processname and uid to the newly created activityrecord of the activity management service. The activity management service uses the new processname and uid when selecting the startup process. The client (client of the application) starts the activity by calling handleLaunchActivity. After waking up the activity by calling performLaunchActivity, the verification of the activity package name and uid can be skipped to successfully display the display window corresponding to the activity.

[0125] For example, Figure 7 As shown, when the system determines that the processname and uid are the processname and uid of the Changchat application, the processname and uid of the Changchat application are saved in the extra field of the Intent. When the activitystarter creates the activityrecord, the processname and uid of the Changchat application saved in the extra field of the Intent are read. Then, the activity management service starts the process based on the processname and uid of the Changchat application when selecting the start process.

[0126] It should be understood that the system side of the electronic device passes the Intent to the activity starter, and the activity starter can start a new activity instance after receiving the intent. The Intent describes the activity to be started and carries the necessary data.

[0127] It should be noted that when the system-supplemented activity runs in a third-party application, the display interface of the third-party application needs to load the interface corresponding to the activity, but the functional implementation codes of various components in the activity are all on the system side. Therefore, in the embodiment of the present application, the system-supplemented activity should be placed in the system jar package that will be loaded when the application is started, otherwise the activity cannot be found, and a classNotFound prompt will be displayed, which will eventually cause the interface corresponding to the activity to fail to display normally. The system jar that the application will load when it starts can be framework.jar, hwEmui.jar, etc.

[0128] For example, in Figure 7 In the example shown, when the activity supplemented by the system is running in the Changchat application, the Changchat application needs to load the interface corresponding to the activity (i.e., the interface shown in the display window 708), but the function implementation codes of each component in the display window 708 are all on the system side. The Changchat application will load the system jar package when it starts, so the activity supplemented by the system can be placed in the system jar package that will be loaded when the Changchat application starts, and the function implementation code on the system side can be successfully called to run on the Changchat application side.

[0129] It should also be noted that based on Figure 8 and Fig. 9 As shown in the implementation flow chart, in order to allow the system-supplemented activity to run in the application process, the processname and uid of the system-supplemented activity are changed to the processname and uid of the application. However, the package name of the system-supplemented activity is still the system package name, and an exception may occur when the application performs verification. In order to solve this problem, a special verification method can be added to the client of the application, that is, the system-supplemented activity can meet the security verification, or the verification of the package name and uid of the system-supplemented activity can be skipped to meet the security verification.

[0130] Fig.10 FIG. 4 shows another schematic flow chart of a multi-window display of an application program provided by an embodiment of the present application, such as Fig.10As shown, when the user clicks on the application, the activity management service (ATMS) starts the activity as a user. ATMS sends the getActivitystartController instruction to the activity start class. Activitystarter executes the request according to the instruction and creates an activity object. Then activitystarter executes the internal startup activity and initializes the startup parameters. Activitystarter saves the processname and uid parsed by the system side to the created activity object. Activitystarter sends the startAcitivityLocked instruction to Task and sends the ResumeFocusedTasksTopActivities instruction to RootWindowContainer. RootWindowContainer sends the resumeTopActivityInnerLocked instruction to Task. After Task sends the startSpecificActivity instruction to the activity stack manager, the activity stack manager obtains the process controller and locks the started service according to the processname and uid of the application.

[0131] The following will be combined Figure 7 The scene diagram illustrates the method for displaying multiple windows of an application provided in an embodiment of the present application. Fig.11 FIG. 1 is a schematic flow chart of a method 1100 for displaying multiple application windows provided in an embodiment of the present application. Fig.11 As shown, Fig.11 The method 1100 shown in FIG. 1 may include steps S1110 to S1130. Fig.11 Each step in method 1100 is described in detail.

[0132] It should be understood that in the embodiment of the present application, the electronic device is taken as an example to illustrate the method 1100. As an example but not a limitation, the execution subject of the method 1100 may also be a chip used in the electronic device.

[0133] S1110. Receive a first operation from the user, where the first operation is used to open an application. The application supports a parallel view mode. The parallel view mode includes a first window and a second window. The first window corresponds to an activity started by the application, and the second window corresponds to an activity created by the system of the electronic device.

[0134] It should be noted that the application involved in the embodiments of the present application refers to application software; the application can be a system application or a third-party application running on the terminal; for example, the first application can be an application software that comes with the system, or it can be an application software (social application, shopping application, etc.) downloaded and installed by the user, and this application does not limit this.

[0135] It should also be noted that the applications involved in this application can be World Wide Web (Web) applications or native applications. Among them, Web applications refer to web applications running in a browser. Native applications refer to applications that can run directly on the current operating system. Web applications include but are not limited to ticket purchase applications, message boards and forums running in browsers; native applications include but are not limited to music applications, shopping applications, graphic editing applications and sports applications.

[0136] In step S1110 , the first operation of the user may be an operation of opening an application, and the application supports the parallel view mode.

[0137] For example, please refer to Figure 7 , the first operation received by the electronic device is the operation of the user opening the Changchat application. The Changchat application supports the parallel horizon mode. Therefore, when the user starts the Changchat application for the first time, the application includes a first window (display window 705) and a second window (display window 706). And the display window 705 corresponds to the activity started by the Changchat application, and the display window 706 corresponds to the activity created by the system. In the embodiment of the present application, it is desired to start the activity corresponding to the display window 706 into the process started by the Changchat application.

[0138] S1120: In response to the first operation, the electronic device creates an activity object and starts an activity created by the system, wherein the activity object includes the processname and uid of the application.

[0139] In the embodiment of the present application, since the activity corresponding to the second window is created by the system, when the activity created by the system is started, an activityrecord corresponding to the activity is created. In order to enable the activity created by the system to run in the corresponding application, the activity object includes the processname and uid of the application.

[0140] For example, Figure 7As shown in FIG. 7( b), after the electronic device responds to the first operation, it creates an activity record, which is used to start the activity created by the system (the activity corresponding to the display window 706). In order to enable the activity corresponding to the display window 706 to be started in the process of the chat application, the created activity record should include the process name and uid of the chat application.

[0141] S1130. Start the activity created by the system in the process of the application according to the processname and uid of the application in the activity object.

[0142] In step S1030, since the activity object includes the processname and uid of the application, during the process of starting the activity, the activity stack management server can start the activity created by the system in the process of the application based on the processname and uid.

[0143] For example, Figure 7 As shown in FIG. 7( b ), the activityrecord used to start the activity created by the system includes the processname and uid of the chat application. Therefore, the activity corresponding to the display window 706 can be started in the chat application.

[0144] The application provides a method for displaying multiple windows of an application. Based on the user's first operation, after turning on the parallel view mode of the application, a corresponding activity object is created for the system's newly added activity. The activity object includes the processname and uid of the application. Therefore, based on the processname and uid of the application in the activity object, the system's newly added activity is started in the application's process, ensuring that the activities corresponding to the first window and the second window are started in the same process, thereby ensuring that the two display windows can be managed simultaneously, thereby improving the user experience.

[0145] In some possible implementations, before the electronic device creates the activity object, the method further includes: the system of the electronic device determines the processname and uid of the application based on the first operation. In this implementation, the system of the electronic device parses the processname and uid of the application based on the user's operation of opening the application, so that the activity created by the system is started in the process of the application based on the processname and uid.

[0146] In some possible implementations, the processname and uid of the application are stored in the first field of the intent. In this implementation, the intent describes the activity to be started and carries some necessary data of the started activity. Therefore, storing the process name and unique identifier of the application in the first field of the intent can start the component to be started into the corresponding process. Exemplarily, the first field can be an extra field.

[0147] In some possible implementations, the electronic device creates an activity object, including: the electronic device creates an empty activity object, reads the processname and uid in the first field of the intent, and saves the processname and uid in the empty activity object to obtain the activity object.

[0148] In this implementation, in order to enable the system-created activity to be launched into the corresponding application, the processname and uid of the application need to be saved in an empty activity object so that when the activity object is run in the task stack, the system-created activity can be launched into the corresponding application.

[0149] In some possible implementations, the activity created by the system is started in the process of the application according to the processname and uid of the application in the activity object, including: when the processname and uid of the application in the activity object match the processname and uid of the currently running process, the activity created by the system is started in the currently running process; when the processname and uid of the application in the activity object do not match the processname and uid of all currently running processes, a new process is created according to the processname and uid of the application in the activity object, and the activity created by the system is started in the new process.

[0150] In this implementation, the processname and uid of the application in the activity object can be used to determine whether the activity created by the system runs in an existing process or a newly created process. It should be understood that both the existing process and the newly created process are processes in the application.

[0151] In some possible implementations, the activity created by the system is saved in the system jar package that is loaded when the application starts. In this implementation, when the activity created by the system runs in the application process and the application loads the window to be displayed, the components on the window or other functional logic implementations on the activity are still on the system side. Therefore, when the activity created by the system is saved in the system jar package that is loaded when the application starts, the application can load these jar packages when it starts, thereby ensuring that the window corresponding to the activity created by the system can be displayed normally.

[0152] Exemplarily, the jar package of the system may be any one of framework.jar, hwEmui.jar, and services.jar. Of course, the jar package of the system loaded when the application starts may also be other jar packages, which is not specifically limited in the embodiments of the present application.

[0153] For example, Figure 7 As shown in Figure (c), after the display window 708 runs in the Changchat application process, the Changchat application needs to load the components corresponding to the display window 708, but the components on the window or other functional logic implementations on the display window 708 are still on the system side. Therefore, when the activity created by the system is saved in the system jar package that will be loaded when the Changchat application is started, the Changchat application can load these jar packages when it is started, thereby ensuring that the display window 708 can be displayed normally.

[0154] In some possible implementations, in response to the first operation, the display states of the drag component of the first window and the drag component of the second window are consistent. In this implementation, in response to the first operation, the activity created by the system is started in the process of the application, and the first window and the second window correspond to the same process, so that the display states of the drag component of the first window and the drag component of the second window can be consistent.

[0155] For example, the drag component of the first window and the drag component of the second window are both drgbar, and the consistent display states can be understood as both are highlighted or both are grayed out.

[0156] For example, relative to Figure 1 , Figure 2 as well as Figure 3 In Figure (b), Figure 7 Figure (b) and Figure 7 The display states of the drag components 707 shown in FIG. 7 (c) are consistent (ie, all are highlighted), thereby improving the user experience.

[0157] In some possible implementations, the second window is displayed on the display screen of the electronic device in full screen or floating window mode.

[0158] For example, Figure 7 Figure (b) or Figure 7 As shown in FIG. 7( c ), the display window 706 and the display window 708 may be displayed on the display screen 702 of the tablet computer 701 in a full screen or floating window manner.

[0159] In some possible implementations, when the application is started, the verification of the package name and unique identifier of the system-created component is skipped. In this implementation, since the system-created component only modifies the process name and unique identifier, the package name of the component is still the system package name, so skipping the verification of the package name and unique identifier of the system-created component can ensure that the window corresponding to the system-created component is successfully displayed when the application is started.

[0160] In some possible implementations, the operating system of the electronic device is an Android operating system.

[0161] The above describes in detail an example of a method for displaying multiple windows of an application provided by the present application. It is understandable that, in order to implement the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0162] The present application can divide the drag method of the cross-system target object into functional units according to the above method example. For example, each function can be divided into each functional unit, or two or more functions can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0163] Fig.12 A schematic structural diagram of an electronic device provided by the present application is shown. Fig.12The dotted line in the figure indicates that the unit or the module is optional. The electronic device 1200 can be used to implement the method described in the above method embodiment. The electronic device 1200 can be a terminal device or a server, or a module (such as a processor, a chip, or a chip system, etc.) applied to a terminal device or a server, or a logical node, a logical module, or software that can implement all or part of the terminal functions, or a logical node, a logical module, or software that can implement all or part of the server functions.

[0164] The electronic device 1200 includes one or more processors 1201, and the one or more processors 1201 can support the electronic device 1200 to implement Fig.11 The method in the corresponding method embodiment. The processor 1201 can be a general-purpose processor or a special-purpose processor. For example, the processor 1201 can be a central processing unit (CPU). The CPU can be used to control the electronic device 1200, execute software programs, and process data of software programs. The electronic device 1200 can also include a communication unit 1205 to implement signal input (reception) and output (transmission).

[0165] The electronic device 1200 may be a chip (system) including a memory and a processor, wherein the processor is configured to execute a computer program stored in the memory to implement the methods shown in the above embodiments.

[0166] The communication unit 1205 may be an input and / or output circuit of the chip (system), or the communication unit 1205 may be a communication interface of the chip (system), and the chip (system) may be a component of the electronic device 1200 .

[0167] For another example, the communication unit 1205 may be a transceiver of the electronic device 1200 , or the communication unit 1105 may be a transceiver circuit of the electronic device 1200 .

[0168] The electronic device 1200 may include one or more memories 1202, on which a program 1204 is stored. The program 1204 can be executed by the processor 1201 to generate instructions 1203, so that the processor 1201 performs the method described in the above method embodiment according to the instructions 1203. Optionally, data may also be stored in the memory 1202. Optionally, the processor 1201 may also read the data stored in the memory 1202, and the data may be stored at the same storage address as the program 1204, or the data may be stored at a different storage address from the program 1204.

[0169] The processor 1201 and the memory 1202 may be provided separately or integrated together, for example, integrated on a system on chip (System On Chip, SOC) of the electronic device.

[0170] The specific manner in which the processor 1201 executes the method for displaying multiple windows of an application program may refer to the relevant description in the method embodiment.

[0171] It should be understood that each step of the above method embodiment can be completed by a hardware-based logic circuit or a software-based instruction in the processor 1201. The processor 1201 can be a CPU, a digital signal processor (DSP), a field programmable gate array (FPGA), or other programmable logic devices, such as discrete gates, transistor logic devices, or discrete hardware components.

[0172] The present application also provides a computer program product, which, when executed by the processor 1201, implements the method of any method embodiment in the present application.

[0173] The computer program product may be stored in the memory 1202 , for example, a program 1204 , which is converted into an executable target file that can be executed by the processor 1201 after preprocessing, compiling, assembling, and linking.

[0174] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a computer, the method of any method embodiment of the present application is implemented. The computer program can be a high-level language program or an executable target program.

[0175] The computer-readable storage medium is, for example, a memory 1202. The memory 1202 may be a volatile memory or a non-volatile memory, or the memory 1202 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SynchLink DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DRRAM).

[0176] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described devices and equipment and the technical effects produced can refer to the corresponding processes and technical effects in the aforementioned method embodiments, and will not be repeated here.

[0177] In several embodiments provided in the present application, the disclosed systems, devices and methods can be implemented in other ways. For example, some features of the method embodiments described above can be ignored or not executed. The device embodiments described above are merely schematic, and the splitting of the units is only a logical function splitting. There may be other splitting methods in actual implementation, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the units or the coupling between the components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

[0178] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

[0179] Finally, the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for displaying multiple windows of an application, characterized in that: The method is applied to an electronic device, and the method comprises: Receive a first operation of a user, where the first operation is used to open an application, where the application supports a parallel horizon mode, where the parallel horizon mode includes a first window and a second window, where the first window corresponds to a component started by the application, and the second window corresponds to a component created by a system of the electronic device; In response to the first operation, the electronic device creates an activity object and starts the component created by the system, wherein the activity object includes the process name and unique identifier of the application; The component created by the system is started in the process of the application according to the process name and the unique identifier of the application in the activity object.

2. The method according to claim 1, characterized in that Before the electronic device creates an active object, the method further includes: The system of the electronic device determines a process name and a unique identifier of the application based on the first operation.

3. The method according to claim 2, characterized in that The process name and unique identifier of the application are stored in the first field of the intent.

4. The method according to claim 3, characterized in that The electronic device creates an active object, including: The electronic device creates an empty active object, reads the process name and the unique identifier in the first field, and stores the process name and the unique identifier in the empty active object to obtain the active object.

5. The method according to claim 3 or 4, characterized in that: The first field includes an extra field.

6. The method according to any one of claims 1 to 5, characterized in that The starting the component created by the system in the process of the application according to the process name and the unique identifier of the application in the active object comprises: When the process name and unique identifier of the application in the active object match the process name and unique identifier of the currently running process, starting the component created by the system in the currently running process; When the process name and unique identifier of the application in the active object do not match the process name and unique identifier of the currently running process, a new process is created according to the process name and unique identifier of the application in the active object, and the component created by the system is started in the new process.

7. The method according to any one of claims 1 to 6, characterized in that The activity created by the system is saved in the system jar package that is loaded when the application is started.

8. The method according to any one of claims 1 to 7, characterized in that In response to the first operation, the display states of the drag component of the first window and the drag component of the second window are consistent.

9. The method according to any one of claims 1 to 8, characterized in that The drgbar of the first window and the drgbar of the second window are both highlighted, the drag component of the first window includes the drgbar of the first window, and the drag component of the second window includes the drgbar of the second window.

10. The method according to any one of claims 1 to 9, characterized in that The second window is displayed on the display screen of the electronic device in a full-screen or floating window manner.

11. The method according to any one of claims 1 to 10, characterized in that When the application is started, the verification of the package name and unique identifier of the component created by the system is skipped.

12. The method according to any one of claims 1 to 11, characterized in that The operating system of the electronic device is an Android operating system.

13. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the method according to any one of claims 1 to 12 when calling the computer program.

14. The electronic device according to claim 13, characterized in that: The electronic device is any one of a mobile phone, a tablet, a personal computer or a car computer.

15. The electronic device according to claim 13 or 14, characterized in that: The operating system of the electronic device is an Android operating system.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

17. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Multi-window display method and device

    CN105760038A

  • Application starting method and device and electronic equipment

    CN114327666A

  • Application display method and electronic equipment

    CN114397979A

Cited By

  • Multi-window display method for application program, and electronic device

    EP4708042A1

  • Multi-window display method for application program, and electronic device

    WO2025066466A1