Application cloning method, electronic device, storage medium, and chip system
By generating separate application sandboxes for cloned applications with the same package name but different application indexes, the problem of not being able to manage cloned applications independently in existing technologies is solved, achieving independent management and resource saving.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-03-26
AI Technical Summary
Existing technologies cannot independently manage cloned applications, nor can they set functions such as auto-start, battery consumption display, and permission control for cloned applications, and they also increase resource and storage space consumption.
By generating different application indexes with the same package name for cloned applications, independent application sandboxes are created, enabling independent management of cloned applications, including system permissions and parameter configuration.
It enables independent management of cloned applications, improves system security and stability, reduces resource and storage space consumption, and enhances user experience.
Smart Images

Figure CN2025116290_26032026_PF_FP_ABST
Abstract
Description
Method, electronic device, storage medium and chip system for application cloning
[0001] The present application claims priority to the Chinese patent application No. 202411336442.3, filed on September 23, 2024, and entitled "Method, electronic device, storage medium and chip system for application cloning", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the technical field of terminal, and in particular, to a method, an electronic device, a storage medium and a chip system for application cloning. BACKGROUND
[0003] Some applications in an electronic device can support application multi-opening function, that is, multiple same applications can be opened on the same electronic device. In this way, a user can separate the management of work information and life information.
[0004] In some implementations, the electronic device can implement the application multi-opening function based on the managed profile in the Android system to generate a cloned application.
[0005] However, this implementation cannot control the cloned application independently, such as setting the self-starting, viewing the battery consumption display, permission control and other functions for the cloned application. SUMMARY
[0006] The present application provides a method, an electronic device, a storage medium and a chip system for application cloning, which can support the creation of multiple cloned applications, increase the application index as the identification information of the cloned application, and generate an independent application sandbox for each cloned application to store application data. In this way, the electronic device can manage the cloned applications as independent applications, thereby realizing the independent management of the system permissions, parameter configurations and other functions of each cloned application.
[0007] In a first aspect, an embodiment of the present application provides a method for application cloning, applied to an electronic device, and the method comprises:
[0008] In response to a first operation of triggering creation of a forked application of the main application, a first forked application is created, where the package name of the first forked application is the same as the package name of the main application, and the application identifier of the first forked application is different from the application identifier of the main application. In response to a second operation of triggering creation of a forked application of the main application, a second forked application is created, where the package name of the second forked application is the same as the package name of the main application, and the application identifier of the second forked application is different from the application identifier of the main application and the application identifier of the first forked application. In this way, different application identifiers can be used to distinguish the forked applications, and the forked applications can be run as independent applications, and the system service of the electronic device can manage the forked applications as independent applications.
[0009] In a possible implementation, the first forked application has a corresponding application icon, and the second forked application has a corresponding application icon. It can be understood that the icons of the forked applications and the icon of the main application can be the same or different. In a possible implementation, the electronic device can add some icon identifiers to the icon of the main application as the icons of the forked applications, so that the user can easily distinguish the main application from the forked applications, and the visual experience of the user is improved.
[0010] In a possible implementation, the main application, the first forked application, and the second forked application are in the same user space. The electronic device can create directories for the first forked application and the second forked application in the same user space as the main application. In this way, the electronic device does not need to create multiple user spaces for the forked applications, and only needs to generate an additional package information, so that multiple user space file storage spaces are not occupied, thereby reducing resource consumption and storage space consumption.
[0011] In a possible implementation, the main application has a corresponding first sandbox, the first forked application has a corresponding second sandbox, and the second forked application has a corresponding third sandbox. The identifier of the first sandbox is the same as the application identifier of the main application, the identifier of the second sandbox is the same as the application identifier of the first forked application, and the identifier of the third sandbox is the same as the application identifier of the second forked application. In this way, the data and code of the main application and the forked applications can be isolated by the sandbox, so that the data of the main application and the forked applications do not interfere with each other, thereby improving the security and stability of the system.
[0012] In a possible implementation, the method further includes: in response to a third operation triggered by the user, implementing a target function of the main application; in response to a fourth operation triggered by the user, implementing a target function of the first child application; and in response to a fifth operation triggered by the user, implementing a target function of the second child application, wherein the target function includes one or more of the following: a message notification function, a picture sharing function, an application lock function, a microphone function, a battery statistics function, an application and service quota function, or a usage behavior statistics function. The electronic device implements the target function for the main application and each child application respectively. In this way, the electronic device can manage the child applications as independent applications, thereby achieving independent management of system permissions, parameter configurations, and the like of each child application, and improving the user experience.
[0013] In a possible implementation, the main application has corresponding configuration information, and the configuration information is used to identify that the main application supports creation of a child application. The configuration information can be separated from the code, and a developer can more easily modify the behavior of the application program without changing the code, which improves the flexibility and maintainability of the application program. The electronic device can determine, according to the configuration information in the main application, whether the main application supports creation of a child application, thereby providing different interactive experiences for the user.
[0014] In a possible implementation, the method further includes: in response to a sixth operation triggering deletion of the first child application, deleting the first child application, the application identifier of the first child application, and the icon of the first child application. When deleting a certain child application, the electronic device can delete the application identifier and the icon corresponding to the child application, thereby better maintaining the running of the application, correctly displaying interface information, and reducing the residual of useless information in the case of deleting the child application.
[0015] In a possible implementation, the method further includes: in response to a seventh operation triggering uninstallation of the main application, uninstalling the main application, the first child application, and the second child application, and deleting the application identifier of the main application, the application identifier of the second child application, and the application identifier of the third child application. When uninstalling a certain main application, the electronic device can delete the child applications corresponding to the main application, and delete the application identifier and the icon, thereby maintaining the consistency of data and simplifying the user operation, so that the user does not need to manually delete the child applications again, and the user experience is improved.
[0016] In a possible implementation, the method comprises: in response to the eighth operation of triggering the creation of the forked application of the host application, creating an Nth forked application, wherein the package name of the Nth forked application is the same as the package name of the host application, the application identifier of the Nth forked application is different from the application identifier of the host application and the application identifiers of other forked applications of the host application, N is a positive integer, and N is less than or equal to the first preset value. Running too many forked applications can reduce the performance of the electronic device, so that the response of the electronic device becomes slow. Setting the maximum number of created forked applications can reduce the system overload, thereby better managing the system load and improving the reliability and stability of the electronic device.
[0017] In a possible implementation, the method further comprises: in response to the ninth operation of triggering the opening of the second application, creating a first application instance of the second application, wherein the package name of the first application instance is the same as the package name of the second application, and the application identifier of the first application instance is the same as the application identifier of the second application; in the case that the first application instance is created, in response to the tenth operation of triggering the opening of the second application, creating a second application instance of the second application, wherein the package name of the second application instance is the same as the package name of the second application, the application identifier of the second application instance is the same as the application identifier of the second application, and the instance identifier of the second application instance is different from the instance identifier of the first application instance. The first application instance and the second application instance can share the sandbox of the second application, one or more application instances of the second application are created, and the user can log in to multiple different accounts at the same time and perform different task processing, thereby meeting the needs of the user for different application scenarios and improving the user experience.
[0018] In a possible implementation, the second application has corresponding configuration information, and the configuration information is used to identify that the second application supports the creation of application instances. The maximum number of application instances supported by the second application is less than or equal to the second preset value. Since each application instance consumes certain system resources, setting the maximum number of created application instances can reduce the competition and excessive consumption of resources and reduce the impact on the performance of the electronic device, so that the system can run stably.
[0019] In a second aspect, an embodiment of the present application provides a device for application of a clone, which can be an electronic device, a chip or a chip system in the electronic device. The device can include a processing unit. The processing unit is configured to implement any method related to processing performed by the electronic device in the first aspect or any possible implementation of the first aspect. When the device is an electronic device, the processing unit can be a processor. The device can further include a storage unit, which can be a memory. The storage unit is configured to store instructions. The processing unit executes the instructions stored in the storage unit, so that the electronic device implements the method described in the first aspect or any possible implementation of the first aspect. When the device is a chip or a chip system in the electronic device, the processing unit can be a processor. The processing unit executes the instructions stored in the storage unit, so that the electronic device implements the method described in the first aspect or any possible implementation of the first aspect. The storage unit can be a storage unit (for example, a register, a cache, etc.) in the chip, or a storage unit (for example, a read-only memory, a random access memory, etc.) outside the chip in the electronic device.
[0020] In a third aspect, an embodiment of the present application provides an electronic device, including one or more processors and a memory, the memory being coupled to the one or more processors, the memory being configured to store computer program codes, the computer program codes including computer instructions, and the one or more processors being configured to invoke the computer instructions to execute the method described in the first aspect or any possible implementation of the first aspect.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer programs or instructions, and when the computer programs or instructions are run on a computer, the computer is caused to execute the method described in the first aspect or any possible implementation of the first aspect.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product including computer programs, and when the computer programs are run on a computer, the computer is caused to execute the method described in the first aspect or any possible implementation of the first aspect.
[0023] In a sixth aspect, an embodiment of the present application provides a chip or a chip system, which includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through a line, and the at least one processor is configured to run computer programs or instructions to execute the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, a pin or a circuit, etc.
[0024] In a possible implementation, the chip or the chip system described above in the present application further includes at least one memory in which instructions are stored. The memory can be a storage unit inside the chip, for example, a register, a cache, etc., or a storage unit of the chip (for example, a read-only memory, a random access memory, etc.).
[0025] It should be understood that the second aspect to the sixth aspect of the present application correspond to the technical solutions of the first aspect or the second aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, which will not be repeated. BRIEF DESCRIPTION OF DRAWINGS
[0026] FIG. 1 is a structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0027] FIG. 2 is a software structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0028] FIG. 3 is a schematic diagram of a clone application provided by an embodiment of the present application;
[0029] FIG. 4 is a schematic diagram of a clone application running framework provided by an embodiment of the present application;
[0030] FIG. 5 is an interface schematic diagram of a clone application setting entry provided by an embodiment of the present application;
[0031] FIG. 6 is an interface schematic diagram of a clone application creation process provided by an embodiment of the present application;
[0032] FIG. 7 is an interface schematic diagram of a desktop displaying a clone application provided by an embodiment of the present application;
[0033] FIG. 8 is an interface schematic diagram of a tablet computer displaying a clone application provided by an embodiment of the present application;
[0034] FIG. 9 is a schematic diagram of a clone application creation process provided by an embodiment of the present application;
[0035] FIG. 10 is an interface schematic diagram of displaying a clone application message notification provided by an embodiment of the present application;
[0036] FIG. 11 is an interface schematic diagram of a sharing picture interface displaying a clone application provided by an embodiment of the present application;
[0037] FIG. 12 is an interface schematic diagram of an application lock interface displaying a clone application provided by an embodiment of the present application;
[0038] FIG. 13 is an interface schematic diagram of a microphone setting interface displaying a clone application provided by an embodiment of the present application;
[0039] FIG. 14 is a schematic diagram of an interface of a battery interface displaying a cloned application according to an embodiment of the present application;
[0040] FIG. 15 is a schematic diagram of an interface of a usage statistics interface displaying a cloned application according to an embodiment of the present application;
[0041] FIG. 16 is a schematic diagram of an interface of an application and service limit interface displaying a cloned application according to an embodiment of the present application;
[0042] FIG. 17 is a schematic diagram of an interface of deleting a cloned application according to an embodiment of the present application;
[0043] FIG. 18 is a schematic diagram of another interface of deleting a cloned application according to an embodiment of the present application;
[0044] FIG. 19 is a schematic diagram of an interface of uninstalling a cloned application according to an embodiment of the present application;
[0045] FIG. 20 is a schematic diagram of an application multiple instance according to an embodiment of the present application;
[0046] FIG. 21 is a schematic diagram of an application multiple instance running framework according to an embodiment of the present application;
[0047] FIG. 22 is a schematic diagram of a tablet displaying an application multiple instance according to an embodiment of the present application;
[0048] FIG. 23 is a schematic diagram of a notification center displaying an application instance message according to an embodiment of the present application;
[0049] FIG. 24 is a schematic diagram of a method of cloning an application according to an embodiment of the present application;
[0050] FIG. 25 is a schematic diagram of a chip structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to clearly describe the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:
[0052] 1. Terms
[0053] In the embodiments of the present application, "first", "second", and the like are used to distinguish the same items or similar items with basically the same function and effect. For example, the first chip and the second chip are only used to distinguish different chips, and do not limit the sequence. Those skilled in the art can understand that "first", "second", and the like do not limit the quantity and execution sequence, and "first", "second", and the like do not necessarily mean different.
[0054] It should be noted that the terms "exemplary" and "for example" are used herein to mean "serving as an example, instance, or illustration," and not "preferred" or "advantageous over other examples." The usage of these terms in this application is not intended to convey any preference or advantage for the embodiments or examples described with such terms.
[0055] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The relationship between the associated objects described by "and / or" indicates that there can be three kinds of relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0056] 2. Electronic device
[0057] The electronic device of the embodiments of the present application can also be any form of terminal device. For example, the electronic device can include a mobile phone, a tablet computer, a palm computer, a notebook computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, an electronic device in a 5G network, or an electronic device in a future evolved public land mobile network (PLMN), and the like. The embodiments of the present application are not limited thereto.
[0058] By way of example and not limitation, in the embodiments of the present application, the electronic device can also be a wearable device. The wearable device can also be referred to as a wearable smart device, which is a general term for devices that are designed and developed by applying wearable technology to daily wear, such as glasses, gloves, watches, clothing, and shoes. The wearable device is a portable device that is directly worn on the body or integrated into the clothes or accessories of the user. The wearable device is not only a hardware device, but also has powerful functions through software support and data interaction and cloud interaction. The general wearable smart device includes a device with full functions and large size, which can realize complete or partial functions without relying on a smart phone, such as a smart watch or smart glasses, and a device that focuses on a certain application function and needs to be used in cooperation with other devices, such as a smart phone, such as various smart wristbands and smart jewelry for monitoring vital signs.
[0059] In addition, in the embodiments of the present application, the electronic device can also be an electronic device in an internet of things (IoT) system. The IoT is an important component of future information technology development, and its main technical feature is to connect objects through communication technology and network, so as to realize the intelligent network of man-machine interconnection and object-object interconnection.
[0060] The electronic device in the embodiments of the present application can also be referred to as a user equipment (UE), a mobile station (MS), a mobile terminal (MT), an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent, or a user equipment, etc.
[0061] In the embodiments of the present application, the electronic device or each network device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes central processing unit (CPU), memory management unit (MMU), memory (also known as main memory), and other hardware. The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system, etc. The application layer includes browser, address book, word processing software, instant messaging software, etc.
[0062] For example, FIG. 1 shows a structural schematic diagram of an electronic device.
[0063] The electronic device can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyro sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0064] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device can include more or fewer components than the illustration, or combine certain components, or split certain components, or different component arrangements. The illustrated components can include hardware, software, or a combination of software and hardware.
[0065] 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. Different processing units can be independent devices, or can be integrated in one or more processors. The controller can generate operation control signals according to instruction operation codes and timing signals, complete the control of fetching instructions and executing instructions.
[0066] 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 hold instructions or data that the processor 110 has just used or is using in a loop. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system. For example, in the embodiments of the present application, the processor can be used to execute the process of creating a clone application, and can also be used to separately manage the main application and the clone application.
[0067] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device can also use different interface connection modes or combinations of multiple interface connection modes in the above embodiments.
[0068] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required by a function, and the like. The data storage area can store data created during use of the electronic device, and the like. In addition, the 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), and the like. The processor 110 executes various function applications and data processing of the electronic device by running instructions stored in the internal memory 121 and / or instructions stored in the memory provided in the processor. For example, in the embodiments of the present application, the internal memory 121 can be used to store running data of the clone application and corresponding sandbox data.
[0069] FIG. 2 is a software structure block diagram of the electronic device according to an embodiment of the present application. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer (HAL), and the kernel layer.
[0070] The application layer can also be referred to as the application layer, and the application layer can include a series of application packages. As shown in FIG. 2, the application package can include desktop applications, telephone, music, calendar, camera, game, memo, video, and the like. The application can include system applications and third-party applications.
[0071] In the embodiments of the present application, the desktop application can be used to manage and display the application programs in the electronic device. For example, the desktop application can provide an interface to facilitate the user to view, start and manage the application programs installed on the electronic device in the interface. In some implementations, the desktop application can also be referred to as a desktop launcher or Launcher.
[0072] The application framework layer can also be referred to as the Framework layer, which can provide an application programming interface (API) and a programming framework for the application programs of the application layer. The Framework layer can include some pre-defined functions.
[0073] The Framework layer can include a package manager, an activity manager, a window manager, a notification manager and a view system, etc.
[0074] The package manager can be used to manage and install the package of the application program, for example, to be responsible for handling the installation and uninstallation operations of the application program package. It can be understood that in different operating systems, the package manager can correspond to different English abbreviations. For example, in the android system, the package manager can be understood as the package management service (PMS), and in the Harmony system, the package manager can be understood as the bundle manager service (BMS).
[0075] The activity manager can be responsible for the life cycle management, task stack management, process management and permission management of the application program. For example, in the embodiments of the present application, the activity manager can manage the life cycle of multiple application instances of an application, and run one or more activity components of the application instance. It can be understood that in different operating systems, the activity manager can correspond to different English abbreviations. For example, in the android system, the activity manager can be understood as the activity management service (AMS), and in the Harmony system, the activity manager can be understood as the ability manager service (AMS).
[0076] The specific window manager, notification manager and view system, etc. can refer to related technologies, which will not be described here.
[0077] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for the control and management of the Android system.
[0078] The core library includes two parts: one part is a function function that needs to be called by the java language, and the other part is the core library of Android.
[0079] The application layer and the framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the framework layer into binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiment of the present application, the virtual machine can be used to perform functions such as creation, running and deletion of the clone application.
[0080] The system library can also be referred to as the Native layer, and the Native layer can include multiple functional modules.
[0081] The hardware abstraction layer is an abstract layer between the kernel layer and the Android runtime. The hardware abstraction layer can be a package of hardware drivers, providing a unified interface for the calling of the upper layer application.
[0082] The kernel layer is the layer between hardware and software. The kernel layer can include display drivers, camera drivers, audio drivers, etc.
[0083] It should be noted that the embodiments of the present application are only exemplified by the Android system. In other operating systems (such as the Hongmeng system, the Windows system, the IOS system, etc.), as long as the functions of each functional module are similar to the embodiments of the present application, the scheme of the present application can also be implemented.
[0084] Some applications in the electronic device can support the application multi-opening function, that is, multiple same applications can be opened on the same electronic device. In this way, the user can manage work information and life information separately. In some scenarios, the application multi-opening function can also be referred to as the application clone function.
[0085] In some implementations, the electronic device can implement the application clone function based on the managed configuration file (Managed Profile) in the Android system to generate a clone application. However, this implementation method cannot control the clone application alone, such as setting the self-starting, viewing the battery power consumption display, permission control, etc. In addition, this implementation method will increase the resource consumption and storage space consumption. For example, for the same application, each multi-opening of an application instance will increase a user space, thereby increasing the resource consumption, and each user space has an independent file storage space, which increases the consumption of storage space.
[0086] Therefore, the method for application cloning provided in the embodiments of the present application can support the creation of multiple cloned applications by the operating system of the electronic device, and the package names of the cloned applications are the same. For example, taking application A as an example, the operating system can support the creation of cloned application A1 and cloned application A2 of application A, where the package names of application A, cloned application A1 and cloned application A2 are all com.app.a. The operating system can add an application index as the identification information of the cloned applications to distinguish the cloned applications. For example, the application index of application A can take the value 0, the application index of cloned application A1 can take the value 1, and the application index of cloned application A2 can take the value 2. The operating system can also generate independent application sandboxes for the cloned applications to store application data, so as to realize the data isolation of the cloned applications. For example, the sandbox index of application A can be the same as the value of the application index of application A, the sandbox index of cloned application A1 can be the same as the value of the application index of cloned application A1, and the sandbox index of cloned application A2 can be the same as the value of the application index of cloned application A2. In this way, the cloned applications can run as independent applications, and the system services of the electronic device can manage the cloned applications as independent applications, so as to realize the independent management of the system permissions, parameter configurations and the like of the cloned applications.
[0087] The method of the embodiments of the present application will be described in detail through specific embodiments. The embodiments below can be combined with each other or implemented independently, and the same or similar concepts or processes can not be described again in some embodiments.
[0088] Taking application A as an example, FIG. 4 shows a schematic diagram of the running framework of the cloned applications of application A.
[0089] It can be understood that application A can be any application program supporting the application cloning function in the application market, which is not limited in the embodiments of the present application. In response to the operation of triggering the downloading of application A in the application market, the electronic device can download and install application A. It can be understood that the operations mentioned in the embodiments of the present application can include but are not limited to touch (for example, click, etc.), voice control, gesture and the like, which are not limited in the embodiments of the present application.
[0090] After the installation of application A is completed, in response to the operation of triggering the creation of the cloned applications of application A, the electronic device can create one or more cloned applications for application A. In some scenarios, the application A can also be referred to as the main application of application A, or simply as the main application, and the cloned applications created can also be referred to as the cloned applications of application A, or simply as the cloned applications. The process of creating and displaying one or more cloned applications of application A can be referred to the related descriptions of the corresponding embodiments of FIGS. 5 to 8 below, which will not be described herein.
[0091] As shown in FIG. 4, the package name of the main application, the clone application A1 and the clone application A2 of the application A is the same, but the value of the application index is different. For example, the package name of the three applications is com.app.a, but the application index of the main application is 0, the application index of the clone application A1 is 1, and the application index of the clone application A2 is 2. In this way, the electronic device can distinguish the main application and each clone application based on the application index. It can be understood that in actual cases, the package name of the three applications can have other names, the application index of the three applications can have other values, and the data type of the application index can be set to an integer, a string, an enumeration, etc. as long as the main application and each clone application can be distinguished by the application index. The naming of the package name and the value of the application index are not limited in the embodiments of the present application.
[0092] Optionally, for the application index value of the main application of the application A, the electronic device can create a default value of the application index for the main application when installing the application A, for example, the default value of the application index can be 0. The electronic device can also create the value of the application index for the main application when creating the clone application of the application A, and the embodiments of the present application are not limited.
[0093] When the main application of the application A or the clone application of the application A is running on the electronic device, the main application of the application A and each clone application of the application A can run as independent applications. For example, the main application of the application A can run one or more processes, for example, including process 1 and process 2. The process 1 can include activity component 1, activity component 2, extension service 3, etc., and the process 2 can include activity component 4, activity component 5, extension service 6, etc.
[0094] The clone application A1 can also run one or more processes, for example, including process 11 and process 12, wherein the process 11 can include activity component 11, activity component 12, extension service 13, etc., and the process 12 can include activity component 14, activity component 15, extension service 16, etc. It can be understood that the processes running in the clone application A1 can be the same as or different from the processes running in the main application of the application A, and the specific processes can be run according to the actual application requirements. In the case that the clone application A1 and the main application run the same processes, the activity components and extension services included in the same processes can also be the same or different, and the embodiments of the present application are not limited.
[0095] Similarly, the application A2 can also run one or more processes, for example, including the process 21 and the process 22, wherein the process 21 can include the activity component 21, the activity component 22, the extended service 23, etc., and the process 22 can include the activity component 24, the activity component 25, the extended service 26, etc. It can be understood that the processes running in the application A2 can be the same as or different from the processes running in the main application of the application A, and the activity components and the extended services included in the same processes can also be the same or different, which is not limited in the embodiments of the present application.
[0096] The electronic device can also assign different sandbox directories for the main application of the application A, the application A1 and the application A2. The sandbox can be used to isolate the data and code of each application program, so that the data between the application programs does not interfere with each other, thereby improving the security and stability of the system. For example, the sandbox directory of the main application of the application A is “ / data / app / … / app_process”, the sandbox directory of the application A1 is “ / data / app / … / app_process1”, and the sandbox directory of the application A2 is “ / data / app / … / app_process2”. <userid>For example, if the application package name is "com.app.a", the electronic device can create a " / 1clone.com.app.a" directory for the clone application A1 and a " / 2clone.com.app.a" directory for the clone application A2 under the same user space userId, i.e., the sandbox directory of the clone application A1 is " / data / app / … / " <userid> / 1clone.com.app.a”, the sandbox directory of the clone application A2 is " / data / app / … / <userid> / 2clone.com.app.a”.
[0097] The sandbox directory of the main application of the application A can include one or more files, such as file 1, file 2, file 3, and the like; and can also include one or more databases, such as database 1, database 2, and the like.
[0098] The sandbox directory of the clone application A1 can also include one or more files, such as file 11, file 12, file 13, and the like; and can also include one or more databases, such as database 11, database 12, and the like. It can be understood that the files included in the sandbox directory of the clone application A1 can be the same as or different from the files included in the sandbox directory of the main application. The databases included in the sandbox directory of the clone application A1 can be the same as or different from the databases included in the sandbox directory of the main application. The files and / or databases of the respective applications can be created according to actual application requirements, and embodiments of the present application are not limited.
[0099] Similarly, the sandbox directory of the clone application A2 can also include one or more files, such as file 21, file 22, file 23, and the like; and can also include one or more databases, such as database 21, database 22, and the like. It can be understood that the files included in the sandbox directory of the clone application A2 can be the same as or different from the files included in the sandbox directory of the main application. The databases included in the sandbox directory of the clone application A2 can be the same as or different from the databases included in the sandbox directory of the main application. The files and / or databases of the respective applications can be created according to actual application requirements, and embodiments of the present application are not limited.
[0100] It can be understood that in the embodiments of the present application, when the clone application A1 and the clone application A2 are created, since the clone applications are created under the same user space, multiple user spaces do not need to be created, and the file storage space of multiple user spaces is not occupied, thereby reducing resource consumption and storage space consumption. According to experimental tests, when the clone applications are created, since user spaces do not need to be created for the respective clone applications, only one package information needs to be generated additionally, therefore, excluding the case that the clone applications occupy memory when running, the additional resource consumption required by the electronic device for creating the clone applications is in the order of kilobytes (kb). That is, the clone applications created by the embodiments of the present application do not have excessive resource consumption and storage space consumption.
[0101] For example, FIGS. 5 and 6 show interface diagrams for creating one or more clone applications of the application A.
[0102] As shown in FIG. 5, a of FIG. 5 is an interface 501 in which the electronic device sets an application. The interface 501 can include a plurality of setting items, for example, including a desktop and personalization, display and brightness, sound and vibration, notifications and status bar, general, and the like. Each setting item can include a setting item icon, a setting item name, and a control for entering a setting item detail page. For example, taking the general setting item as an example, the general setting item can include a general setting icon 5011, a general setting name 5012, and a control 5013 for entering a general setting detail page.
[0103] In response to an operation of triggering the general setting interface, the electronic device can display a general setting interface 502, as shown in b of FIG. 5. The triggering operation can include an operation of triggering any position in the general setting item, for example, an operation of triggering the control 5013 of the general setting detail page. The interface 502 can include a plurality of setting items, for example, including system updates, system navigation mode, date and time, application assistant, application clone, and the like. Each setting item can include a setting item name and a control for entering a setting item detail page. For example, taking the application clone setting item as an example, the application clone setting item can include an application clone name 5021 and a control 5022 for entering an application clone detail page.
[0104] In response to an operation of triggering the general setting interface, the electronic device can display a general setting interface 502, as shown in b of FIG. 5. The triggering operation can include an operation of triggering any position in the general setting item, for example, an operation of triggering the control 5013 of the general setting detail page. The interface 502 can include a plurality of setting items, for example, including system updates, system navigation mode, date and time, application assistant, application clone, and the like. Each setting item can include a setting item name and a control for entering a setting item detail page. For example, taking the application clone setting item as an example, the application clone setting item can include an application clone name 5021 and a control 5022 for entering an application clone detail page.
[0105] In a possible display manner of the application clone interface, if the electronic device includes at least one application supporting the application clone function, the electronic device can display an application clone interface 503, as shown in c of FIG. 5. The interface 503 can include a prompt information 5031 and one or more application items supporting the application clone function. In some scenarios, the application item can also be referred to as an application list.
[0106] The content of the prompt information 5031 can include "after the application creates a clone, a corresponding clone application will be generated on the desktop, and the clone application and the main application run independently of each other", and the specific content of the prompt information 5031 is not limited in the present application.
[0107] The application items can include application A, application B, application C, application D, application E, and the like. Each application item can include an application icon, an application name, a number of corresponding clone applications of the application, and a control for entering an application item detail page. For example, taking application A as an example, the application item can include an application icon 5032 of application A, an application name 5033 of application A, a number 5034 of corresponding clone applications of application A, and a control 5035 for entering an application A detail page. It can be understood that if application A currently has no corresponding clone application, the number 5034 of corresponding clone applications of application A can be displayed as no clone.
[0108] In another possible display manner of the application clone interface, if the electronic device does not include an application supporting the application clone function, the electronic device can display an application clone interface 504 as shown in FIG. 5d. The interface 504 can include prompt information 5041, and the content of the prompt information 5041 can include "no application available for cloning". The specific content of the prompt information 5041 is not limited in the present application. Optionally, the interface 504 can display a picture to prompt the user that there is currently no application available for cloning.
[0109] In response to the operation of triggering the entering of the application A detail interface, the electronic device can display an application A detail interface 601 as shown in FIG. 6a. The triggering operation can include an operation of triggering any position in the application item corresponding to application A, for example, an operation of triggering the control 5035 of the application A detail page. The interface 601 can include an icon 6011 of application A, an application name 6012 of application A, and a clone creation control 6013. In response to the operation of triggering the clone creation control 6013, the interface 601 can include a clone creation in progress control 6014 as shown in FIG. 6b. The clone creation in progress control 6014 can include prompt information "clone creation in progress…" and a waiting icon.
[0110] Optionally, during the clone creation process, the electronic device can perform partial grayscale display on the interface 601. For example, the electronic device can perform grayscale display on the icon 6011 of application A, the application name 6012 of application A, and the clone creation control 6013, and set the clone creation control 6013 to an untriggerable state. In this way, the clone creation process can be highlighted in the interface 601, the user experience is improved, and the display error caused by repeated triggering of the clone creation control 6013 by the user can be reduced.
[0111] When the electronic device creates the child application A1 of the application A, as shown in Fig. 6c, in addition to displaying the icon 6011 of the application A, the name 6012 of the application A, and the creation child control 6013 in the interface 601, the created child application A1 can also be displayed in the interface 601. The child application A1 can include the icon 6014 of the child application A1, the name 6015 of the child application A1, and the deletion control 6016.
[0112] It can be understood that the icon 6011 of the application A and the icon 6014 of the child application A1 can display the same application icon or different icons, which is not limited in the embodiments of the present application. In a possible implementation, the electronic device can add some icon identifiers to the icon 6011 as the icon 6014 of the child application A1, so as to identify that the child application A1 is the child application of the application A, and to facilitate the user to distinguish the main application and the child application, thereby improving the visual experience of the user.
[0113] The deletion control 6016 can be used to delete the child application A1. In response to the operation of triggering the deletion control 6016, the electronic device can delete the child application A1. The interface 601 after deletion can be as shown in Fig. 6a, and the specific process of deleting the child application can refer to the related description in the corresponding embodiment of Fig. 17 below, which will not be described here.
[0114] Optionally, when the electronic device creates the child application A1 and displays Fig. 6c, the interface 601 can also display a Toast prompt information to prompt the user that the child application has been added to the desktop. For example, the Toast prompt information can include "'application A1' has been added to the desktop", and the specific content of the Toast prompt information is not limited in the present application.
[0115] It can be understood that the electronic device can create multiple child applications of the application A. The electronic device can also configure the maximum number of child applications. Taking that the electronic device can create at most two child applications of the application A as an example, after the electronic device creates the child application A1 and the child application A2 of the application A, the interface 601 can be as shown in Fig. 6d. The interface 601 can include the option of the child application A1, the option of the child application A2, and the creation child control 6013.
[0116] Optionally, since the electronic device can create at most two child applications of the application A, after creating the child application A1 and the child application A2, the electronic device can display the creation child control 6013 in gray, and set the creation child control 6013 to be in a non-triggerable state. The electronic device can also display a prompt information 6017, and the content of the prompt information 6017 can include "at most two child applications can be created", and the specific content of the prompt information 6017 is not limited in the present application.
[0117] In the process of creating a clone application by the electronic device, the desktop of the electronic device can also display the icon of the corresponding clone application. It can be understood that different electronic devices can have different display effects in the desktop. Hereinafter, taking a mobile phone as an electronic device and a tablet computer as an electronic device as examples, the process of creating a clone application is described respectively.
[0118] When the electronic device is a mobile phone, as shown in FIG. 7, taking application A as an example, in the case where the mobile phone does not create a clone application of application A, as shown in FIG. 7a, the mobile phone desktop 700 can include the icon 701 of application A. In the case where the mobile phone creates a clone application A1 of application A, as shown in FIG. 7b, the mobile phone desktop 700 can include the icon 701 of application A and the icon 702 of the clone application A1 of application A. In the case where the mobile phone creates a clone application A1 and a clone application A2 of application A, as shown in FIG. 7c, the mobile phone desktop 700 can include the icon 701 of application A, the icon 702 of the clone application A1, and the icon 703 of the clone application A2.
[0119] When the electronic device is a tablet computer, as shown in FIG. 8, taking application A as an example, in the case where the tablet computer does not create a clone application of application A, as shown in FIG. 8a, the tablet computer desktop 800 can include the icon 801 of application A. Optionally, the Dock bar of the tablet computer desktop 800 can also include the icon 802 of application A. In response to an operation of triggering opening of application A, for example, the operation includes an operation of triggering the icon 801 or the icon 802, and the operation of triggering application A in the application center, the tablet computer desktop 800 can display the interface 803 of application A.
[0120] In the case where the tablet computer creates a clone application A1 of application A, as shown in FIG. 8b, the tablet computer desktop 800 can include the icon 801 of application A and the icon 804 of the clone application A1. Optionally, the shortcut bar of the tablet computer desktop 800 can also include the icon 802 of application A and the icon 805 of the clone application A1. In the case where application A is opened in the tablet computer desktop 800, in response to an operation of triggering opening of the clone application A1, for example, the triggering operation includes an operation of triggering the icon 804 or the icon 805, and the operation of triggering the clone application A1 in the application center, the tablet computer desktop 800 can display the interface 806 of the clone application A1. In this way, two accounts can be used simultaneously after the user logs in different accounts.
[0121] The display region of the interface 803 and the display region of the interface 806 can be overlapped or not overlapped, which is not limited in the embodiments of the present application. It can be understood that, in the case that the display region of the interface 803 and the display region of the interface 806 are overlapped, since the moment of opening the child application A1 is later than the moment of opening the application A, the interface 806 can be displayed on the upper layer of the interface 803, so that the user can conveniently view the interface of the newly opened application, and the user experience is improved.
[0122] For the case that two or more child applications of the application A are created on the tablet computer, similar to the case of creating the child application A1 of the application A, no longer be repeated.
[0123] Optionally, the electronic device can also not create the icon of the child application A1, and the child application A1 can be opened by triggering the icon of the application A, which is not limited in the embodiments of the present application.
[0124] FIG. 9 shows an implementation process diagram of creating an application child of the application A by the electronic device.
[0125] The electronic device can display the applications supporting the application child function in the interface, for example, the applications supporting the application child function can be displayed in the interface of the setting application, which can be referred to the related description of the embodiment corresponding to FIG. 5d, and no longer be repeated.
[0126] It can be understood that, before displaying the interface shown in FIG. 5d, the electronic device can determine whether the application supports the application child function. In a possible implementation, the package manager of the electronic device can obtain the configuration information of each application. For example, the configuration information of the application A can be shown in the configuration information 901 of FIG. 9, which can include the name name of the application A, the version number versionCode of the application A, the version name versionName of the application A, and the multi-instance mode mode of the application A, etc. The multi-instance mode can be used to indicate whether the application supports the application child function. For example, the name of the application A is "com.app.a", and the version number of the application A is "1000000". In some scenarios, the multi-instance mode can also be referred to as the multi-opening mode. The version name of the application A can be "1.0.0", and the multi-instance mode of the application A is "MODE_A", which is used to indicate that the application A supports the application child function. It can be understood that the configuration information corresponding to different applications can be different, and the field identifier supporting the application child function can be integer, string, enumeration, etc. The data type is not limited in the embodiments of the present application.
[0127] Optionally, the configuration information can further include configuration information of the maximum instance number, for example, the maxNum field can be used to represent the maximum number of created instances of the application set by the application. It can be understood that on the basis of the maximum number of instances set by the application, the electronic device system can further limit the maximum number of instances that can be created by the application. Specifically, the maximum number of instances set by the application and the maximum number of instances limited by the electronic device system can be subject to the smaller value. For example, if the maximum number of instances set by the application is 10 and the maximum number of instances limited by the electronic device system is 8, the electronic device can create at most 8 instances; if the maximum number of instances set by the application is 10 and the maximum number of instances limited by the electronic device system is 12, the electronic device can create at most 10 instances. Of course, the maximum number of instances set by the application and the maximum number of instances limited by the electronic device system can also be subject to the larger value, and the embodiments of the present application are not limited.
[0128] In response to the operation of the user creating the instance A1 of the application A, the electronic device can create the instance A1. The database used by the instance A1 is different from the database used by the main application of the application A, so that the application data of the main application and the instance A1 can be stored respectively. The electronic device can distinguish the databases of the applications according to different application indexes.
[0129] The electronic device can also create a sandbox directory of the instance A1. For example, as described in the related description of the corresponding embodiment of FIG. 4, the sandbox directory of the main application of the application A can be " / data / app / … / <userid> / com.app.a", under the same user space userId, the sandbox directory of the clone application Al can be " / data / app / ..." <userid>" / 1clone.com.app.a". If the electronic device also creates a forked application A2 of the application A, the sandbox directory of the forked application A2 can be " / data / app / … / <userid>com.app.a, and so on. It can be seen that the main application and each clone application of the application A can have a corresponding sandbox respectively, and the sandbox directories are different.
[0130] It can be understood that the main application and the clone application can have application information respectively. For example, taking the application A as an example, as shown in FIG. 9, 902 of FIG. 9 is the application information of the main application of the application A, and 903 of FIG. 9 is the application information of the clone application A1 of the application A. It can be seen that the package name of the main application is com.app.a, the user space identifier userID of the main application is 101, and the value of the application index AppIndex of the main application is 0. The package name of the clone application A1 is com.app.a, the user space identifier userID of the clone application A1 is 101, and the value of the application index AppIndex of the clone application A1 is 1. That is, the package name and the user space identifier of the main application and the clone application can be the same, and the application indexes are different, so that the electronic device can distinguish the main application and each clone application based on the value of the application index.
[0131] In the embodiment of the present application, by taking the application index Index as the identification information of the clone application, the electronic device can install an application once under the same user space without modifying the application package information, and can create multiple clone applications as needed and support opening multiple clone applications at the same time. In addition, after the application is installed successfully, deleting the installation package of the application will not affect the creation, deletion and running of the subsequent clone applications.
[0132] Since the main application and each clone application can run as an independent application program respectively, for some functions provided by the electronic device, for example, but not limited to, the following functions: message notification, sharing, application lock, microphone, battery, usage statistics, application and service quota, the main application and each clone application can manage these functions independently. It can also be understood that the electronic device can uniquely determine a certain main application or clone application through the application package name and the application index, so as to realize independent management of the functions by the main application and the clone application. For example, FIGS. 10 to 16 below show the schematic diagrams of the main application and each clone application independently managing multiple functions in the electronic device.
[0133] FIG. 10 is a schematic diagram of a message notification interface displayed by the electronic device.
[0134] As shown in FIG. 10, the message notification of the application can be displayed in the lock screen interface 1000 of the electronic device. Taking the application A and the clone application A1 as an example, in the case that the application A and the clone application A1 both have message notifications, the message notification 1001 of the application A and the message notification 1002 of the clone application A1 can be displayed in the lock screen interface 1000 respectively.
[0135] The message notification 1001 of the application A can include an icon of the application A, a message contact of the application A, a message received by the application A, and / or a time length of receiving the message, etc. The message notification 1002 of the application A1 can include an icon of the application A1, a message contact of the application A1, a message received by the application A1, and / or a time length of receiving the message, etc.
[0136] By separately managing the message notifications of the application A and the application A1, the user can quickly know whether the message notification is from the main application or the cloned application, thereby distinguishing different message scenarios, efficiently processing information, and improving the user experience.
[0137] FIG. 11 is a schematic diagram of a sharing picture interface displayed by an electronic device.
[0138] As shown in FIG. 11, in the sharing picture interface 1100 of the electronic device, the picture to be shared, the devices available for sharing the picture, the application information available for sharing the picture, and other processing functions of the picture can be included. The application information can include an application icon and / or an application name, and the other processing functions of the picture can include copying the picture, printing the picture, saving the picture as another picture, adding the picture to a transfer station, etc.
[0139] Taking the application A and the application A1 supporting the sharing function as an example, the application information 1101 of the application A and the application information 1102 of the application A1 can be displayed in the sharing picture interface 1100, respectively.
[0140] Separately displaying the main application and the cloned application in the sharing picture interface can allow the user to select whether to share the picture to the main application or the cloned application, thereby providing more choices for the user and improving the user experience.
[0141] FIG. 12 is a schematic diagram of an application lock interface displayed by an electronic device.
[0142] The electronic device can include an application lock function. It can be understood that if an application is set with the application lock, identity verification will be performed before starting the application, so that the application is used by the user himself / herself, thereby protecting the privacy and security of the user.
[0143] As shown in FIG. 12, in the application lock interface 1200 of the electronic device, setting options of multiple applications can be included. For example, the setting options can include a setting option 1201 of an application A and a setting option 1202 of a cloned application A1. Taking the setting option 1201 of the application A as an example, the setting option 1201 can include an application icon, an application name, lock information and a lock switch of the application A. For example, in the case that the application A is not set with an application lock, the lock information can be displayed as "unlocked" and the lock switch is displayed as off. In the case that the application A is set with an application lock, the lock information can be displayed as "locked" and the lock switch is displayed as on.
[0144] In this way, in the application lock interface 1200, the user can set application locks for the application A and the cloned application A1 respectively according to actual needs. For example, the user can set an application lock only for the application A, set an application lock only for the cloned application A1, set application locks for both, or set no application lock for both, thereby improving the user experience.
[0145] FIG. 13 is a schematic diagram of a microphone setting interface displayed by an electronic device.
[0146] As shown in FIG. 13, in the microphone setting interface 1300 of the electronic device, setting options of multiple applications can be included. The user can set different microphone access permissions for different applications. The microphone access permissions can include permission to access the microphone only during use, permission to ask for microphone permission each time, and permission to prohibit access to the microphone.
[0147] For example, the microphone setting interface 1300 can include a setting option 1301 of an application A and a setting option 1302 of a cloned application A1. Taking the setting option 1301 of the application A as an example, the setting option 1301 can include an application icon, an application name, microphone permission information and a microphone permission setting control of the application A. The microphone permission information can be used to indicate the microphone access permission of the current application A. The microphone permission setting control can be used to set the microphone access permission of the application A.
[0148] The user can set different microphone access permissions for the application A and the cloned application A1 respectively. For example, as shown in FIG. 13, the microphone access permission of the application A can be set to permission to ask for microphone permission each time, and the microphone access permission of the cloned application A1 can be set to permission to access the microphone only during use. In this way, the user can set different microphone access permissions for the application A and the cloned application A1 according to actual needs, so that the collection of audio data by the application can be better controlled, data sharing can be reduced, and the user experience can be improved.
[0149] FIG. 14 is a schematic diagram of a battery interface displayed by an electronic device.
[0150] As shown in FIG. 14, in the battery interface 1400 of the electronic device, a statistical chart of today's screen-on time length can be included, facilitating the user to view the use of the battery power of the day; and an application power consumption ranking can also be included, facilitating the user to view the power consumption of each application.
[0151] For example, the battery interface 1400 can display the power consumption of the application A 1401 and the power consumption of the split application A1 1402 respectively. As shown in FIG. 14, the application A consumes 16% of the battery power, and the split application A1 consumes 11% of the battery power. In this way, the user can more intuitively understand the power consumption of the application A and the split application A1 respectively, so as to manage the main application and the split application differently and improve the user experience.
[0152] FIG. 15 is a schematic diagram of a use statistics interface displayed by an electronic device.
[0153] As shown in FIG. 15, in the use statistics interface 1500 of the electronic device, the statistical data of using the application can be viewed, thereby facilitating the user to understand the use of the electronic device. The use statistics interface 1500 can include "every day" and "past seven days" switching pages. Taking the "every day" switching page as an example, the "every day" switching page can include the use data of a plurality of applications, which can include the use time length of each application.
[0154] For example, taking that two split applications of the application A are created by the electronic device as an example, the use statistics interface 1500 can include the use data 1501 of the application A, and can also include the use data 1502 of the main application, the use data 1503 of the split application A1, and the use data 1504 of the split application A2. It can be understood that the use data 1501 of the application A is the sum of the use data 1502 of the main application, the use data 1503 of the split application A1, and the use data 1504 of the split application A2.
[0155] By separately counting the use data of the main application and each split application, the user can view the use data of the main application and each split application, helping them to understand the use time of each application, so as to manage different applications accordingly.
[0156] FIG. 16 is a schematic diagram of an application and service quota interface displayed by an electronic device.
[0157] The electronic device can include an application and service quota function. The user can set a use time limit for a certain application, and when the set time limit is reached, the application cannot be used continuously, and the user needs to input a password or wait for the next time period to use the application again.
[0158] As shown in FIG. 16a, taking an example of creating two instances of application A by an electronic device, in the application and service quota interface 1600 of the electronic device, a setting item 1601 of application A can be displayed. The setting item 1601 can include an icon of application A, an application name of application A, a prompt information 1602, a view icon 1603, a selected information 1604 and a selection box 1605.
[0159] The prompt information 1602 can be used to prompt the user to view and set the related information of the instances of application A, and the content of the prompt information 1602 can include “click to view instances”. The selected information 1604 can be used to indicate the selection of the main application and / or the instances of application A. Optionally, in response to the operation of triggering the selection box 1605, the selected information 1604 can be displayed as “select all”.
[0160] In response to the operation of triggering the setting item 1601, the prompt information 1602 and / or the view icon 1603, the application and service quota interface 1600 can be as shown in FIG. 16b. The prompt information 1602 in the interface 1600 can be displayed as “click to collapse”, and the view icon 1603 can be updated to a collapse icon 1603. The interface 1600 can further display a setting item 1606 of the main application, a setting item 1607 of the instance A1 and a setting item 1608 of the instance A2. The setting item 1606 can include a selection box 1609, the setting item 1607 can include a selection box 1610, and the setting item 1608 can include a selection box 1611. The user can trigger the selection box 1609 to select the main application, trigger the selection box 1610 to select the instance A1, and trigger the selection box 1611 to select the instance A2.
[0161] It can be understood that when the selection box 1609, the selection box 1610 and the selection box 1611 are all in the unselected state, the selected information 1604 can be displayed as “0 items selected”. When any one of the selection box 1609, the selection box 1610 or the selection box 1611 is in the selected state, the selected information 1604 can be displayed as “1 item selected”. As shown in FIG. 16c, taking an example of selecting the selection box 1609, the selection box 1609 can be displayed in the selected state.
[0162] Similarly, when any two of the selection box 1609, the selection box 1610 or the selection box 1611 are in the selected state, the selected information 1604 can be displayed as “2 items selected”. When the selection box 1609, the selection box 1610 and the selection box 1611 are all in the selected state, the selected information 1604 can be displayed as “select all”. Optionally, when at least one of the selection box 1609, the selection box 1610 or the selection box 1611 is in the selected state, the selection box 1605 can be displayed in the selected state.
[0163] Optionally, after any one of the selection box 1609, the selection box 1610 or the selection box 1611 is selected, in response to an operation of triggering the folding-up icon 1603, the application and service quota interface 1600 can be as shown in FIG. 16d. The selected information 1604 can be displayed as "1 item selected", and the selection box 1605 can be displayed in a selected state.
[0164] By separately controlling the usage time limit of the application and the usage time limit of the clone application, the user can better manage the main application and the clone application. The user can flexibly set the usage time limit of the main application and the usage time limit of the clone application according to the user's own needs, and meet the personalized management needs.
[0165] It can be understood that the electronic device can also delete the clone application or uninstall the clone application based on the triggering operation of the user. The following takes a mobile phone as an example to illustrate.
[0166] In an implementation of deleting a clone application, as shown in FIG. 17, the electronic device can display an application A detail interface 1700. It can be understood that the specific interface 1700 can refer to the related description of the corresponding embodiments of FIGS. 5 and 6 above to enter the application A detail interface 1700 shown in FIG. 17a. The application A detail interface 1700 is similar to the application A detail interface 601 in FIG. 6d, and will not be repeated here.
[0167] Taking deleting the clone application A2 of the application A as an example, in response to an operation of triggering the delete control 1701 of the clone application A2, the electronic device can display a pop-up window 1702 as shown in FIG. 17b. The specific display position of the pop-up window 1702 in the interface is not limited in the embodiments of the present application. The pop-up window 1702 can include the application icon of the clone application A1, the pop-up window title 1703, the prompt information 1704, the cancel control 1705 and the confirm control 1706.
[0168] The pop-up window title 1703 can be used to prompt the user whether to delete the application A2, for example, the content of the pop-up window title 1703 can include "Do you want to delete 'application A2'?". The prompt information 1704 can be used to prompt the user the information related to deleting the application A2, for example, the content of the prompt information 1704 can include "After deletion, the data of the clone application will be permanently deleted". The content of the pop-up window title 1703 and the prompt information 1704 is not limited in the embodiments of the present application.
[0169] The cancel control 1705 can be used to indicate canceling the deletion of the application A2. In response to an operation of triggering the cancel control 1705, the electronic device can cancel the display of the pop-up window 1702, and display the application A detail interface 1700 as shown in FIG. 17a, without executing the process of deleting the application A2.
[0170] The determination control 1706 can be used to represent the determination to delete the application A2. In response to the operation of triggering the determination control 1706, the electronic device can cancel the display of the pop-up window 1702, delete the application A2, and display the application A detail interface 1700 as shown in FIG. 17c.
[0171] The electronic device can further delete the application A1. The process of deleting the application A1 is similar to that of deleting the application A2. After deleting the application A1, the electronic device can display the interface as shown in FIG. 6a, and details are not repeated.
[0172] It can be understood that after deleting the application A2, the icon of the application A2 is no longer displayed on the desktop of the electronic device; after deleting the application A1, the icon of the application A1 is no longer displayed on the desktop of the electronic device.
[0173] Optionally, in response to the operation of triggering the delete control 1701, the electronic device can delete the application A1 and display the desktop as shown in FIG. 17c. That is, in response to the operation of triggering the delete control 1701, the electronic device can not display the pop-up window 1702 as shown in FIG. 17b, but display the desktop as shown in FIG. 17c and delete the application A1.
[0174] In another implementation of deleting the application A1, as shown in FIG. 18a, the desktop 1800 of the electronic device can display the icon of the application A, the icon of the application A1 and the icon of the application A2 1801. It can be understood that the specific desktop 1800 is similar to the desktop 700 of FIG. 7c, and details are not repeated.
[0175] In response to the operation of triggering the icon 1801 of the application A2, as shown in FIG. 18b, the electronic device can perform partial grayscale display on the desktop 1800, for example, the electronic device can perform grayscale display on the application icons in the desktop 1800 except the application A2, including performing grayscale display on the icon of the application A and the icon of the application A1. In this way, the desktop 1800 can highlight the change of the interface after triggering the icon 1801 of the application A2, and improve the visual experience of the user.
[0176] The electronic device can also display a selection box of the icon 1801, which can include a sharing option 1802 and a delete option 1803. The sharing option 1802 can be used to share the application A2 with other users through other devices or other applications. The delete option 1803 can be used to delete the application A2.
[0177] In response to the operation of triggering the deletion option 1803, as shown in FIG. 18c, the electronic device can display a pop-up window 1804. The specific pop-up window 1804 can refer to the related description of the pop-up window 1702 shown in FIG. 17b described above, and will not be described again. In response to the operation of triggering the cancel control 1805, the electronic device can cancel the display of the pop-up window 1804, and display the desktop 1800 as shown in FIG. 18a, without performing the process of deleting the clone application A2. In response to the operation of triggering the confirm control 1806, the electronic device can cancel the display of the pop-up window 1804, delete the clone application A2, and display the desktop as shown in FIG. 18d.
[0178] Optionally, in response to the operation of triggering the deletion option 1803, the electronic device can delete the clone application A2, and display the desktop as shown in FIG. 18d. That is, in response to the operation of triggering the deletion option 1803, the electronic device can not display the pop-up window 1804 shown in FIG. 18c, but display the desktop shown in FIG. 18d, and delete the clone application A2.
[0179] In an implementation of uninstalling a clone application, as shown in FIG. 19a, the desktop 1900 of the electronic device can display an icon 1901 of the application A, an icon of the clone application A1, and an icon of the clone application A2. It can be understood that the specific desktop 1900 is similar to the desktop 1800 of FIG. 18a, and will not be described again.
[0180] In response to the operation of triggering the icon 1901 of the application A, as shown in FIG. 19b, the electronic device can perform partial grayscale display on the desktop 1900, for example, the electronic device can perform grayscale display on the application icons in the desktop 1900 except the application A, including grayscale display on the icon of the clone application A1 and the icon of the clone application A2. In this way, the interface change after triggering the icon 1901 of the application A in the desktop 1900 can be highlighted, and the visual experience of the user can be improved.
[0181] The electronic device can display a selection box of the icon 1901, which can include a sharing option 1902 and an uninstallation option 1903. The sharing option 1902 can be used to share the application A to other users through other devices or other applications. The uninstallation option 1903 can be used to uninstall the application A.
[0182] In response to the operation of triggering the uninstallation option 1903, as shown in FIG. 19c, the electronic device can display a pop-up window 1904. The display position of the specific pop-up window 1904 in the interface is not limited in the embodiments of the present application. The pop-up window 1904 can include an application icon of the clone application A, a pop-up window title 1905, a cancel control 1906, and a confirm control 1907.
[0183] The pop-up title 1905 can be used to prompt the user whether to delete the application A, for example, the content of the pop-up title 1905 can include "Do you want to delete 'application A'?" The content of the specific pop-up title 1905 is not limited in the embodiments of the present application.
[0184] The cancel control 1906 can be used to indicate canceling uninstalling the application A. In response to an operation of triggering the cancel control 1906, the electronic device can cancel the display of the pop-up 1904, and display the desktop 1900 as shown in FIG. 19a, without executing the process of uninstalling the application A.
[0185] The determination control 1907 can be used to indicate determining to uninstall the application A. In response to an operation of triggering the determination control 1907, the electronic device can cancel the display of the pop-up 1904, and the electronic device can display the pop-up 1908 as shown in FIG. 19d. The display position of the specific pop-up 1908 in the interface is not limited in the embodiments of the present application. The pop-up 1908 can include the application icon of the application A, a pop-up title 1909, a prompt information 1910, a cancel control 1911 and a determination control 1912.
[0186] The pop-up title 1909 can be used to further prompt the user whether to delete the application A, for example, the content of the pop-up title 1909 can include "Do you want to delete 'application A'?" The prompt information 1910 can be used to prompt the user the information related to deleting the application A2, for example, the content of the prompt information 1910 can include "The application A2 associated therewith is also uninstalled". The content of the specific pop-up title 1909 and the prompt information 1910 is not limited in the embodiments of the present application.
[0187] The cancel control 1911 can be used to indicate canceling uninstalling the application A. In response to an operation of triggering the cancel control 1911, the electronic device can cancel the display of the pop-up 1908, and display the desktop 1900 as shown in FIG. 19a, without executing the process of uninstalling the application A.
[0188] The determination control 1912 can be used to indicate determining to uninstall the application A. In response to an operation of triggering the determination control 1912, the electronic device can cancel the display of the pop-up 1908, uninstall the application A, and uninstall one or more application instances created based on the application A, for example, including the application instance A1 and the application instance A2, and display the desktop 1900 as shown in FIG. 19e.
[0189] Optionally, in response to triggering the uninstall option 1903 or determining the operation of the control 1907, the electronic device can uninstall the application A, and uninstall one or more child applications created based on the application A, and display the desktop 1900 as shown in FIG. 19e. That is, in response to triggering the uninstall option 1903 or determining the operation of the control 1907, the electronic device can not display the pop-up window 1908 as shown in FIG. 19d, but display the desktop 1900 as shown in FIG. 19e, and uninstall the application A, and uninstall one or more child applications created based on the application A.
[0190] Optionally, the electronic device can further uninstall the master application from the settings application, and the embodiments of the present application do not limit the manner of uninstalling the master application.
[0191] It can be understood that for a tablet computer, the electronic device can provide multiple entry points to delete a child application.
[0192] In a possible implementation, a user can delete a child application from an application center. For example, in response to triggering an operation of deleting a child application in the application center, for example, the triggering operation can include right-clicking an icon of the child application by a mouse, and selecting a delete option, the electronic device can delete the child application.
[0193] Optionally, in response to triggering an operation of deleting a child application in the application center, the electronic device can further display a prompt box. For example, the prompt box can be as shown in FIG. 18c, and details are not described herein again.
[0194] In a possible implementation, the operating system of the electronic device can further support starting multiple application instances of an application. As shown in FIG. 20, taking the application A as an example, the electronic device can support creating multiple application instances of the application A, and each application instance can use an internal index key as identification information of the application instance to distinguish between the application instances. In this way, the electronic device can associate the application instances by using the internal index keys, and perform multi-process management on the application instances. It can be understood that since the package name and the application index index of the multiple application instances are the same as those of the application A, the system permissions and parameter configurations of the multiple application instances are the same.
[0195] For example, the internal index key of the application instance 1 of the application A can be set to 1, and the internal index key of the application instance 2 of the application A can be set to 2. In actual cases, the internal index keys can be other values, and the internal index keys can also be set to other data types, as long as each different application instance can be distinguished by using the internal index. The embodiments of the present application do not limit the value of the internal index.
[0196] Taking the application A as an example, FIG. 21 shows a schematic diagram of an application child running framework of the application A.
[0197] In response to triggering the operation of starting the application A by the desktop application, the desktop application can query the multi-instance mode of the application A and the maximum number of application instances that can be created based on the package manager. It can be understood that the application A can configure whether to support the multi-instance running of the application in the configuration information, and the package manager can obtain the configuration information of the application A.
[0198] For example, the configuration information of the application A can be as shown in the configuration information 2101 of FIG. 21, and the configuration information 2101 can include the name of the application A, the version number of the application A, the version name of the application A, the multi-instance mode of the application A, and the maximum number of instances of the application A. Among them, the multi-instance mode can be used to indicate whether the application supports the multi-instance of the application, and the maximum number of instances can be used to indicate the maximum number of application instances that can be created by the application.
[0199] For example, the name of the application A is "com.app.a", the version number of the application A is "1000000", the version name of the application A can be "1.0.0", the multi-instance mode of the application A is "MODE_B", which is used to indicate that the application A supports the multi-instance of the application, and the maximum number of instances of the application A is 10, which is used to indicate that the application sets a maximum of 10 application instances that can be created. It can be understood that the configuration information corresponding to different applications can be different, and the field identifier supporting the multi-instance of the application can be an integer, a string, an enumeration, and the like, which is not limited by the embodiments of the present application.
[0200] It can be understood that on the basis of the maximum number of instances set by the application, the electronic device system can further limit the maximum number of application instances that can be created. The maximum number of instances set by the application and the maximum number of instances limited by the electronic device system are subject to the smaller value. For example, if the maximum number of instances set by the application is 10 and the maximum number of instances limited by the electronic device system is 8, the electronic device can create a maximum of 8 application instances; if the maximum number of instances set by the application is 10 and the maximum number of instances limited by the electronic device system is 12, the electronic device can create a maximum of 10 application instances.
[0201] Of course, the maximum number of instances set by the application and the maximum number of instances limited by the electronic device system can also be subject to the larger value, which is not limited by the embodiments of the present application.
[0202] As shown in FIG. 21, two application instances of application A, i.e., application instance 1 and application instance 2, are created by the electronic device, and the internal index values of the application instance 1 and the application instance 2 are different. For example, the internal index value key of the application instance 1 is 1, and the internal index value key of the application instance 2 is 2. In this way, the electronic device can distinguish the respective application instances based on the internal index values.
[0203] In response to triggering the operation of starting the application A, the electronic device can determine whether to run the application instance 1 or the application instance 2 according to the value of the internal index key. In a possible implementation, in the case that the user selects to start the application instance 1, the desktop application obtains the internal index value key of the application instance 1, which is 1, and the desktop application can call the startAbilityWithKey() function to pass the value 1 of the internal index key to the activity manager. In this way, the activity manager can determine to run the application instance 1 based on the internal index value. Similarly, in the case that the user selects to start the application instance 2, the desktop application obtains the internal index value key of the application instance 2, which is 2, and the desktop application can call the startAbilityWithKey() function to pass the value 2 of the internal index key to the activity manager. In this way, the activity manager can determine to run the application instance 2 based on the internal index value. It can be understood that the startAbilityWithKey() function can also have other names in different electronic devices, and the embodiments of the present application are not limited in this regard as long as the corresponding functions can be implemented.
[0204] As shown in the activity manager 2102 of FIG. 21, the application instance 1 and the application instance 2 can respectively run respective activity components, extension services, etc. For example, the application instance 1 can run one or more activity components, such as activity component 1 and activity component 2, etc. The application instance 2 can also run one or more activity components, such as activity component 1 and activity component 2, etc.
[0205] It can be understood that, as shown in the application A sandbox 2103 of FIG. 21, the application instance 1 and the application instance 2 both use the sandbox of the application A. It can also be understood that the application instance 1 and the application instance 2 share the sandbox data of the application A. In the sandbox of the application A, the electronic device can create different application instances for the application instance 1 and the application instance 2, and distinguish them by the internal index key.
[0206] In the embodiments of the present application, by using the internal index key as the identification information of the application instance, the electronic device can open multiple application instances without modifying the application package information and installing the application once in the same user space. In addition, after the application is installed successfully, deleting the installation package of the application will not affect the subsequent running of the multiple application instances.
[0207] For multiple application instances of the application A, the interface of the electronic device can also display the interfaces corresponding to the multiple application instances. It can be understood that different electronic devices can have different display effects in the interface. The following takes a tablet computer as an example for illustration.
[0208] As shown in FIG. 22a, the tablet computer desktop 2200 can include an icon 2201 of the application A. Optionally, the Dock bar of the tablet computer desktop 2200 can also include an icon 2202 of the application A.
[0209] It can be understood that in response to each triggering operation of opening the application A, the electronic device can create an application instance of the application A and start a login window. For example, in response to triggering 2 times of opening the application A, for example, the triggering operation includes double-clicking the icon 2201 or the icon 2202, or triggering the application A in the application center, the tablet computer desktop 2200 can display 2 login windows of the application A, which are a login window 2203 and a login window 2204.
[0210] In response to triggering the application A, for example, the triggering operation includes clicking the icon 2202 by the user, single-clicking the icon 2202 by the mouse, or moving the mouse to the icon 2202, the tablet computer desktop 2200 can display a selection box 2205 of the login window, in which the user can select the window to be logged in.
[0211] As shown in FIG. 22b, in the case that the login window 2203 and the login window 2204 are logged in in sequence, the tablet computer desktop 2200 can display an interface 2206 of the application instance 1 of the application A and an interface 2207 of the application instance 2 of the application A. In this way, when the user logs in different accounts, the two accounts can be used simultaneously.
[0212] The display area of the interface 2206 and the display area of the interface 2207 can be overlapped or not overlapped, which is not limited in the embodiments of the present application. It can be understood that in the case that the display area of the interface 2206 and the display area of the interface 2207 are overlapped, the interface of the application instance logged in later can be displayed above the interface of the application instance logged in earlier, so that the user can conveniently view the interface of the newly logged in application instance, and the user experience is improved.
[0213] In response to triggering the application A, for example, the triggering operation includes clicking the icon 2202 by the user, single-clicking the icon 2202 by the mouse, or moving the mouse to the icon 2202, the tablet computer desktop 2200 can display an application interface selection box 2208, in which the user can select the application interface to be operated.
[0214] Optionally, the electronic device can also create icons for the multiple application instances, so that the user can open the individual application instances by triggering operations of the icons, and the embodiments of the present application do not make any limitation.
[0215] The electronic device can receive the message notifications of the individual application instances of application A and display them on the desktop. It can be understood that, since the electronic device can perform multi-process management on the individual application instances and the individual application instances share the sandbox data of application A, the electronic device can display the message notifications of the individual application instances in the message notification area of application A.
[0216] As shown in FIG. 23, the notification center window 2301 can be displayed in the tablet desktop 2300. The notification center window 2301 can display the notification messages of the individual applications received by the electronic device. For example, in the case where the electronic device receives the notification messages of application A, the notification center window 2301 can include the message notification area 2302 of application A. For example, message 1 is from application instance 1, message 2 is from application instance 2, and message 3 is from application instance 3, and the electronic device can display the notification message 2303 of application instance 1, the notification message 2304 of application instance 2, and the notification message 2305 of application instance 3 in the message notification area 2302 of application A. The notification message can include the contact avatar, the contact, the message, and / or the message duration, etc. In this way, the electronic device can display the messages of the individual application instances in the desktop 2300, so as to facilitate the user to view and process the messages in time.
[0217] It can be understood that the interfaces provided by the embodiments of the present application are exemplary interfaces. Each interface can include more or less content and controls, and the embodiments of the present application do not make any limitation on the content and controls included in each interface.
[0218] FIG. 24 shows a method for creating an application instance according to an embodiment of the present application. The method is applied to an electronic device, and includes:
[0219] S2401, in response to a first operation of triggering the creation of a child application of a main application, creating a first child application, wherein the package name of the first child application is the same as the package name of the main application, and the application identifier of the first child application is different from the application identifier of the main application.
[0220] In the embodiments of the present application, the main application can be understood as any application in the electronic device that supports the function of creating a child application, for example, the main application can be understood as application A in the above.
[0221] The first operation can be understood as an operation of creating a child application of a main application. For example, the first operation can include an operation of triggering the creation of the child control 6013 in the interface 601 of a in FIG. 6.
[0222] The application identifier can be understood as the application index in the foregoing. For example, the application identifier of the main application can be 0, and the application identifier of the first clone application can be 1. The application identifier can be other values, and can also be set to other data types, which are not limited in the embodiments of the present application, as long as the main application and each clone application can be distinguished by the application identifier.
[0223] S2402, in response to triggering a second operation of creating a clone application of the main application, creating a second clone application, wherein the package name of the second clone application is the same as the package name of the main application, and the application identifier of the second clone application is different from the application identifier of the main application and the application identifier of the first clone application.
[0224] In the embodiments of the present application, the second operation can be understood as an operation of creating a second clone application of the main application. For example, the second operation can include triggering the operation of creating the clone control 6013 in the interface 601 of FIG. 6c.
[0225] The value of the application identifier of the second clone application can be 2, for example. The application identifier of the second clone application is different from the application identifier of the main application and the application identifier of the first clone application, so that different application identifiers can be used to distinguish each clone application, each clone application can be run as an independent application, and the system service of the electronic device can manage the clone applications as independent applications.
[0226] Optionally, on the basis of the embodiments corresponding to FIG. 24, the first clone application has a corresponding application icon; and the second clone application has a corresponding application icon.
[0227] It can be understood that the icons of each clone application and the icon of the main application can be the same or different, which is not limited in the embodiments of the present application. In a possible implementation, the electronic device can add some icon identifiers to the icon of the main application as the icon of the clone application, so that the user can easily distinguish whether it is the main application or the clone application, and the visual experience of the user is improved.
[0228] Optionally, on the basis of the embodiments corresponding to FIG. 24, the main application, the first clone application and the second clone application are in the same user space.
[0229] It can be understood that the electronic device can create a directory for the first clone application and the second clone application in the same user space as the main application. In this way, the electronic device does not need to create multiple user spaces for each clone application, and only needs to generate an additional package information, so as not to occupy the file storage space of multiple user spaces, thereby reducing resource consumption and storage space consumption.
[0230] Optionally, based on the corresponding embodiment of FIG. 24, the main application has a corresponding first sandbox, the first clone application has a corresponding second sandbox, and the second clone application has a corresponding third sandbox; wherein the identifier of the first sandbox is the same as the application identifier of the main application, the identifier of the second sandbox is the same as the application identifier of the first clone application, and the identifier of the third sandbox is the same as the application identifier of the second clone application.
[0231] In the embodiments of the present application, as shown in FIG. 3, the identifier of the sandbox of the main application and the application identifier of the main application can both be Index=0, the identifier of the sandbox of the first clone application and the application identifier of the first clone application can both be Index=1, and the identifier of the sandbox of the first application and the application identifier of the second clone application can both be Index=2.
[0232] The electronic device allocates different sandbox directories for the main application, the clone application A1 and the clone application A2 of the application A. In this way, the data and code of the main application and each clone application can be isolated by the sandbox, so that the data of the main application and each clone application does not interfere with each other, thereby improving the security and stability of the system.
[0233] Optionally, based on the corresponding embodiment of FIG. 24, the method further includes: in response to a third operation triggered by the user, implementing a target function of the main application; in response to a fourth operation triggered by the user, implementing a target function of the first clone application; and in response to a fifth operation triggered by the user, implementing a target function of the second clone application; wherein the target function includes one or more of the following: a message notification function, a picture sharing function, an application lock function, a microphone function, a battery statistics function, an application and service quota function, or a usage behavior statistics function.
[0234] In the embodiments of the present application, the third operation can be understood as an operation of triggering viewing of a target function of the main application, the fourth operation can be understood as an operation of triggering viewing of a target function of the first clone application, and the fifth operation can be understood as an operation of triggering viewing of a target function of the second clone application.
[0235] The electronic device implements a target function for the main application and each clone application respectively. In this way, the electronic device can manage the clone applications as independent applications, thereby achieving independent management of system permissions, parameter configurations, etc. of each clone application, and improving the user experience.
[0236] For example, by separately managing the message notifications of the main application and the respective child applications, the user can quickly understand whether the message notification is from the main application or the child application, thereby distinguishing different message scenarios and efficiently processing information. In the sharing image interface, the main application and the respective child applications are displayed separately, and the user can select whether to share the image to the main application or the child application, thereby providing more choices for the user. The user can set application locks for the main application and the respective child applications according to actual needs, thereby performing different permission protection on the respective applications. The user can also set different microphone access permissions for the main application and the respective child applications according to actual needs, thereby better controlling the collection of audio data by the applications and reducing data sharing. By separately counting the battery usage of the main application and the respective child applications, the user can more intuitively understand the respective power consumption of the main application and the respective child applications, thereby performing different management on the main application and the respective child applications. Separately controlling the usage time limit of the main application and the respective child applications can help the user better manage the main application and the respective child applications. The user can flexibly set the usage time limit of the main application and the respective child applications according to own needs, thereby meeting the personalized management needs. The application and service quota function can facilitate the user to view the usage data of the main application and the respective child applications, help them understand the usage time of the respective applications, and thereby perform corresponding management on different applications.
[0237] Optionally, based on the embodiment of FIG. 24, the main application has corresponding configuration information, and the configuration information is used to identify that the main application supports creating a child application.
[0238] In the embodiment of the present application, the configuration information can be understood as the "MODE_A" of the multi-instance mode of the application A in the above. It can be understood that the configuration information corresponding to different applications can be different, and the configuration information can be an integer, a string, an enumeration, a Boolean, etc. The embodiment of the present application is not limited. For example, the configuration information can be configuration information in the configuration file of the main application, or can be a certain field pre-configured in the electronic device, and the embodiment of the present application is not limited.
[0239] It can be understood that the configuration information can be separated from the code, and the developer can more easily modify the behavior of the application program without changing the code, which improves the flexibility and maintainability of the application program. The electronic device can determine whether the main application supports creating a child application according to the configuration information in the main application, thereby providing different interactive experiences for the user.
[0240] Optionally, based on the embodiment of FIG. 24, the method further includes: in response to a sixth operation of triggering deletion of the first child application, deleting the first child application, the application identifier of the first child application, and the icon of the first child application.
[0241] In the embodiments of the present application, the sixth operation can be understood as an operation of deleting the first cloned application. In a possible implementation, the electronic device can delete the first cloned application from the settings application, for example, the sixth operation can include an operation of triggering the delete control 1701 in the interface 1700 of FIG. 17, or an operation of triggering the confirm control 1706. In another possible implementation, the electronic device can delete the first cloned application from the desktop, for example, the sixth operation can include an operation of triggering the delete option 1803 in the interface 1800 of FIG. 18, or an operation of triggering the confirm control 1806.
[0242] When deleting a certain cloned application, the electronic device can delete the application identifier and the icon corresponding to the cloned application, thereby better maintaining the running of the application, correctly displaying the interface information, and reducing the residual of useless information in the case of deleting the cloned application.
[0243] Optionally, based on the embodiments corresponding to FIG. 24, the method further includes: in response to a seventh operation of triggering uninstallation of the main application, uninstalling the main application, the first cloned application and the second cloned application, and deleting the application identifier of the main application, the application identifier of the second cloned application and the application identifier of the third cloned application.
[0244] In the embodiments of the present application, the seventh operation can be understood as an operation of uninstalling the main application. The electronic device can uninstall the main application from the desktop, for example, the seventh operation can include an operation of triggering the uninstallation option 1903 in the interface 1900 of FIG. 19, or an operation of triggering the confirm control 1907 or the confirm control 1912, etc. Optionally, the electronic device can also uninstall the main application from the settings application, and the embodiments of the present application do not limit the manner of uninstalling the main application.
[0245] When uninstalling a certain main application, the electronic device can delete the cloned application corresponding to the main application, and delete the application identifier and the icon, thereby maintaining the consistency of the data, and also simplifying the user operation, so that the user does not need to manually delete the cloned application again, and the user experience is improved.
[0246] Optionally, based on the embodiments corresponding to FIG. 24, the method includes: in response to an eighth operation of triggering creation of a cloned application of the main application, creating an Nth cloned application, wherein the package name of the Nth cloned application is the same as the package name of the main application, the application identifier of the Nth cloned application is different from the application identifier of the main application and the application identifiers of other cloned applications of the main application, N is a positive integer, and N is less than or equal to the first preset value.
[0247] In the embodiments of the present application, the eighth operation can be understood as an operation of creating a child application of the host application. For example, the eighth operation can include an operation of triggering the creation of the child control 6013 in the interface 601 of Fig. 6a, or an operation of triggering the creation of the child control 6013 in the interface 601 of Fig. 6c.
[0248] The electronic device can create one or more child applications. The first preset value can be understood as the maximum number of child applications of the host application allowed to be created in the electronic device. It can be understood that the first preset value can be pre-set by the electronic device, can be configured by the host application, or can be determined based on the settings of the electronic device and the configuration of the host application.
[0249] In a possible implementation, the maximum number of child applications supported by the host application to be created is m, and the maximum number of child applications limited by the electronic device to be created is n. If m is greater than or equal to n, the electronic device supports the creation of at most n child applications of the host application; if m is less than n, the electronic device supports the creation of at most m child applications of the host application. Of course, the larger of the two can also be taken as the maximum number of child applications supported to be created, and the embodiments of the present application are not limited.
[0250] It can be understood that running too many child applications can reduce the performance of the electronic device, making the response of the electronic device slower. Setting the maximum number of child applications to be created can reduce the situation of system overload, thereby better managing system load and improving the reliability and stability of the electronic device.
[0251] Optionally, based on the embodiments corresponding to Fig. 24, the method further includes: in response to a ninth operation of triggering the opening of the second application, creating a first application instance of the second application, wherein the package name of the first application instance is the same as the package name of the second application, and the application identifier of the first application instance is the same as the application identifier of the second application; in the case that the first application instance is created, in response to a tenth operation of triggering the opening of the second application, creating a second application instance of the second application, wherein the package name of the second application instance is the same as the package name of the second application, the application identifier of the second application instance is the same as the application identifier of the second application, and the instance identifier of the second application instance is different from the instance identifier of the first application instance.
[0252] In the embodiments of the present application, the second application can be understood as any application in the electronic device that supports the creation of multiple application instances, for example, the second application can include the application A in the foregoing. The first application instance can include the application instance 1 of the application A, and the second application instance can include the application instance 2 of the application A.
[0253] The ninth operation can be understood as an operation of creating an application instance of the second application. The tenth operation can be understood as an operation of creating another application instance of the second application. Illustratively, the ninth operation and the tenth operation can respectively include operations of double-clicking the icon 2201 or the icon 2202 in the interface 2200 of FIG. 22a.
[0254] The instance identifier can be understood as the internal index key in the foregoing. For example, the instance identifier of the first application instance can take a value of 1, and the instance identifier of the second application instance can take a value of 2. In actual cases, the instance identifier can respectively take other values, and the instance identifier can also be set as other data types, as long as each different application instance can be distinguished by the instance identifier. The application embodiments do not limit the value of the instance identifier.
[0255] It can be understood that, in the case where the electronic device runs the first application instance and the second application instance, in response to triggering an operation of stopping running the first application instance or logging out of the first application instance, the electronic device can also continue to run the second application instance. That is, the first application instance and the second application instance can be independently and concurrently run, and stopping running or logging out of one application instance does not affect the running of other application instances.
[0256] The first application instance and the second application instance can share the sandbox of the second application, create one or more application instances of the second application, and the user can simultaneously log in to multiple different accounts and perform different task processing, thereby meeting the needs of the user for different application scenarios and improving the user experience.
[0257] Optionally, on the basis of the embodiment corresponding to FIG. 24, the second application has corresponding configuration information, and the configuration information is used to identify that the second application supports creating application instances; and the maximum number of application instances supported by the second application to be created is less than or equal to the second preset.
[0258] In the application embodiments, the configuration information can be understood as the multi-instance mode "MODE_B" of the application A in the foregoing. It can be understood that the configuration information corresponding to different applications can be different, and the configuration information can be of data types such as integer, string, and enumeration, and the application embodiments do not limit the configuration information. In a possible implementation, the configuration information can be configuration information in a configuration file configured by the second application, or can be a certain field pre-configured in the electronic device, and the application embodiments do not limit the configuration information.
[0259] It can be understood that the configuration information can be separated from the code, and the developer can more easily modify the behavior of the application program without changing the code, which improves the flexibility and maintainability of the application program. The electronic device can determine, according to the configuration information in the second application, whether the second application supports creating multiple application instances, thereby providing different interactive experiences for the user.
[0260] The electronic device can create one or more application instances. The second preset value can be understood as a maximum number of application instances of the second application allowed to be created in the electronic device. It can be understood that the second preset value can be pre-set by the electronic device, configured by the second application, or determined based on the settings of the electronic device and the configuration of the second application.
[0261] In a possible implementation, the maximum number of application instances supported by the second application to be created is p, and the maximum number of application instances limited by the electronic device to be created is q. If p is greater than or equal to q, the electronic device supports creating a maximum of q application instances of the second application; if p is less than q, the electronic device supports creating a maximum of p application instances of the second application. Of course, the larger of the two can also be taken as the maximum number of application instances supported to be created, and the embodiments of the present application are not limited.
[0262] It can be understood that since each application instance will consume certain system resources, setting the maximum number of application instances to be created can reduce resource contention and excessive consumption, reduce the impact on the performance of the electronic device, and enable the system to run stably.
[0263] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0264] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the method steps of each example described in the embodiments disclosed in the present text, the present application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed by hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians 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 present application.
[0265] The embodiments of the present application can divide the functions of the device implementing the method according to the method examples described above into function modules. 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 implemented in the form of hardware or in the form of a 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, another division manner can be used.
[0266] FIG. 25 shows a structure diagram of a chip provided by an embodiment of the present application. The chip 2500 includes one or more (including two) processors 2501, a communication line 2502, a communication interface 2503, and a memory 2504.
[0267] In some embodiments, the memory 2504 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.
[0268] The method described in the embodiments of the present application can be applied to the processor 2501 or implemented by the processor 2501. The processor 2501 can be an integrated circuit chip with a processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 2501 or an instruction in the form of software. The processor 2501 described above can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, a discrete gate or transistor logic device, or a discrete hardware component, the processor 2501 can implement or execute the disclosed processing-related methods, steps and logic block diagrams in the embodiments of the present application.
[0269] The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium mature in the art, such as a random access memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable read-only memory (EEPROM). The storage medium is located in the memory 2504, and the processor 2501 reads the information in the memory 2504 and combines the hardware to complete the steps of the above method.
[0270] The processor 2501, the memory 2504 and the communication interface 2503 can communicate through the communication line 2502.
[0271] In the above embodiments, the instructions stored in the memory and executed by the processor can be implemented in the form of a computer program product. The computer program product can be written in the memory in advance, or downloaded and installed in the memory in the form of software.
[0272] The embodiments of the present application also provide a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from the site of one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (such as infrared, wireless, microwave, etc.)) way. The computer-readable storage medium can be any available medium that the computer can store or the data storage device such as server, data center, etc. integrated with one or more available media sets. For example, the available media can include magnetic media (such as floppy disk, hard disk or magnetic tape), optical media (such as digital versatile disc (DVD)) or semiconductor media (such as solid state disk (SSD)) and the like.
[0273] The embodiments of the present application also provide a computer-readable storage medium. The methods described in the above embodiments can be implemented all or partially by software, hardware, firmware or any combination thereof. The computer-readable medium can include computer storage medium and communication medium, and can also include any medium that can transfer computer programs from one place to another. The storage medium can be any target medium that can be accessed by a computer.
[0274] As a possible design, the computer readable medium can include a compact disc read-only memory (CD-ROM), a RAM, a ROM, an EEPROM, or other optical disk storage; the computer readable medium can include a magnetic disk storage or other magnetic disk storage device. Moreover, any connection line can also be properly referred to as a computer readable medium. For example, if software is transmitted from a website, a server, or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a DSL, or wireless technology (such as infrared, radio, and microwave), the coaxial cable, the optical fiber cable, the twisted pair, the DSL, or the wireless technology (such as infrared, radio, and microwave) is included in the definition of the medium. As used herein, a disk and a disc include a compact disc (CD), a laser disc, an optical disc, a digital versatile disc (DVD), a floppy disk, and a Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.
[0275] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems) and computer program products according to embodiments of the present application. It is understood that each flow and / or block in the flowcharts and / or block diagrams, and a combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions, which are executed via the computer or other programmable data processing apparatus, generate a means for implementing the functions specified in the flowchart one or more flows and / or blocks and / or block diagram one or more blocks.< / userid> < / userid> < / userid> < / userid> < / userid> < / userid>
Claims
1. A method for applying clones to electronic devices, characterized in that, The method comprises: in response to a first operation of triggering creation of a clone application of a main application, creating a first clone application, wherein the package name of the first clone application is the same as the package name of the main application, and the application identifier of the first clone application is different from the application identifier of the main application; in response to a second operation of triggering creation of a clone application of the main application, creating a second clone application, wherein the package name of the second clone application is the same as the package name of the main application, and the application identifier of the second clone application is different from the application identifier of the main application and the application identifier of the first clone application.
2. The method of claim 1, wherein, The first clone application has a corresponding application icon; the second clone application has a corresponding application icon.
3. The method of claim 1 or 2, wherein, The main application, the first clone application and the second clone application are in the same user space.
4. The method according to any one of claims 1 to 3, characterized in that, The main application has a corresponding first sandbox, the first clone application has a corresponding second sandbox, and the second clone application has a corresponding third sandbox; wherein the identifier of the first sandbox is the same as the application identifier of the main application, the identifier of the second sandbox is the same as the application identifier of the first clone application, and the identifier of the third sandbox is the same as the application identifier of the second clone application.
5. The method according to any one of claims 1 to 4, characterized in that, The method further comprises: in response to a third operation triggered by a user, implementing a target function of the main application; in response to a fourth operation triggered by a user, implementing the target function of the first clone application; in response to a fifth operation triggered by a user, implementing the target function of the second clone application; The target function comprises one or more of the following: message notification function, picture sharing function, application lock function, microphone function, battery statistics function, application and service quota function, or usage behavior statistics function.
6. The method according to any one of claims 1 to 5, wherein, The main application has corresponding configuration information, and the configuration information is used to identify that the main application supports creation of a clone application.
7. The method according to any one of claims 2 to 6, wherein, The method further comprises: in response to a sixth operation of triggering deletion of the first clone application, deleting the first clone application, the application identifier of the first clone application and the icon of the first clone application.
8. The method according to any one of claims 1 to 6, wherein The method further comprises: in response to a seventh operation of triggering uninstallation of the main application, uninstalling the main application, the first clone application and the second clone application, and deleting the application identifier of the main application, the application identifier of the second clone application and the application identifier of the third clone application.
9. The method according to any one of claims 1 to 8, wherein, The method comprises: in response to an eighth operation of triggering creation of a clone application of the main application, creating an Nth clone application, wherein the package name of the Nth clone application is the same as the package name of the main application, the application identifier of the Nth clone application is different from the application identifier of the main application and the application identifiers of other clone applications of the main application, N is a positive integer, and N is less than or equal to a first preset value.
10. The method of any one of claims 1-9, wherein, The method further comprises: in response to a ninth operation of triggering opening of a second application, creating a first application instance of the second application, wherein the package name of the first application instance is the same as the package name of the second application, and the application identifier of the first application instance is the same as the application identifier of the second application; In a case where the first application instance is created, a second application instance of the second application is created in response to a tenth operation of triggering opening of the second application, wherein a package name of the second application instance is the same as a package name of the second application, an application identity of the second application instance is the same as an application identity of the second application, and an instance identity of the second application instance is different from an instance identity of the first application instance.
11. The method of claim 10, wherein, The second application has corresponding configuration information, and the configuration information is used to identify that the second application supports creating application instances; and a maximum number of application instances supported by the second application is less than or equal to a second preset.
12. An electronic device, comprising: The electronic device includes one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program code including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method according to any one of claims 1-11.
13. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions configured to cause the electronic device to perform the method according to any one of claims 1-11 when the computer instructions are executed on the electronic device.
15. A computer program product, characterised in that, The computer program product includes computer program code configured to cause the electronic device to perform the method according to any one of claims 1-11 when the computer program code is executed on the electronic device.
Citation Information
Patent Citations
Multi-tasking method for application program and terminal
CN105224322A
Display method and device for application and spare application
CN106155694A
Application control method and terminal equipment
CN106775982A
Application control method, terminal and computer readable medium
CN108228024A
Method and device for simultaneously running multiple same-name applications in sandbox, and storage medium
CN112148313A