Method and electronic device for migrating display elements across applications
By migrating display elements across applications, users can freely assemble the display components of the application, solving the problem that users cannot participate in the orchestration of functional modules, improving the user experience and reducing the difficulty of development.
Patent Information
- Application Number
- CN202011380975.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2040-11-30
AI Technical Summary
In existing technologies, the functional modules and page navigation logic of an application are completely determined during development, and users cannot participate in personalized orchestration, thus failing to meet personalized needs.
By migrating display elements across applications, users can move display elements from one application to the interface of another application, enabling free assembly of components across applications.
It meets users' personalized needs, improves user experience, and reduces development difficulty and workload.
Smart Images

Figure CN114579020B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of operating systems, and in particular to a method for migrating display elements across applications and an electronic device. BACKGROUND
[0002] In the field of terminals, application developers independently develop and compile each application program, generate an installation package for each application program independently, and publish on an application market. When a terminal downloads an installation package for a required application program from the application market, the installation package is decompressed and installed. The terminal runs each application program in an independent process, thereby ensuring stable operation of each application program.
[0003] However, this application program mechanism of independent compilation and independent running also causes the functional modules and page jump logic of each application program to be completely determined during development, and the user cannot participate in the arrangement of the functional modules in the application program, which cannot meet the personalized needs of the user for the application program. SUMMARY
[0004] The method for migrating display elements across applications and the electronic device provided by the present application can enable the user to realize the function of migrating display components across applications, thereby meeting the personalized needs of the user for the application program.
[0005] To achieve the above object, the embodiments of the present application provide the following technical solutions:
[0006] In a first aspect, a method for migrating display elements across applications is provided. The method includes: displaying, by an electronic device, a first interface of a first application and a second interface of a second application, the first interface including a target display element; receiving, by the electronic device, a first operation directed to the target display element; and in response to receiving the first operation, displaying, by the electronic device, a third interface of the first application and a fourth interface of the second application, wherein the target display element is not included in the third interface and the target display element is included in the fourth interface.
[0007] Therefore, the user can perform the first operation to migrate the target display element in the first interface of the first application to the second interface of the second application. That is, the effect of migrating the display element across applications is achieved. In other words, the user can freely assemble the display components in the application program when running the application program to meet the personalized needs of the user. For example, the user can combine the application functions frequently used by the user into an application program. In this way, after the user starts the application program, the use needs of the user for the application functions most of the time can be met. For another example, in an application program containing multiple application functions, the user can switch part of the application functions to a version liked by the user, such as switching a music player to a version developed by a manufacturer liked by the user. In this way, the user experience of the user using the application program is improved.
[0008] In addition, the method of the present application is also beneficial to the application developers to focus on the development of independent single application functions, greatly reducing the development difficulty of the developers and reducing the development workload.
[0009] In a possible implementation manner, the electronic device displays the first interface of the first application and the second interface of the second application, including: the electronic device starts a first application component and a target display component, and starts a second application component; wherein the first application component includes an entry executable program and a configuration file of the first application, the configuration file of the first application component contains the identifier of the target display element; the first application component does not contain the page program package of the target display element; the target display component includes the page program package of the target display element; the second application component includes an entry executable program and a configuration file of the second application, the configuration file of the second application component does not contain the identifier of the target display element, and the second application component does not contain the page program package of the target display element.
[0010] The entry executable program is the program code started first when the application program is started, for example, the program code guided by the main function. The configuration file includes the package name (that is, the package name of the application component), the version number, the application icon and other information of the application program. The configuration file also includes the information of one or more display components corresponding to the home page, that is, the information of the display components corresponding to one or more display elements contained in the home page. The information of the display component includes the package name and the version number of the display component (or the package name and the version number of the display element). In some examples, the configuration file also includes the information of other display components dependent on the home page. The other display components dependent on the home page are, for example, the display components corresponding to the display elements constituting other pages when the home page jumps to the other pages.
[0011] The page package of the target display element (i.e., the target display component) includes a resource file, a code file, and a configuration file. The resource file is an image, audio / video resource, network link, etc. required to display the display element. For example, the resource file is placed in the res directory. The code file is page code that executes display component control logic, for example, placed in the code.so directory. The configuration file includes the package name, version number, and information about other display components on which the display component depends.
[0012] As can be seen from the above, the developer not only independently compiles and packages the files required to start the display component and the entry package to start the application, but also independently compiles and packages the files required by different display components. Thus, the scheme of the present application achieves the goal of componentization of the application, and further enables the display component on one application to be migrated to another application without affecting the display and operation of other display components on each application.
[0013] In a possible implementation, in response to receiving the first operation, the electronic device displays a third interface of the first application and a fourth interface of the second application, and the fourth interface includes the target display element, including: the first application component sends the identifier of the target display element to the second application component; the first application component closes the target display component; and the second application component starts the target display component according to the identifier of the target display element, and displays the target display element.
[0014] The first application component and the second application component are different processes, and can communicate data through IPC. Thus, a specific implementation of migrating a display element is provided.
[0015] In a possible implementation, the first application component sends the identifier of the target display element to the second application component, including: the first application component determines the identifier of the second application component according to the first operation; and the first application component sends the identifier of the target display element to the second application component according to the identifier of the second application component.
[0016] Thus, a specific implementation of the first application component obtaining the identifier of the second application component is provided.
[0017] In a possible implementation, the first operation is an operation of dragging the target display element to move to the second interface of the second application and then leaving the display screen, and the first application component determines the identifier of the second application component according to the first operation, specifically: the first application component determines the identifier of the second application component according to the position when leaving the display screen.
[0018] In a possible implementation, the identifier of the target display element includes the package name and / or version number of the target display element.
[0019] In a possible implementation, the identifier of the second application component includes a process identifier of the first application component.
[0020] In a possible implementation, after the electronic device displays the third interface of the first application and the fourth interface of the second application, the configuration file of the first application component does not include the identifier of the target display element; and the configuration file of the second application component includes the identifier of the target display element.
[0021] In some examples, when the user indicates to migrate the target display element in the first interface of the first application to the second interface of the second application, the first application component modifies the configuration file to delete the identifier of the target display element. The second application component modifies the configuration file to add the identifier of the target display element. In this way, when the first application is subsequently started, the target display element is no longer displayed, and when the second application is subsequently started, the target display element can be displayed. That is, the assembly of the application program function module is implemented.
[0022] In a possible implementation, the first interface of the first application is a home page of the first application, and the method further includes: the electronic device exits the first application; the electronic device receives a second operation of starting the first application; and in response to receiving the second operation, the electronic device displays the home page of the first application, and the home page of the first application does not include the target display element.
[0023] In a possible implementation, the second interface of the second application is a home page of the second application, and the method further includes: the electronic device exits the second application; the electronic device receives a third operation of starting the second application; and in response to receiving the third operation, the electronic device displays the home page of the second application, and the home page of the second application includes the target display element.
[0024] In a possible implementation, the first interface of the first application is an application download list of an application market, and the target display element is an item in the application download list; and in response to receiving the first operation, the electronic device displays the third interface of the first application and the fourth interface of the second application, and the fourth interface includes the target display element, including: the first application component determines the identifier of the second application element according to the first operation; and the first application component requests to download and install an installation package of the target display element according to the identifier of the target display element; the first application component sends the identifier of the target display element to the second application component according to the identifier of the second application component; and the second application component starts a target display component and displays the target display element according to the identifier of the target display element.
[0025] Thus, an example of selecting an undownloaded application component from an application market and assembling a customized application program is provided.
[0026] In a second aspect, an electronic device is provided, and the electronic device includes a processor, a memory, and a touch screen. The memory and the touch screen are coupled to the processor. The memory is configured to store computer program codes. The computer program codes include computer instructions. When the processor executes the computer instructions in the memory, the electronic device performs the method in any of the above aspects and possible implementation manners.
[0027] In a third aspect, an apparatus is provided, and the apparatus is included in an electronic device. The apparatus has functions to implement the behaviors of the electronic device in the method in any of the above aspects and possible implementation manners. The functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above functions. For example, a receiving module or unit, a displaying module or unit, and a processing module or unit.
[0028] In a fourth aspect, a computer-readable storage medium is provided, and the computer-readable storage medium includes computer instructions. When the computer instructions are executed on a terminal, the terminal performs the method in any of the above aspects and possible implementation manners.
[0029] In a fifth aspect, a graphical user interface on an electronic device is provided. The electronic device has a display screen, a camera, a memory, and one or more processors configured to execute one or more computer programs stored in the memory. The graphical user interface includes the graphical user interface displayed when the electronic device performs the method in any of the above aspects and possible implementation manners.
[0030] In a sixth aspect, a computer program product is provided. When the computer program product is executed on a computer, the computer performs the method in any of the above aspects and possible implementation manners.
[0031] In a seventh aspect, a chip system is provided, and the chip system includes a processor. When the processor executes instructions, the processor performs the method in any of the above aspects and possible implementation manners.
[0032] It can be understood that the electronic device, the apparatus, the computer-readable storage medium, and the computer program product, the graphical user interface, and the chip system provided in the above aspects all apply to the corresponding method provided above, and thus the beneficial effects achieved by the above aspects can refer to the beneficial effects of the corresponding method provided above, which will not be described here again. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 A structural schematic diagram of an application installation package provided by an embodiment of the present application;
[0034] Figure 2AA hardware structure schematic diagram of an electronic device provided by an embodiment of the present application;
[0035] Figure 2B A software structure schematic diagram of an electronic device provided by an embodiment of the present application;
[0036] Figure 3A A display interface schematic diagram of an application provided by an embodiment of the present application;
[0037] Figure 3B A component tree structure schematic diagram provided by an embodiment of the present application;
[0038] Figure 3C Another component tree structure schematic diagram provided by an embodiment of the present application;
[0039] Figure 4A A display element migration method flow schematic diagram provided by an embodiment of the present application;
[0040] Figure 4B Display interface schematic diagrams of some electronic devices provided by an embodiment of the present application;
[0041] Figure 4C Display interface schematic diagrams of still some electronic devices provided by an embodiment of the present application;
[0042] Figure 4D Display interface schematic diagrams of still some electronic devices provided by an embodiment of the present application;
[0043] Figure 5A A display interface layout method schematic diagram provided by an embodiment of the present application;
[0044] Figure 5B A display interface quadrant division schematic diagram of an application provided by an embodiment of the present application;
[0045] Figure 5C Another display interface layout method schematic diagram provided by an embodiment of the present application;
[0046] Figure 6 Another display element migration method flow schematic diagram provided by an embodiment of the present application;
[0047] Figure 7 Another display element migration method flow schematic diagram provided by an embodiment of the present application;
[0048] Figure 8A Display interface schematic diagrams of still some electronic devices provided by an embodiment of the present application;
[0049] Figure 8BFig. 2 is a schematic diagram of a display interface of an electronic device according to an embodiment of the present application;
[0050] Figure 9 Fig. 1 is a schematic diagram of a chip system according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] In the description of the embodiments of the present application, unless otherwise stated, " / " means or, for example, A / B can mean A or B; "and / or" herein is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone.
[0052] Hereinafter, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise stated, the meaning of "multiple" is two or more.
[0053] In the embodiments of the present application, the words "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Rather, the use of "exemplary" or "for example" is intended to present relevant concepts in a concrete manner.
[0054] The embodiments of the present application provide a scheme of application componentization, that is, an application includes multiple independent function modules, and each function module is connected through a general interface. In this way, a developer or a user can obtain a customized application by assembling these function modules. For example, a display interface of an application can include multiple display elements. Among them, a display element corresponds to a display component, and each display component can run independently. Among them, the display element is a display unit in the display interface of the application, including a view control, a picture, a video, a text, etc. The display component is a page program package corresponding to the display element, which is a minimum display component class component with an interface.
[0055] For example, as shown in FIG. 1, an application program can include a plurality of display elements, and each display element corresponds to a display component. The display component is a page program package corresponding to the display element, which is a minimum display component class component with an interface. Figure 1As shown, a structure diagram of an application installation package is provided in the embodiment of the present application. Specifically, an application installation package includes an entry program package (which can also be referred to as an application component corresponding to the application) and a page program package including one or more display elements (i.e., display components). It should be noted that the entry program package and the page program package of each display element are independent of each other and are independently compiled and packaged.
[0056] Specifically, the entry program package can include an entry executable program and a configuration file. The entry executable program is a program code that is first started when the application is started, for example, a program code guided by a main function. The configuration file includes information such as a package name (i.e., a package name of the application component), a version number, and an application icon of the application. The configuration file further includes information of one or more display components corresponding to the display elements included in the home page, i.e., information of the display components corresponding to the one or more display elements included in the home page. The information of the display components includes a package name and a version number of the display components (or a package name and a version number of the display elements). In some examples, the configuration file further includes information of other display components relied on by the home page. The other display components relied on by the home page are, for example, display components corresponding to display elements constituting other pages to which the home page jumps.
[0057] The following gives a code example of a configuration file of an application component.
[0058]
[0059] It should be noted that the entry program package only includes information of the required display components and does not include page program packages of the display components.
[0060] The page program package of the display component includes a resource file, a code file, and a configuration file. The resource file is a picture, audio / video resource, network link, etc. required for displaying the display component, for example, the resource file is placed in the res directory. The code file is a page code for executing the control logic of the display component, for example, placed in the code.so directory. The configuration file includes a package name, a version number, and information of other display components relied on by the display component.
[0061] The following gives a code example of a configuration file of a display component.
[0062]
[0063]
[0064] It should be noted that not only are the files required to start the display component and the entry package for starting the application compiled and packaged independently, but the files required for different display components are also compiled and packaged independently. Therefore, the solution of this application achieves the goal of application componentization, thereby enabling the migration of a display component from one application to another without affecting the display and operation of other display components in each application.
[0065] The technical solutions provided in this application can be applied to electronic devices with applications installed. For example, the electronic devices in this application can be mobile phones, tablets, personal computers (PCs), personal digital assistants (PDAs), netbooks, wearable electronic devices (e.g., smart bracelets, smartwatches), augmented reality (AR) devices, virtual reality (VR) devices, in-vehicle devices, smart screens, smart cars, smart speakers, robots, etc. This application does not impose any special limitations on the specific form of the electronic device.
[0066] like Figure 2A The diagram shown is a structural schematic of an electronic device 100 provided in an embodiment of this application.
[0067] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0068] It can be understood that the structural schematic of the embodiments 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 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0069] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0070] The processor 110 can 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 can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. Avoid repeated access and reduce the waiting time of the processor 110, thereby improving the efficiency of the system.
[0071] The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger, or a wired charger. The power management module 141 is used to connect the battery 142, and the charging management module 140 and the processor 110. The power management module 141 receives the input of the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160, etc.
[0072] The wireless communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0073] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. The mobile communication module 150 can provide solutions including 2G / 3G / 4G / 5G wireless communication and the like applied on the electronic device 100.
[0074] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is transmitted to the application processor. The application processor outputs the sound signal through the audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays the image or video through the display screen 194.
[0075] The wireless communication module 160 can provide solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like applied on the electronic device 100.
[0076] In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0077] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0078] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0079] ISP is used to process data feedback from camera 193. Camera 193 is used to capture still images or videos. Digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when electronic device 100 selects frequency points, digital signal processor is used to perform Fourier transform on frequency point energy, etc. Video codec is used for digital video compression or decompression. Electronic device 100 can support one or more video codecs. In this way, electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0080] NPU is a neural-network (NN) calculation processor, which can quickly process input information by learning from the structure of biological neural network, such as learning from the transmission mode between human brain neurons, and can also continuously self-learn. Through NPU, electronic device 100 can realize intelligent cognition and other applications, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0081] 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 electronic device 100. The external memory card communicates with processor 110 through external memory interface 120 to realize data storage function. For example, save music, video and other files in the external memory card.
[0082] Internal memory 121 can be used to store computer executable program codes, which include instructions. Internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during the use of electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc. Processor 110 executes various function applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in a memory disposed in the processor.
[0083] Electronic device 100 can realize audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, and application processor, etc. For example, music playing, recording, etc.
[0084] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for audio signal encoding and decoding. Speaker 170A, also called a "loudspeaker," is used to convert audio electrical signals into sound signals. Electronic device 100 can listen to music or hands-free calls through speaker 170A. Receiver 170B, also called a "handpiece," is used to convert audio electrical signals into sound signals. When electronic device 100 answers a phone call or voice message, the receiver 170B can be brought close to the user's ear to hear the voice. Microphone 170C, also called a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting sound signals into microphone 170C. Headphone jack 170D is used to connect wired headphones.
[0085] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0086] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. Electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.
[0087] Specifically, the software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses a layered architecture as an example to illustrate the software structure of electronic device 100.
[0088] like Figure 2B The diagram shown is a schematic representation of the software structure of an electronic device 100 according to an embodiment of the present invention. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces.
[0089] The top layer of the electronic device 100 may include functional modules that are directly accessible to developers and users, such as application modules, display modules, and service modules.
[0090] The service module includes a plurality of independent service (Service) components (also referred to as services for short), such as service component 1 and service component 2. The service component is a background service application class component without an interface, and the service component exists independently in the form of a process at runtime. There is a special service component, component manager service (CMS), in the service component. The CMS is used to manage the dedicated system service components of all components (including application components, display components, and service components), and is the first service component after the system is started.
[0091] In the service component, there is also an application package management service (PMS) for managing the downloading, installation, upgrading, and uninstallation of installation packages of various components (including display components, application components, and service components). The life cycle of the PMS is also managed by the CMS.
[0092] The application module includes a plurality of application components, such as application component 1 and application component 2. The application component is a foreground application class component that provides an interface for an application program, and the application component exists independently in the form of a process at runtime, and the life cycle is managed by the CMS. In this application, one application program corresponds to one application component, and the configuration file of the application component includes the package name and version number of the display component corresponding to the home page of the application program. The number of display components corresponding to the home page is one or more. In other examples, the application component also includes the package name and version number of the display component relied on by the home page of the application program. The display component relied on by the home page is, for example, the display component corresponding to another page when the home page jumps to the other page.
[0093] The display module includes a plurality of display components, such as display component 1, display component 2, and display component 3. The display component is a minimum display class component with an interface. In some examples, the display component can take the application component as a host, that is, the display component needs to be mounted on the application component. As described above, the configuration file of the application component includes the package name and version number of the display component. When the application component is started, the display component mounted on the application component is also started. When the application component is closed, the display component mounted on the application component is also closed. Generally, the life cycle of the display component is managed by the application component as the host. However, when the display component is in a migration state, the life cycle of the display component can be managed by the CMS, and the CMS modifies the mounting relationship between the display component and the application component to realize the migration function across application programs. In other embodiments, the display component can also run independently without taking the application component as a host.
[0094] For example, the electronic device 100 is a car machine. As shown in FIG. 1, the electronic device 100 includes a service module, an application module, and a display module. Figure 3AThe figure shows an example of the display interface of the homepage application of the car machine. The homepage application includes one application component and three display components. The three display components correspond to three display elements on the homepage respectively: the navigation bar 201, the driving navigation interface 202, and the call interface 203. That is, when the car machine starts the homepage application, the application component is started, and according to the information of the display components in the configuration file of the application component, each display component is started respectively, and the navigation bar 201, the driving navigation interface 202, and the call interface 203 are displayed respectively. That is, the three display components are mounted on the application component.
[0095] It should be noted that some display components may need to be associated with some service components, that is, some display components need to establish communication with some service components. For example, when the car machine displays the driving navigation interface 202, it needs to call the map service component and the audio service component. The map service component is used to provide positioning functions and calculate the route between the current position and the destination. The audio service component is used to play navigation voice. For another example, when the car machine displays the call interface 203, it needs to call the call service component and the audio service component. The call service component is used to provide the call function between the car machine and other terminals. The audio service component is used to play the voice of the user of the other terminal and pick up the voice of the user of the car machine.
[0096] Since the three display elements (the navigation bar 201, the driving navigation interface 202, and the call interface 203) corresponding to the display components are independent modules, the operation performed on any display component will not affect other display components.
[0097] For example, closing the display component of the call interface 203 will not affect the navigation bar 201 and the driving navigation interface 202. Specifically, the system service component CMS of the car machine deletes the mounting relationship between the call interface 203 and the application component, and does not modify the mounting relationship between the navigation bar 201 and the driving navigation interface 202 and the application component. Moreover, the CMS will automatically close the service components (such as the call service component and the audio service component) associated with the call interface 203.
[0098] When any one of the three display components is in the migration state, the mounting relationship between the display component and the application component in the migration state is modified by the system CMS of the car machine. For example, when it is detected that the user drags the application component to another application component (for example, application component A) on the call interface 203, the car machine CMS saves the relevant information of the call interface 203 and passes it to the application component A. The CMS closes the call interface 203 in the application component, and suspends the call service component and the audio service component associated with the call interface 203. Then, the CMS passes the package name and version number and the like of the call interface 203 to the application component A, and restarts the call interface 203 by the application component A, and restores the call service component and the audio service component associated with the call interface 203. That is, the CMS modifies the mounting relationship of the call interface 203 from being mounted on the application component to being mounted on the application component A. That is, the call interface 203 is migrated from the home page application to the application corresponding to the application component A. It should be noted that at the same time, the navigation bar 201 and the driving navigation interface 202 are not affected by the migration of the call interface 203. The specific migration process of the display component will be described in detail below.
[0099] Back to Figure 2B The middle layer of the electronic device 200 can include a user interface kit (UI kit) module, a process (Process) module, an inter-process communication (IPC) module, a database (DataBase) module, and a model-view-presenter design (MVP) module. Among them, the Uikit module is used to provide the basic graphics rendering functions required by the application display. The Process module is used to provide a series of basic functions such as application process, thread, process creation, and destruction. The IPC module is used to provide the function of data and signal exchange between processes. The DataBase is used to provide the function of local persistent data storage. The MVP module is used to provide view display control and data control capabilities within the interface.
[0100] The bottom layer of the electronic device 200 includes an operating system kernel (OS Kernel) module, which is used to provide a bottom layer running environment for the application program framework.
[0101] In order to better understand the technical solutions provided by the embodiments of the present application, first, the management mechanism of the CMS for various components (including application components, display components, and service components) in the embodiments of the present application will be introduced.
[0102] In some embodiments, a CMS can manage all components in an application through a component tree. In other words, all components in the application are reflected in the component tree when performing operations such as mounting, migrating, and unmounting. In other words, the CMS maintains information about each component in the component tree. The information for application components includes the application component's identifier (e.g., package name, version number, application icon, process ID), information about the display components contained within the application component, and the application's display area. The information for service components includes the service component's identifier (e.g., package name, version number, process ID), the package name and version number of the calling application, etc. The information for display components includes the display component's identifier (e.g., package name, version number) and the identifier of the host application component, etc.
[0103] For example, such as Figure 3B The diagram shows an example of a component tree. As you can see, the root of the component tree is the service component CMS, which manages all components. The diagram also shows that the electronic device runs application component 1, application component 2, service component 1, and service component 2. Application component 1 has display component 1 and display component 2 attached to it. Application component 2 has display component 3 attached to it. It's important to note that the CMS can modify the attachment relationships of the display components. For example, as shown... Figure 3C As shown, the display component 2, which was originally mounted on application component 1, is migrated to the location that is mounted on application component 2.
[0104] like Figure 4A The diagram shown is a flowchart illustrating a method for migrating display elements according to an embodiment of this application. The details are as follows:
[0105] S400: The electronic device receives an operation A to open the first application's first interface, thus launching the electronic device's first application component. The first interface contains target display elements.
[0106] S401, The first application component indicates the start of the target display component.
[0107] As described earlier, the application's package includes an entry point package and a page package containing one or more display components. The entry point package may include an entry point executable and a configuration file. The configuration file also includes information about one or more display elements contained in the homepage. Each display element corresponds to a display component. In other words, the configuration file includes information about the display components that need to be started when the homepage is displayed. This display component information includes the identifier of the display element (which can also be considered the identifier of the display component), such as the package name and version number. In some examples, the configuration file also includes information about other display components that the homepage depends on. These other display components might be, for example, the display components corresponding to the display elements that make up other pages when the homepage navigates to them.
[0108] In some examples, the first interface of the first application is a home page of the first application, and the operation A is an operation of starting the first application. The home page of the first application includes the target display element. Then, after receiving the operation A, the electronic device (for example, specifically, the CMS) starts the first application. Specifically, the electronic device first runs an entry program package corresponding to the first application, that is, starts the first application component. Then, according to information of the display element included in the home page of the first application, a page program package of the corresponding display element is executed, which includes a page program package of the target display element, that is, the target display component is started.
[0109] It should be noted that in other examples, the first interface of the first application is another interface of the first application. That is, the first application component has been started before the electronic device receives the operation A, that is, the first application component has been started. The operation A is an operation of jumping from the interface (home page or non-home page) of the first application currently displayed by the electronic device to the first interface. The first interface includes the target display element. Then, after receiving the operation A, the first application component executes a page program package of the corresponding display component according to information of the display component corresponding to the first interface of the first application, which includes a page program package of the target display element, that is, the target display component is started.
[0110] After starting the target display component, the electronic device displays the first interface of the first application, and the first interface of the first application includes the target display element. For example, as shown in (1) of Figure 4B , interface 410 is an example of the first interface of the first application. Interface 410 can include two display elements, such as weather control 411 and music playing control 412.
[0111] S402, the electronic device receives operation B on the first interface of the first application, and operation B is used to indicate migration of the target display element to the second application.
[0112] For example, operation B can be an operation of a user holding the target display element on the first interface of the first application and dragging the target display element to the display interface of the second application. For example, the user can open the second application in advance before performing operation B, as shown in (1) of Figure 4B , interface 400 includes interface 410 (the first interface of the first application) and interface 420 (the first interface of the second application). Taking weather control 411 as the target display element as an example, as shown in (2) of Figure 4B , operation B can be an operation of a user holding weather control 411 and dragging weather control 411 to interface 420. In some examples, during the process of the user's finger dragging weather control 411, weather control 411 moves in position following the dragging of the user's finger on the screen.
[0113] For example, the user can open the second application in advance before performing operation B, such as Figure 4C As shown in (1) of FIG. 4, the interface 400 displayed by the electronic device includes an interface 410 (a first interface of the first application) and an interface 420 (a first interface of the second application). Alternatively, the user can not open the second application in advance before performing operation B, that is, the interface 400 can not include the interface 420. Taking the weather control 411 as a target display element for example.
[0114] If the user performs a specific operation (for example, long press or gravity press, etc.) on the weather control 411, the electronic device displays an option menu 413 as shown in (2) of FIG. 4, prompting the user to select a target application to which the weather control 411 is migrated. In some examples, the option menu 413 can display a list of applications installed in the electronic device. In other examples, the option menu 413 can display a list of applications that are currently opened in the electronic device. The embodiments of the present application do not limit this. Then, the user selects the option of "application 2" (i.e., the second application). Here, operation B specifically includes the specific operation performed on the weather control 411, and the operation of selecting the "application 2" option. Figure 4C
[0115] In a specific implementation, the electronic device (for example, specifically the CMS) sends the received information of operation B (the position of operation B, etc.) to the first application component, so that the first application component obtains the identifier of the second application component corresponding to the second application according to the information of operation B.
[0116] S403, the first application component queries the CMS for the identifier of the second application component according to operation B.
[0117] For example, when operation B is an operation of dragging the target display element, the electronic device monitors the position of the user's finger dragging on the screen. When it is detected that the user's finger leaves the screen (at this time, the user has dragged the target display element to the target application), the position of the finger on the screen before leaving is recorded. The first application component reports the position to the CMS. As described above, the CMS can manage all components of each application program through the component tree. That is, the CMS maintains information of each component of each application program, including the identifier (package name, version number, application icon, etc.) of each component, the display area of the application program, the process information of each component, etc. When the CMS queries that the position of the user's finger before leaving the screen is located in the display area of the second application, it is determined that the target application is the second application. Further, the identifier of the second application component corresponding to the second application (for example, specifically the process ID of the second application component) is returned to the first application component.
[0118] It should be noted that the CMS determines the target application as the top layer application when the user's finger leaves the position in front of the screen and covers the display interfaces of two or more applications.
[0119] It should be further noted that, similar to the first application, the second application includes an entry program package and a page program package of one or more display components. When the second application is started, the second application component and the corresponding display component module need to be started.
[0120] For example, when the operation B is an operation of directly selecting the target application, the first application component can report the identification (such as the package name and the version number) of the selected target application to the CMS, and the CMS queries the identification of the second application component corresponding to the second application and returns the identification to the first application component.
[0121] S404, the first application component requests the target display component to return the state data of the target display component. Correspondingly, the target display component returns the state data of the target display component to the first application component.
[0122] The state data of the target display component includes data of the target display component when the target display component is running. For example, the target display component includes an audio and video player, and the state data of the target display component includes the playing progress of the audio and video file. For another example, the target display component includes a document reader, and the state data of the target display component includes the reading progress of the document. For another example, the target display component includes a user input control, and the state data of the target display component includes the text information that has been input by the user and the selected option information. In this way, when the target display element is migrated to the second application and the target display component is restarted, the target display component can be quickly restored to the state at the time of migration.
[0123] It should be noted that in some other examples, the state data of the target display component can also not be saved, that is, the present step is not performed. Then, when the target display element is migrated to the second application and the target display component is restarted, the target display component is equivalent to being restored to the initial state.
[0124] S405, the first application component sends the identification of the target display element to the second application component.
[0125] In step S403, the first application component has obtained the identification of the second application component, and then can communicate with the second application component through the identification of the second application component. As described above, the first application component starts the target display component according to the identification of the target display element, and therefore the first application component maintains the identification (such as the package name and the version number) of the target display element. Then, the first application component sends the identification of the target display element to the second application component, so that the second application component starts the target display component corresponding to the target display element according to the identification of the target display element.
[0126] S406、the first application component instructs to close the target display component.
[0127] The first application component instructs to close the target display component. Specifically, the first application component receives the life cycle of the target display component, closes the process of the target display component created by the first application component, releases the memory resources occupied by the process, and the like. At this time, the second interface of the first application is displayed on the electronic device, and the target display element is not included in the second interface of the first application. For example, as shown in (3) of FIG. 4, the interface 402 displayed by the electronic device, the interface 410 is an example of the second interface of the first application, and the weather control 411 is not included in the interface 410. Figure 4B
[0128] It should be noted that the first application component closes the target display component started by the first application component before the second application component starts the target display component. For example, in some examples, when the electronic device detects that the user presses and holds the target display element to start dragging, the first application component can modify the display position of the target display element in real time according to the position of the user's finger contacting the display screen during the dragging process. Then, the first application component renders the target display element in real time according to the modified display position of the target display element, so as to realize the position movement of the target display element following the dragging of the user's finger on the screen. When it is detected that the user's finger leaves the display screen, the first application component closes the target display component, that is, the target display element is no longer displayed in the display interface of the first application. Alternatively, the first application component closes the target display component after step S405 is executed. Alternatively, the first application component is informed by the second application component before the second application component determines that it can start the target display component and obtains the identifier of the target display element. At this time, the first application component closes the target display component. The specific timing of closing the first application component is not limited in the embodiments of the present application.
[0129] In some examples, if the second application component successfully starts the target display component, the second application component can inform the first application component that the target display element has been successfully migrated to the second application. At this time, the first application component can close the target display component. Alternatively, the first application component can be informed by the second application component before the second application component determines that it can start the target display component and obtains the identifier of the target display element. At this time, the first application component closes the target display component.
[0130] It should be noted that, in some examples, the migration of the target display element from the first application is a one-time operation. That is, the first application component does not change the program package (e.g., the configuration file in the entry program package) of the first application. In this way, when the electronic device exits the first application and restarts the first interface of the first application, the first interface of the first application still contains the target display element. In other examples, after step S406 is performed, the first application component can save the second interface of the first application by default or according to a user selection (i.e., step S411 in the execution diagram). In one specific implementation, the first application component deletes the information (e.g., the identifier of the target display element) of the target display component from the configuration file in the entry program package. Then, when the electronic device exits the first application and restarts the first interface of the first application, the electronic device displays the second interface of the first application, which does not contain the target display element.
[0131] S407. The second application component starts the target display component according to the identifier of the target display element.
[0132] In one specific implementation, the identifier of the target display element includes the package name and / or the version number of the target display element. In this case, the second application component executes the page program package corresponding to the target display element according to the package name and / or the version number of the target display element, that is, restarts the target display component. At this time, the electronic device displays the second interface of the second application, which contains the target display element.
[0133] S408. The second application component recovers the state of the target display component according to the state data of the target display component.
[0134] If the second application component also receives the state data of the target display component, the second application component can send the state data to the started target display component to recover the state of the target display component before the migration. If the second application component does not receive the state data of the target display component, the second application component does not need to perform this step.
[0135] S409. The second application component re-arranges the display interface.
[0136] In some embodiments, the second application component determines the position of the target display element in the second interface of the second application according to a user-specified position (e.g., the position where the target element leaves the screen after being dragged by the user) or a default position (e.g., a default position at the edge of the display interface of the second application). For example, as shown in FIG. 4B, the second application component determines the position of the target display element in the second interface of the second application according to the position where the target element leaves the screen after being dragged by the user. Figure 5AAs shown, the first interface of the second application before migration is interface 501, which includes 5 display components (the same color block in the figure represents one display component). Therefore, the target display element can be overlaid on a display component (e.g., display component 504) on interface 501, meaning the second interface of the second application is interface 502. Display component 503 is the target display element. In one example, the lifecycle of the newly added display component 503 can be consistent with that of display component 504. Alternatively, the target display element can be overlaid on several display components on interface 502, meaning the second interface of the second application is interface 505. In one example, the lifecycle of display component 503 can be independently controlled by the second application components, meaning the lifecycle of display component 503 is unrelated to the overlaid display components.
[0137] For example, such as Figure 4B As shown in (3), in the interface 402 displayed by the electronic device, interface 420 is an example of the second interface of the second application, and interface 420 includes a weather control 411.
[0138] In other embodiments, the second application component determines the position of the target display element in the second interface of the second application based on the user-specified location and the layout of the first interface in the second application.
[0139] For example, such as Figure 5B As shown, the first interface of the second application can be roughly divided into four quadrants: Quadrant 1, Quadrant 2, Quadrant 3, and Quadrant 4. Then, the layout of the second interface of the second application is adjusted according to the specific quadrant where the user-specified position is located and the width and height relationship of the target display elements.
[0140] like Figure 5C As shown, the first interface of the second application is interface 514. If the width of the target display element is greater than its height, and the user drags the target display element to quadrant 1 or quadrant 2 of interface 514, then the second interface of the second application can be interface 506, where display component 507 is the target display element. It can be seen that the original display components in the first interface of the second application extend downwards. In one example, the second interface of the second application maintains the same display area as the first interface, so the portion exceeding the original display area can be scrolled using a scroll bar. In another example, the display area of the second interface of the second application can be larger than the display area of the first interface. Therefore, the second application components need the CMS to update the display area of the rearranged second interface.
[0141] For example, if the width of the target display element is greater than the height, and the user drags the target display element to quadrant 3 or quadrant 4 of interface 514, the second interface of the second application can be interface 510, in which display component 511 is the target display element. As can be seen, the original display component in the first interface of the second application is expanded upward. In one example, the second interface of the second application maintains the same display area as the first interface, and the portion that exceeds the original display area can be viewed by scrolling through a scroll bar. In another example, the display area of the second interface of the second application can be greater than the display area of the first interface. In this case, the second application component needs to update the display area of the second interface after the re-arrangement by the CMS.
[0142] For example, if the width of the target display element is greater than the height, and the user drags the target display element to quadrant 3 or quadrant 4 of interface 514, the second interface of the second application can be interface 510, in which display component 511 is the target display element. As can be seen, the original display component in the first interface of the second application is expanded upward. In one example, the second interface of the second application maintains the same display area as the first interface, and the portion that exceeds the original display area can be viewed by scrolling through a scroll bar. In another example, the display area of the second interface of the second application can be greater than the display area of the first interface. In this case, the second application component needs to update the display area of the second interface after the re-arrangement by the CMS.
[0143] For example, if the width of the target display element is greater than the height, and the user drags the target display element to quadrant 3 or quadrant 4 of interface 514, the second interface of the second application can be interface 510, in which display component 511 is the target display element. As can be seen, the original display component in the first interface of the second application is expanded upward. In one example, the second interface of the second application maintains the same display area as the first interface, and the portion that exceeds the original display area can be viewed by scrolling through a scroll bar. In another example, the display area of the second interface of the second application can be greater than the display area of the first interface. In this case, the second application component needs to update the display area of the second interface after the re-arrangement by the CMS.
[0144] It should be noted that in some examples, moving the target display element to the second application is a one-time operation. That is, the second application component does not change the second application's package (e.g., the configuration file in the entry package). Thus, when the electronic device exits the second application and restarts the first interface of the second application, the first interface of the second application still does not contain the target display element. In other examples, the second application component may save the second interface of the second application by default or according to the user's choice (i.e., execute step S410 in the diagram). In one specific implementation, the second application component adds the target display element information from the configuration file of the entry package. Then, when the electronic device exits the second application and restarts the first interface of the second application, the electronic device displays the second interface of the first application, which contains the target display element.
[0145] It should also be noted that when the target display element is migrated to the second application, the running state of the first application is independent of the target display element. For example, as Figure 4D As shown in (1), on interface 405, interface 410 (i.e., the second interface of the first application) also includes a close control 413. In response to a user operation to close the control 413, the electronic device displays as shown in Figure (1). Figure 4D Interface 406 is shown in (2). It can be seen that the electronic device has closed interface 410, but the weather control 411 remains unchanged.
[0146] The target display element is related to the running status of the second application. For example, such as... Figure 4D As shown in (1), on interface 405, interface 420 (i.e., the second interface of the second application) also includes a close control 421. In response to a user operation to close the control 421, the electronic device displays as shown in Figure (1). Figure 4D The interface 407 shown in (3) shows that the electronic device has closed interface 420, and the weather control 411 is no longer displayed. It should be noted that interface 410 has not changed.
[0147] As can be seen from the above, this application embodiment achieves the function of migrating display components across applications by decoupling the various display components within the application. This allows users to freely assemble display components within the application when running it, meeting their personalized needs. For example, users can combine frequently used application functions into a single application. Once the user opens this application, it can satisfy their most frequent needs for application functionality. As another example, in an application containing multiple application functions, users can switch some functions to their preferred versions, such as switching a music player to a version developed by their favorite manufacturer. This improves the user experience when using the application.
[0148] Furthermore, the method described in this application also helps application developers focus on developing independent, single application functions, greatly reducing the development difficulty and workload for developers.
[0149] Furthermore, in some embodiments, the configuration list of the first application component can retain information about the target display element, while the configuration list of the second application component can add information about the target display element. When the first application component is launched, it launches the target display element. When the second application component is launched, it launches the target display element. In other words, the first and second application components can share the target display element, thereby achieving resource sharing and capability sharing. In the prior art, if two applications contain the same functional module, this same functional module is equivalent to being downloaded twice, occupying two storage spaces on the electronic device. However, in the embodiments of this application, multiple applications can share a single functional module (i.e., the display component), saving download traffic costs, time costs, and memory space.
[0150] It should also be noted that, in the above embodiments, when operation B is the operation of a user pressing and holding a target display element on an interface of the first application and dragging the target display element to the display interface of the second application, the target display element moves in position as the user drags their finger on the screen.
[0151] In one implementation, as described in the above embodiments, the first application component modifies the display position of the target display element in real time based on the position of the user's finger on the screen. Then, the first application component renders the target display element in real time according to the modified display position, thereby enabling the target display element to move in position as the user's finger is dragged on the screen.
[0152] In another implementation, the first application component can also launch a snapshot display component, which creates a snapshot of the target display element. Then, by moving the snapshot of the target display element, the visual effect of the target display element moving in position as the user drags their finger across the screen is achieved. Compared to rendering the target display element in real time, rendering a snapshot of the target display element reduces rendering time and is more convenient and faster.
[0153] Specifically, such as Figure 6 The diagram shown is a flowchart illustrating another method for migrating a display component according to an embodiment of this application. Specifically, it includes steps S400-S402, S601-S603, S403-S405, S604, and S407-S411.
[0154] In the step S400-step S402, the step S403-step S405, and the step S407-step S411, refer to the description of the related content above, and will not be repeated here.
[0155] S601, the target display component requests the first application component to start the snapshot display component.
[0156] S602, the first application component starts the snapshot display component.
[0157] S603, the first application component closes the target display component.
[0158] When detecting that the user starts to perform the operation B on the first interface of the first application, the target display component can request the first application component to start the snapshot display component, and create a snapshot of the target display element by the snapshot display component. And before starting the snapshot display component, the target display component can be closed. That is, at this time, the electronic device can directly display the snapshot of the target display element. The user can observe that the snapshot of the target display element moves in position with the dragging of the user's finger on the screen, to prompt the user that the operation B is being performed.
[0159] Similarly, after the first application component transmits the identification (and state data) of the target display element to the second application component, that is, after performing the step S405, the first application component can perform the step S604, that is, closing the snapshot display component. That is, at this time, the electronic device no longer displays the snapshot of the target display element.
[0160] In the above embodiment, the target display component is a display component that has been downloaded by the electronic device. In some other embodiments, the target display component can also be a display component that has not been downloaded by the electronic device. Since the application program includes a plurality of independent functional modules, such as the application component and the mutually independent display component. Then, the application component and each display component can be independently downloaded, installed, updated, and uninstalled, etc. Therefore, the migrated target display component can also be an undownloaded display component. For example, the target display component can be a display component displayed in the application list in the application market, and these display components can be display components that have not been downloaded by the electronic device.
[0161] Hereinafter, taking the application market as an example for description. As shown in Figure 7 Fig. 4 is a flow diagram of another method for migrating a display component provided by an embodiment of the present application, and the specific steps are as follows:
[0162] S700, the electronic device receives an operation C of starting an application list of a first application, and starts a first application component and a list display component. Wherein, the list display component includes a target display element.
[0163] The first application is, for example, an application market. The application market adopts the componentization scheme provided in the embodiments of this application, that is, the application market includes multiple independent functional modules, such as the application component of the application market (i.e., the first application component), the list display component, and other display components.
[0164] For example, a user can open the app market by clicking the app icon on the app market's home screen of an electronic device. In some examples, the app market's homepage contains a list of apps. That is, the display components that the app market's homepage depends on include a list display component. Then, the electronic device (e.g., specifically a CMS) sequentially launches the first app component and the list display component. In this example, operation C is the operation of opening the app market. In other examples, the app market's homepage does not contain a list of apps. That is, the display components that the app market's homepage depends on do not include a list display component. Then, the electronic device (e.g., specifically a CMS) sequentially launches the first app component and the display components that the homepage depends on. The user continues to perform one or more operations on the app market's homepage, causing the first app component to launch the list display component, and the app market to jump from the homepage to the app list 802. In this example, operation C includes the operation of opening the app market and performing one or more operations on the app market's homepage to jump to the app list.
[0165] like Figure 8A As shown in Figure (1), the display interface 801 of the electronic device includes an application list 802. The application list 802 displays a download list of multiple display components (or application components). According to the description of the componentization scheme of the application above, each display component can also be understood as an independent application, and the application component can also be understood as the display component corresponding to the application homepage. In other words, the migration of display components provided in this application includes the migration of a single display component, and may also include the overall migration of an application component containing multiple display components.
[0166] S701. After receiving the operation D for the target display element, the list display component requests the first application component to migrate the target display element.
[0167] Among them, operation D for the target display element is an operation that instructs the migration of the target display element.
[0168] For example, such as Figure 8A As shown in (1), operation D involves pressing and holding the icon of the target display element (e.g., a weather display component) in the application list 802, and continuing to slide to the display interface of the second application without lifting the finger from the screen. The icon of the target display element changes position as the user drags their finger across the screen. In this example, operation D can be considered a continuous swiping operation.
[0169] For example, such as Figure 8A In the interface 804 shown in (2), operation D can also be a long press, click, double-click, or gravity press on the icon of a target display element (e.g., a weather display component) on the application list 802. The electronic device displays a snapshot 805 of the target display element, and the finger can leave the screen or remain on the screen before sliding to the display interface of the second application. The snapshot 805 of the target display element changes position as the user's finger drags on the screen. In this example, operation D can be considered as a continuous swipe operation, or it can include a series of operations. For example, operation D includes long press, click, double-click, gravity press on the icon of the target display element, and then sliding the finger to the display interface of the second application after leaving the screen.
[0170] For example, such as Figure 8B In the interface 806 shown in (1), operation D can also be a long press, click, double-click, or gravity press on the icon of the target display element (e.g., a weather display component) on the application list 802, and the electronic device displays option 807. If the user selects the option to run independently, the target display element is downloaded separately, and the target display element is installed and run as a separate application. If the user selects the option to combine it with other applications, the electronic device can display a snapshot of the target display element, and the user can press and hold the snapshot of the target display element and drag it to the display interface of the second application. In this example, operation D includes long press, click, double-click, gravity press on the icon of the target display element, selection to combine it with other applications, and dragging the snapshot of the target display element to the display interface of the second application.
[0171] It should be noted that the embodiments of this application do not specifically limit the form of operation D or the interface display on the electronic device. The following will use operation D as an example. Figure 8A The operation shown in (2) will be used as an example for explanation.
[0172] It should also be noted that the second application can also adopt the componentization scheme provided in the embodiments of this application, that is, the second application includes a second application component and other display components.
[0173] In the specific implementation, the user can execute an operation D on a target display element (such as a weather display component) within the application list 802. Upon receiving operation D, the list display component requests the migration of the target display element from the first application component. In one example, this request carries the identifier of the target display element, such as its package name and version number. In another example, the request may also carry the location of operation D; when the first application component receives the location of operation D, it can determine the identifier of the target display element based on that location.
[0174] S702, the first application component starts a snapshot display component to display a snapshot of the target display element.
[0175] For example, when the time for detecting the user clicking the icon of the target display element reaches a preset value (e.g., 3 seconds), or the pressure of the user pressing the target display element reaches a preset pressure value, etc., it is still considered that the user starts to perform operation D. When detecting that the user starts to perform operation D, the first application component can start the snapshot display component to generate a snapshot of the target display element. It should be noted that the snapshot of the target display element here can be a screenshot of the first page of the target display element. That is, the snapshot display component can save screenshots of the first pages of various display components, and when detecting that the user performs operation D on the target display element, the screenshot of the first page of the target display element can be directly displayed as the snapshot of the target display element. Then, the snapshot of the target display element changes position with the dragging of the user's finger on the screen.
[0176] S703, the first application component sends information of operation D to the CMS.
[0177] After detecting that the user performs operation D, the first application component sends information of operation D (e.g., the position of the user's finger leaving the screen, which is on the display interface of the second application) to the CMS, and the CMS can query the target application of the display component migration, i.e., the identifier of the second application, according to the information of operation D.
[0178] S704, the CMS determines and returns the identifier of the second application component to the first application component according to the information of operation D.
[0179] As described above, the CMS maintains information of all started application components, including the identifier of the application component and the display area. Therefore, the CMS can determine that the position of the user's finger leaving in operation D is on the display area of the second application component, and thus determine the identifier of the second application component. The identifier can be, for example, the process ID of the second application component.
[0180] S705, the first application component requests the PMS to download the target display component.
[0181] According to the content description in step S701, the first application component has obtained the identifier of the target display element, and carries the identifier of the target display element in the message for requesting the PMS to download the target display element.
[0182] S706, the PMS downloads the target display component according to the identifier of the target display element. After successful downloading, the PMS returns a response of successful downloading to the first application component.
[0183] In some embodiments, after receiving the information of the target display element requested to be downloaded by the first application component, the PMS can first determine whether the target display component corresponding to the target display element has been downloaded or installed in the electronic device. If it is determined that the target display component has been downloaded or installed in the electronic device, the target display component can no longer be downloaded, and a response of the downloaded target display component can be directly returned to the second application component. As can be seen, when multiple application programs need to use the same display component (with the same package name and version number), the display component can be downloaded only once, thereby saving the repeated download cost of traffic, time cost, and memory space of the electronic device for storing the installation package of the display component.
[0184] S707, the first application component sends the identification of the target display element to the second application component, and requests to migrate the target display element to the second application component.
[0185] According to the content description in step S704, the first application component has obtained the identification (such as the process ID) of the second application component. The first application component can send a request to the second application component according to the identification of the second application component, and the request carries the identification (package name and version number) of the target display element.
[0186] Optionally, after the first application component sends the identification of the target display element to the second application component, the snapshot display component can be instructed to be closed, that is, step S711 is performed.
[0187] S708, the second application component starts the target display component according to the identification of the target display element.
[0188] After starting the target display component, the electronic device displays the target display element.
[0189] S709, the second application component re-arranges the display interface.
[0190] When re-arranging, the display position of the target display element and the relationship with the display interface of the second application can refer to the description of the related content in step S409 in the foregoing, which will not be described here.
[0191] For example, as shown in the interface 808 in (2) of FIG. 8, the display interface 803 of the second application contains the target display element 809. Figure 8B
[0192] S710, the second application component saves the arrangement.
[0193] For example, the second application adds the information of the target display element, such as the identification and version number of the target display element, in the current display corresponding configuration file. In this way, when the second application component exits the current interface and enters the interface again, the target display element is still contained in the interface.
[0194] Therefore, users can quickly download new display components or application components through the application market and migrate them to the display interface of the target application, enabling users to quickly assemble new applications.
[0195] This application also provides a chip system, such as... Figure 9 As shown, the chip system includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 are interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices (e.g., the memory of electronic device 100). As another example, the interface circuit 1102 can be used to send signals to other devices (e.g., the processor 1101). Exemplarily, the interface circuit 1102 can read instructions stored in the memory and send those instructions to the processor 1101. When the instructions are executed by the processor 1101, the electronic device can perform the various steps performed by the electronic device 100 (e.g., a mobile phone) in the above embodiments. Of course, the chip system may also include other discrete components, which are not specifically limited in this application embodiment.
[0196] This application also provides an apparatus included in an electronic device, which has the function of implementing the behavior of the electronic device in any of the methods described above. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a receiving module or unit, a display module or unit, and a processing module or unit, etc.
[0197] This application also provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform any of the methods described in the above embodiments.
[0198] This application also provides a computer program product that, when run on a computer, causes the computer to perform any of the methods described in the above embodiments.
[0199] This application also provides a graphical user interface for an electronic device, the electronic device having a display screen, a camera, a memory, and one or more processors, the one or more processors being used to execute one or more computer programs stored in the memory, the graphical user interface including the graphical user interface displayed when the electronic device performs any of the methods in the above embodiments.
[0200] It can be understood that, in order to realize the above functions, the terminal and the like described above comprises a hardware structure and / or a 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 embodiments of the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present application.
[0201] The embodiments of the present application can divide the functions of the terminal and the like according to the above method examples, for example, each function module can be divided according to each function, or two or more functions can be integrated into one processing module. The integrated module can be realized in the form of hardware or software function module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, there can be another division method.
[0202] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional module is exemplified. In actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0203] Each functional unit in each embodiment of the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or software functional unit.
[0204] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disk, and various other media that can store program codes.
[0205] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of migrating a display element across applications, the method comprising: The method comprises: The electronic device displays a first interface of a first application and a second interface of a second application, the first interface comprising a target display element, the target display element corresponding to a target display component, the target display component being a page program package of the target display element, wherein the target display component can be independently run, and the target display component needs to be installed; The electronic device displays a first interface of a first application and a second interface of a second application, comprising: The electronic device starts a first application component and the target display component, and starts a second application component; wherein the first application component comprises an entry execution program and a configuration file of the first application, the configuration file of the first application component containing an identifier of the target display element; the first application component not containing a page program package of the target display element; The second application component comprises an entry execution program and a configuration file of the second application, the configuration file of the second application component not containing the identifier of the target display element, and the second application component not containing the page program package of the target display element; The electronic device receives a first operation for the target display element; In response to receiving the first operation, the electronic device displays a third interface of the first application and a fourth interface of the second application, wherein the third interface does not include the target display element, and the fourth interface includes the target display element.
2. The method of claim 1, wherein, In response to receiving the first operation, the electronic device displays a third interface of the first application and a fourth interface of the second application, wherein the third interface does not include the target display element, and the fourth interface includes the target display element, comprising: The first application component sends the identifier of the target display element to the second application component; The first application component closes the target display component; and the second application component starts the target display component according to the identifier of the target display element, and displays the target display element.
3. The method of claim 2, wherein, The first application component sends the identifier of the target display element to the second application component, comprising: The first application component determines the identifier of the second application component according to the first operation; The first application component sends the identifier of the target display element to the second application component according to the identifier of the second application component.
4. The method of claim 3, wherein, The first operation is an operation of dragging the target display element to move to the second interface of the second application and then leaving the display screen, and the first application component determines the identifier of the second application component according to the first operation, specifically: The first application component determines the identifier of the second application component according to the position when leaving the display screen.
5. The method according to any one of claims 2 to 4, characterized in that, The identifier of the target display element comprises a package name and / or a version number of the target display element.
6. The method according to claim 3 or 4, characterized in that, The identifier of the second application component comprises a process identifier of the first application component.
7. The method according to any one of claims 1 to 4, characterized in that, The configuration file of the first application component does not contain the identification of the target display element after the electronic device displays the third interface of the first application and the fourth interface of the second application; and the configuration file of the second application component contains the identification of the target display element.
8. The method according to any one of claims 1 to 4, characterized in that, The first interface of the first application is a home page of the first application, and the method further includes: The electronic device exits the first application; The electronic device receives a second operation of opening the first application; In response to receiving the second operation, the electronic device displays a home page of the first application, and the home page of the first application does not contain the target display element.
9. The method according to any one of claims 1 to 4, characterized in that, The second interface of the second application is a home page of the second application, and the method further includes: The electronic device exits the second application; The electronic device receives a third operation of opening the second application; In response to receiving the third operation, the electronic device displays a home page of the second application, and the home page of the second application contains the target display element.
10. The method according to any one of claims 1 to 4, characterized in that, The first interface of the first application is an application download list of an application market, and the target display element is an item in the application download list; In response to receiving the first operation, the electronic device displays the third interface of the first application and the fourth interface of the second application, wherein the third interface does not include the target display element, and the fourth interface includes the target display element, including: The first application component determines the identification of the second application element according to the first operation, and the first application component requests to download and install the installation package of the target display element according to the identification of the target display element; The first application component sends the identification of the target display element to the second application component according to the identification of the second application component; The second application component starts the target display component and displays the target display element according to the identification of the target display element.
11. An electronic device, comprising: including: A processor, a memory, and a touch screen, the memory and the touch screen are coupled with the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor runs the computer instructions in the memory, the electronic device executes the method as claimed in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer instructions make the electronic device execute the method as claimed in any one of claims 1-10 when the computer instructions run on the electronic device.
13. A computer program product, characterised in that, The computer instructions make the computer execute the method as claimed in any one of claims 1-10 when the computer program product runs on the computer.
Citation Information
Patent Citations
Systems and methods for managing displayed content on electronic devices
CN105122176A
System and method for providing collaboration resources between web applications
US20070006088A1
Cooperating widgets
US20080141153A1
Enabling transfer of widgets across containers at runtime
US20130311890A1