Application duplicate method, electronic equipment, storage medium and chip system

By generating the same package name but different identifiers for the clone application, an independent sandbox is created, which solves the problem of the existing technology that the clone application cannot be controlled independently, realizes independent management and resource conservation, and improves user experience and system stability.

CN120671118APending Publication Date: 2025-09-19HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411336442.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Existing technologies cannot independently control clone applications, cannot set functions such as automatic startup, battery consumption display, and permission management, and increase resource and storage space consumption.

Method used

By generating the same package name but different application identifiers for the cloned application, an independent application sandbox is created to achieve independent management of the cloned application, including isolation of icons, directories, and permissions.

Benefits of technology

It enables independent management of clone applications, reduces resource and storage space consumption, improves system security and stability, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671118A_ABST
    Figure CN120671118A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application duplicate method, electronic equipment, a storage medium and a chip system, and relates to the technical field of terminals. The method comprises the steps that an operating system of the electronic equipment can support creation of a plurality of copied applications, package names of the copied applications are the same, the operating system can add application indexes to serve as identification information of the copied applications so as to distinguish the copied applications, and the operating system can further generate independent application sandboxes for the copied applications so as to store application data. And the data isolation of each duplicate application is realized. Therefore, each duplicate application can be operated as an independent application, and the system service of the electronic equipment can manage the duplicate application according to the independent application, so that independent management of system authority, parameter configuration and the like of each duplicate application is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a method for applying a clone, an electronic device, a storage medium, and a chip system. Background Art

[0002] Some applications in electronic devices can support the multi-application function, that is, on the same electronic device, you can open multiple identical applications. In this way, users can manage work information and life information separately.

[0003] In some implementations, electronic devices can implement the multi-application function based on the managed profile in the Android system and generate clone applications.

[0004] However, this implementation method cannot independently control the clone application, such as being unable to set the clone application to automatically start, view battery consumption display, and control permissions. Summary of the Invention

[0005] This application provides a method, electronic device, storage medium, and chip system for creating application clones. These methods support the creation of multiple cloned applications, add application indexes as identification information for the cloned applications, and generate independent application sandboxes for each cloned application to store application data. This allows electronic devices to manage cloned applications as independent applications, enabling independent management of system permissions, parameter configurations, and other aspects of each cloned application.

[0006] In a first aspect, an embodiment of the present application provides a method for applying a clone, which is applied to an electronic device, and the method includes:

[0007] In response to a first operation that triggers the creation of a clone application of a main application, a first clone application is created, 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 that triggers the creation of a clone application of the main application, a second clone application is created, 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. In this way, each clone application can be distinguished by different application identifiers, each clone application can run as an independent application, and the system service of the electronic device can manage the clone applications as independent applications.

[0008] In one possible implementation, the first clone application has a corresponding application icon; the second clone application has a corresponding application icon. It is understood that the icons of each clone application can be the same as or different from the main application icon. In a possible implementation, the electronic device can add some icon identifiers to the main application icon as the clone application icons. This makes it easier for users to distinguish between the main application and the clone application, improving the user's visual experience.

[0009] In one possible implementation, the main application, the first clone application, and the second clone application are in the same user space. The electronic device can create separate directories for the first clone application and the second clone application in the same user space as the main application. This eliminates the need for the electronic device to create multiple user spaces for each clone application. Instead, it only needs to generate an additional copy of the package information. Therefore, file storage space in multiple user spaces is not occupied, thereby reducing resource and storage space consumption.

[0010] In one possible implementation, 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. The first sandbox's identifier is the same as the main application's application identifier, the second sandbox's identifier is the same as the first clone's application identifier, and the third sandbox's identifier is the same as the second clone's application identifier. This sandboxing isolates the data and code of the main application and its clones, preventing data interference between them and improving system security and stability.

[0011] In one possible implementation, the method further includes: implementing the target function of the main application in response to a third operation triggered by the user; implementing the target function of the first clone application in response to a fourth operation triggered by the user; and implementing the target function of the second clone application in response to a fifth operation triggered by the user; wherein the target function includes one or more of the following: message notification function, picture sharing function, application lock function, microphone function, battery statistics function, application and service limit function, or usage behavior statistics function. The electronic device implements the 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 the system permissions, parameter configurations, etc. of each clone application, thereby improving the user experience.

[0012] In one possible implementation, the main application has corresponding configuration information that indicates whether the main application supports the creation of cloned applications. This configuration information can be separated from the code, making it easier for developers to modify the application's behavior without changing the code, which improves the application's flexibility and maintainability. Based on the configuration information in the main application, the electronic device can determine whether the main application supports the creation of cloned applications, thereby providing users with different interactive experiences.

[0013] In one possible implementation, the method further includes: in response to a sixth operation 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. When deleting a clone application, the electronic device may delete the application identifier and icon corresponding to the clone application, thereby better maintaining the operation of the application, correctly displaying interface information, and reducing the residual of useless information when the clone application is deleted.

[0014] In one possible implementation, the method further includes: in response to a seventh operation 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. When uninstalling a main application, the electronic device can also delete the clone application corresponding to the main application, as well as the application identifier and icon, to maintain data consistency and simplify user operations, eliminating the need for users to manually delete the clone application again, thereby improving the user experience.

[0015] In one possible implementation, the method includes: in response to an eighth operation triggering creation of a clone application of a 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, and 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, and N is a positive integer, and N is less than or equal to a first preset value. Running too many clone applications may reduce the performance of the electronic device and slow the response of the electronic device. Setting a maximum number of clone applications to be created can reduce system overload, thereby better managing the system load and improving the reliability and stability of the electronic device.

[0016] In one possible implementation, the method further includes: in response to a ninth operation that triggers 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; and in response to a tenth operation that triggers opening of the second application, creating a second application instance of the second application when the first application instance has been created, 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, create one or more application instances of the second application, and users can log in to multiple different accounts at the same time to perform different task processing, thereby meeting user needs for different application scenarios and improving user experience.

[0017] In one possible implementation, the second application has corresponding configuration information, the configuration information being used to identify that the second application supports the creation of application instances; and the maximum number of application instances supported by the second application is less than or equal to a second preset value. Because each application instance consumes a certain amount of system resources, setting a maximum number of application instances can reduce resource contention and excessive consumption, mitigate the impact on electronic device performance, and ensure stable system operation.

[0018] In a second aspect, an embodiment of the present application provides an apparatus for applying a clone, which may be an electronic device or a chip or chip system within an electronic device. The apparatus may include a processing unit. The processing unit is used 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 apparatus is an electronic device, the processing unit may be a processor. The apparatus may also include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to enable the electronic device to implement the method described in the first aspect or any possible implementation of the first aspect. When the apparatus is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to enable the electronic device to implement the method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, a cache, etc.), or a storage unit within the electronic device located outside the chip (e.g., a read-only memory, a random access memory, etc.).

[0019] In a third aspect, an embodiment of the present application provides an electronic device comprising one or more processors and a memory, the memory being coupled to the one or more processors, the memory being used to store computer program code, the computer program code comprising computer instructions, and the one or more processors being used to call computer instructions to execute the method described in the first aspect or any possible implementation of the first aspect.

[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the method described in the first aspect or any possible implementation of the first aspect.

[0021] In a fifth aspect, an embodiment of the present application provides a computer program product comprising a computer program, which, when the computer program runs on a computer, enables the computer to execute the method described in the first aspect or any possible implementation of the first aspect.

[0022] In a sixth aspect, the present application provides a chip or chip system, comprising at least one processor and a communication interface, wherein the communication interface and the at least one processor are interconnected via a line, and the at least one processor is configured to execute a computer program or instruction to perform the method described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip may be an input / output interface, a pin, or a circuit.

[0023] In one possible implementation, the chip or chip system described above in this application further includes at least one memory, in which instructions are stored. The memory may be a storage unit within the chip, such as a register, a cache, etc., or a storage unit of the chip (e.g., a read-only memory, a random access memory, etc.).

[0024] It should be understood that the second to sixth aspects of the present application correspond to the technical solutions of the first or second aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0027] Figure 3 A schematic diagram of a clone application provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of a clone application running framework provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of an interface for setting up an avatar application portal provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of an interface for creating a clone application provided in an embodiment of the present application;

[0031] Figure 7 A schematic diagram of an interface for a desktop display clone application provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of an interface for displaying a clone application on a tablet computer provided in an embodiment of the present application;

[0033] Figure 9 A schematic diagram of a process for creating a clone application provided in an embodiment of the present application;

[0034] Figure 10 A schematic diagram of an interface for displaying a message notification of a clone application provided in an embodiment of the present application;

[0035] Figure 11 A schematic diagram of an interface showing a clone application in a picture sharing interface provided in an embodiment of the present application;

[0036] Figure 12 A schematic diagram of an interface showing a clone application on an application lock interface provided in an embodiment of the present application;

[0037] Figure 13 A schematic diagram of an interface showing a clone application in a microphone settings interface provided in an embodiment of the present application;

[0038] Figure 14 A schematic diagram of an interface for a battery interface display clone application provided in an embodiment of the present application;

[0039] Figure 15 A schematic diagram of an interface for displaying a clone application using a statistics interface provided in an embodiment of the present application;

[0040] Figure 16 A schematic diagram of an interface showing a clone application in an application and service limit interface provided in an embodiment of the present application;

[0041] Figure 17 A schematic diagram of an interface for deleting a clone application provided in an embodiment of the present application;

[0042] Figure 18 A schematic diagram of another interface for deleting a clone application provided in an embodiment of the present application;

[0043] Figure 19 A schematic diagram of an interface for uninstalling a clone application provided in an embodiment of the present application;

[0044] Figure 20 A schematic diagram of multiple application instances provided in an embodiment of the present application;

[0045] Figure 21 A schematic diagram of a multi-instance application running framework provided in an embodiment of the present application;

[0046] Figure 22 A schematic diagram of an interface for displaying multiple application instances on a tablet computer provided in an embodiment of the present application;

[0047] Figure 23 A schematic diagram of an interface for displaying application instance messages in a notification center provided in an embodiment of the present application;

[0048] Figure 24 A schematic diagram of a method for applying a clone provided in an embodiment of the present application;

[0049] Figure 25 A schematic diagram of the structure of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] To facilitate a clear description of the technical solutions of the embodiments of the present application, some of the terms and technologies involved in the embodiments of the present application are briefly introduced below:

[0051] 1. Terminology

[0052] In the embodiments of this application, terms such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the terms "first chip" and "second chip" are used solely to distinguish between different chips and do not define their order. Those skilled in the art will understand that terms such as "first" and "second" do not define the quantity or execution order, and do not necessarily define differences.

[0053] It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0054] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, c can be single or multiple.

[0055] 2. Electronic devices

[0056] The electronic device of the embodiment of the present application may also be a terminal device in any form. For example, the electronic device may include: a mobile phone, a tablet computer, a PDA, a laptop 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 a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a 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, an in-vehicle device, a wearable device, an electronic device in a 5G network or a future evolved public land mobile communication network (PLMN) Mobile network, PLMN) and other electronic devices, and the embodiments of the present application are not limited to this.

[0057] As an example and not a limitation, in the embodiments of the present application, the electronic device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0058] In addition, in the embodiment of the present application, the electronic device can also be an electronic device in the Internet of Things (IoT) system. IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network of human-machine interconnection and object-to-object interconnection.

[0059] The electronic devices in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0060] 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 hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0061] For example, Figure 1 A schematic structural diagram of an electronic device is shown.

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

[0063] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0064] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics 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). The different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0065] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or is cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the above-mentioned memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. For example, in an embodiment of the present application, the processor may be used to execute the process of creating a clone application, and may also be used to separately manage the main application and the clone application, etc.

[0066] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0067] The internal memory 121 can be used to store computer executable program code, and the executable program code includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function, etc. The data storage area may store data created during the use of the electronic device, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor. For example, in an embodiment of the present application, the internal memory 121 can be used to store the running data of the clone application, and the corresponding sandbox data.

[0068] Figure 2 This is a block diagram of the software structure of the electronic device in an embodiment of the present application. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers: the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer (HAL), and the kernel layer.

[0069] The application layer can also be called the application layer, which can include a series of application packages. Figure 2As shown, the application package can include desktop applications, phone, music, calendar, camera, game, memo, video, etc. Applications can include system applications and third-party applications.

[0070] In embodiments of the present application, a desktop application can be used to manage and display applications in an electronic device. For example, a desktop application can provide an interface that allows users to view, launch, and manage applications installed on the electronic device. In some implementations, a desktop application can also be referred to as a desktop launcher or launcher.

[0071] The application framework layer, also known as the Framework layer, provides an application programming interface (API) and programming framework for applications in the application layer. The Framework layer may include some predefined functions.

[0072] The Framework layer can include a package manager, an activity manager, a window manager, a notification manager, and a view system.

[0073] A package manager is used to manage and install application packages, such as handling the installation and uninstallation of application packages. It is understandable that the term "package manager" may have different abbreviations in different operating systems. For example, in Android, the package manager may be referred to as the package management service (PMS), while in Hongmeng, the package manager may be referred to as the bundle management service (BMS).

[0074] The activity manager can be responsible for the life cycle management, task stack management, process management, and permission management of the application. For example, in an embodiment 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 is understandable 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 Hongmeng system, the activity manager can be understood as the ability manager service (AMS).

[0075] For the specific window manager, notification manager, view system, etc., please refer to the relevant technologies and will not be described in detail here.

[0076] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for controlling and managing the Android system.

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

[0078] The application layer and framework layer run in a virtual machine. The virtual machine executes the Java files in the application and framework layers as binary files. The virtual machine is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection. For example, in the embodiments of the present application, the virtual machine can be used to perform functions such as creating, running, and deleting clone applications.

[0079] The system library can also be called the Native layer, which can include multiple functional modules.

[0080] The Hardware Abstraction Layer (HAL) is an abstract structure between the kernel layer and the Android runtime. It encapsulates hardware drivers and provides a unified interface for upper-layer applications to call.

[0081] The kernel layer is the layer between hardware and software. The kernel layer may include display drivers, camera drivers, audio drivers, etc.

[0082] It should be noted that the embodiments of the present application are only illustrated using the Android system as an example. In other operating systems (such as Hongmeng system, Windows system, IOS system, etc.), as long as the functions implemented by each functional module are similar to those in the embodiments of the present application, the solutions of the present application can also be implemented.

[0083] Some apps on electronic devices support multi-app functionality, meaning you can open multiple copies of the same app on the same device. This allows users to manage their work and personal lives separately. In some scenarios, multi-app functionality is also known as app cloning.

[0084] In some implementations, electronic devices can implement the application clone function based on the managed profile in the Android system to generate a clone application. However, this implementation method cannot independently control the clone application, such as setting the self-start, viewing the battery consumption display, permission control and other functions for the clone application. In addition, this implementation method will increase resource consumption and storage space consumption. For example, for the same application, each additional application instance requires an additional user space, thereby increasing resource consumption, and each user space has an independent file storage space, which increases storage space consumption.

[0085] In view of this, the embodiment of the present application provides a method for applying a clone, such as Figure 3 As shown, the operating system of the electronic device can support the creation of multiple clone applications, and the package name of each clone application is the same. For example, taking application A as an example, the operating system can support the creation of clone application A1 and clone application A2 of application A, wherein the package names of application A, clone application A1 and clone application A2 are all com.app.a. The operating system can add an application index as identification information of the clone application to distinguish each clone application. For example, the application index index of application A can take a value of 0, the application index index of clone application A1 can take a value of 1, and the application index index of clone application A2 can take a value of 2. The operating system can also generate an independent application sandbox for each clone application to store application data, thereby realizing data isolation of each clone application. 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 clone application A1 can be the same as the value of the application index of clone application A1, and the sandbox index of clone application A2 can be the same as the value of the application index of clone application A2. In this way, each clone application can run as an independent application, and the system service of the electronic device can manage the clone application as an independent application, thereby achieving independent management of the system permissions, parameter configuration, etc. of each clone application.

[0086] The following describes the method of the embodiment of the present application in detail through specific embodiments. The following embodiments can be combined with each other or implemented independently, and the same or similar concepts or processes may not be repeated in some embodiments.

[0087] Let's take application A as an example. Figure 4 A schematic diagram of the clone application running framework of application A is shown.

[0088] It is understandable that application A can be any application in the application market that supports the application clone function, and this embodiment of the application is not limited thereto. In response to triggering the operation of downloading application A in the application market, the electronic device can download and install application A. It is understandable that the operations mentioned in the embodiments of the application may include but are not limited to touch (for example, click, etc.), voice control, gestures and other operations, and this embodiment of the application is not limited thereto.

[0089] After application A is installed, in response to the operation of triggering the creation of a clone application of application A, the electronic device can create one or more clone applications for application A. In some scenarios, application A can also be called the main application of application A, or simply the main application, and the created clone applications can also be called the clone applications of application A, or simply the clone applications. The specific process of creating and displaying one or more clone applications of application A can be referred to as follows Figures 5 to 8 The relevant description of the corresponding embodiments will not be repeated here.

[0090] For example, an electronic device creates two clone applications of application A, namely clone application A1 and clone application A2. Figure 4 As shown, the package names of the main application, clone application A1 and clone application A2 of application A are the same, but the values ​​of the application index are different. For example, the package names of the three applications are all com.app.a, but the application index index of the main application is 0, the application index index of the clone application A1 is 1, and the application index index of the clone application A2 is 2. In this way, the electronic device can distinguish between the main application and each clone application based on the application index. It can be understood that in actual situations, the package names of the three applications can have other names, the application index index of the three applications can have other values ​​respectively, and the data type of the application index can also be set to integer, string, enumeration and other data types, as long as the main application and each clone application can be distinguished by the application index. The specific naming of the package name and the value of the application index are not limited in the embodiments of this application.

[0091] Optionally, for the application index value of the main application of application A, the electronic device can create a default application index value for the main application when installing application A. For example, the default application index value can be 0. The electronic device can also create an application index value for the main application when creating a clone application of application A. This is not limited in the embodiments of the present application.

[0092] When an electronic device runs the main application of Application A or its clones, the main application and each clone can run as independent applications. For example, the main application of Application A can have one or more processes running, such as Process 1 and Process 2. Process 1 can include Activity Component 1, Activity Component 2, and Extended Service 3, while Process 2 can include Activity Component 4, Activity Component 5, and Extended Service 6.

[0093] One or more processes may also be running in the clone application A1, for example, including process 11 and process 12, wherein process 11 may include active component 11, active component 12, extended service 13, etc., and process 12 may include active component 14, active component 15, extended service 16, etc. It is understandable that the processes running in the clone application A1 may be the same as or different from the processes running in the main application of application A, and the specific processes required by each may be run according to the actual application requirements. In the case where the clone application A1 and the main application run the same process, the active components and extended services included in the same process may also be the same or different, and this embodiment of the application is not limited thereto.

[0094] Similarly, clone application A2 may also run one or more processes, such as process 21 and process 22. Process 21 may include active component 21, active component 22, extended service 23, etc., and process 22 may include active component 24, active component 25, extended service 26, etc. It is understood that the processes running in clone application A2 may be the same as or different from the processes running in the main application of application A, and the active components and extended services included in the same process may also be the same or different, which is not limited in this embodiment of the application.

[0095] The electronic device can also allocate different sandbox directories for the main application of application A, clone application A1 and clone application A2. Sandbox can be used to isolate the data and code of each application so that the data between applications will not interfere with each other, thereby improving the security and stability of the system. For example, the sandbox directory of the main application of application A is " / data / app / ... / <userid>For example, 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. That is, 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".

[0096] The sandbox directory of the main application of application A may include one or more files, such as file 1, file 2, file 3, etc.; it may also include one or more databases, such as database 1, database 2, etc.

[0097] The sandbox directory of the clone application A1 may also include one or more files, such as file 11, file 12, file 13, etc.; it may also include one or more databases, such as database 11, database 12, etc. It is understandable that the files included in the sandbox directory of the clone application A1 may be the same as or different from the files included in the sandbox directory of the main application. The database included in the sandbox directory of the clone application A1 may be the same as or different from the database included in the sandbox directory of the main application. Specifically, respective files and / or databases may be created according to actual application requirements, and this embodiment of the application does not limit this.

[0098] Similarly, the sandbox directory of the clone application A2 may also include one or more files, such as file 21, file 22, file 23, etc.; it may also include one or more databases, such as database 21, database 22, etc. It is understandable that the files included in the sandbox directory of the clone application A2 may be the same as or different from the files included in the sandbox directory of the main application. The database included in the sandbox directory of the clone application A2 may be the same as or different from the database included in the sandbox directory of the main application. Specifically, respective files and / or databases may be created according to actual application requirements, and this embodiment of the application does not limit this.

[0099] It is understandable that in the embodiment of the present application, when creating clone applications A1 and A2, since the clone applications are created in the same user space, there is no need to create multiple user spaces, nor will the file storage space of multiple user spaces be occupied, thereby reducing resource consumption and storage space consumption. From experimental tests, it can be seen that when creating a clone application, since there is no need to create a user space for each clone application, only an additional package information needs to be generated. Therefore, excluding the memory occupied by the clone application during operation, the additional resource consumption required by the electronic device to create the clone application is at the kilobyte (kb) level. In other words, the clone application created by the embodiment of the present application will not have excessive resource consumption and storage space consumption.

[0100] For example, Figure 5 and Figure 6 A schematic diagram of the interface for creating one or more clone applications of application A is shown.

[0101] like Figure 5 As shown, Figure 5 Item a is an interface 501 for setting applications in an electronic device. Interface 501 may include multiple setting items, such as desktop and personalization, display and brightness, sound and vibration, notification and status bar, and general settings. Each setting item may include a setting item icon, a setting item name, and a control for entering the setting item details page. For example, taking the general setting item as an example, the general setting item may include a general setting icon 5011, a general setting name 5012, and a control 5013 for entering the general setting details page.

[0102] In response to the operation of triggering the entry into the general settings interface, such as Figure 5 As shown in Figure b, the electronic device can display a general settings interface 502. The trigger operation can include triggering an operation at any location in the general settings item, such as triggering the operation of control 5013 on the general settings details page. Interface 502 can include multiple settings items, such as system updates, system navigation mode, date and time, application assistant, application clones, and other settings. Each setting item can include a setting item name and a control for entering the setting item details page. For example, taking the application clone setting item as an example, the application clone setting item can include the application clone name 5021 and the control 5022 for entering the application clone details page.

[0103] In response to the operation of triggering the entry into the application clone interface, the electronic device may display the application clone interface. The triggering operation may include triggering an operation at any location in the application clone setting item, such as triggering the control 5022 of the application clone details page.

[0104] In a possible display mode of the application clone interface, if the electronic device includes at least one application that supports the application clone function, then Figure 5 As shown in FIG. 5 , the electronic device may display an application clone interface 503. The interface 503 may include prompt information 5031 and one or more application items that support the application clone function. In some scenarios, the application item may also be called an application list.

[0105] Among them, the content of prompt information 5031 may 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 will run independently of each other." This application does not limit the specific content of prompt information 5031.

[0106] Application items may include multiple application items such as Application A, Application B, Application C, Application D, and Application E. Each application item may include an application icon, an application name, the number of clone applications corresponding to the application, and a control for entering the application item details page. For example, taking Application A as an example, the application item may include an application icon 5032 for Application A, an application name 5033 for Application A, the number of clone applications corresponding to Application A 5034, and a control 5035 for entering the application A details page. It is understood that if Application A currently has no corresponding clone application, the number of clone applications corresponding to Application A 5034 may be displayed as "No clone".

[0107] In another possible display mode of the application clone interface, if the electronic device does not include an application that supports the application clone function, Figure 5 As shown in FIG. d, the electronic device may display an application clone interface 504. Interface 504 may include a prompt message 5041, which may include "No cloneable applications." This application does not limit the specific content of prompt message 5041. Optionally, interface 504 may display an image to prompt the user that there are currently no cloneable applications.

[0108] In response to the operation of triggering the entry into the application A details interface, such as Figure 6 As shown in a, the electronic device can display the application A details interface 601. The trigger operation may include an operation to trigger any position in the application item corresponding to application A, such as an operation to trigger the control 5035 of the application A details page. The interface 601 may include an icon 6011 of application A, a name 6012 of application A, and a create avatar control 6013. In response to the operation of triggering the create avatar control 6013, as shown in FIG. Figure 6 As shown in b, the interface 601 may include a creating avatar control 6014, which may include a prompt message "Creating avatar..." and a waiting icon.

[0109] Optionally, during the avatar creation process, the electronic device can partially grayscale the interface 601. For example, the electronic device can grayscale the application A icon 6011, the application A name 6012, and the create avatar control 6013, and set the create avatar control 6013 to a non-triggerable state. This allows the avatar creation process to be highlighted in the interface 601, improving the user experience and reducing display errors caused by the user repeatedly triggering the create avatar control 6013.

[0110] When the electronic device creates the clone application A1 of application A, Figure 6 As shown in Figure c, in addition to displaying the icon 6011 of application A, the name 6012 of application A, and the create clone control 6013, the interface 601 may also display options for the created clone application A1. The options for the clone application A1 may include the icon 6014 of the clone application A1, the name 6015 of the clone application A1, and the delete control 6016.

[0111] It is understood that the icon 6011 of application A and the icon 6014 of clone 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 as the icon 6014 of clone application A1 based on icon 6011. This makes it easier to identify application A1 as the clone application of application A, making it easier for users to distinguish between the main application and the clone application, thereby improving the user's visual experience.

[0112] The delete control 6016 can be used to delete the clone application A1. In response to the operation of triggering the delete control 6016, the electronic device can delete the clone application A1, and the interface 601 after deletion can be as follows: Figure 6 As shown in a, the specific process of deleting the clone application can refer to the following Figure 17 The relevant descriptions in the corresponding embodiments are omitted here.

[0113] Optionally, when the electronic device creates the clone application A1 and displays Figure 6 When c, a toast prompt message can also be displayed in interface 601 to prompt the user that the clone application has been added to the desktop. For example, the toast prompt message may include "'Application A1' has been added to the desktop". This application does not limit the specific content of the toast prompt message.

[0114] It is understandable that the electronic device can create multiple clone applications of application A. The electronic device can also configure the maximum number of clone applications to be created. For example, if the electronic device can create up to 2 clone applications of application A, after the electronic device creates clone application A1 and clone application A2 of application A, the interface 601 can be as follows: Figure 6 The interface 601 may include options for the clone application A1, options for the clone application A2, and a create clone control 6013.

[0115] Optionally, since the electronic device can create a maximum of two clones of application A, after creating clone application A1 and clone application A2, the electronic device can grayscale the clone creation control 6013 and set the clone creation control 6013 to an untriggerable state. The electronic device can also display a prompt message 6017, which can include the content of "A maximum of two clones can be created." This application does not limit the specific content of prompt message 6017.

[0116] When creating a cloned application on an electronic device, the corresponding cloned application icon may also be displayed on the electronic device's desktop. It is understood that different electronic devices may have different desktop display effects. The following uses a mobile phone and a tablet as examples to illustrate the different displays.

[0117] When the electronic device is a mobile phone, Figure 7 As shown, taking application A as an example, if the mobile phone does not create a clone application of application A, Figure 7 As shown in a, the mobile phone desktop 700 may include an icon 701 of application A. In the case where the mobile phone creates a clone application A1 of application A, as shown in FIG. Figure 7 As shown in FIG. 1 , the mobile phone desktop 700 may include an icon 701 of application A and an icon 702 of a 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. Figure 7 As shown in c, the mobile phone desktop 700 may include an icon 701 of application A, an icon 702 of clone application A1, and an icon 703 of clone application A2.

[0118] When the electronic device is a tablet computer, such as Figure 8 As shown, taking application A as an example, if the tablet does not create a clone application of application A, Figure 8 As shown in a, the tablet computer desktop 800 may include an icon 801 of application A. Optionally, the Dock bar of the tablet computer desktop 800 may also include an icon 802 of application A. In response to an operation that triggers the opening of application A, such as an operation that triggers icon 801 or icon 802, or an operation that triggers application A in the application center, the tablet computer desktop 800 may display an interface 803 of application A.

[0119] In the case where a tablet creates a clone application A1 of application A, Figure 8 As shown in b, the tablet desktop 800 may include an icon 801 of application A and an icon 804 of clone application A1. Optionally, the shortcut bar of the tablet desktop 800 may also include an icon 802 of application A and an icon 805 of clone application A1. When application A is opened on the tablet desktop 800, in response to an operation that triggers the opening of clone application A1, for example, the triggering operation includes an operation that triggers icon 804 or icon 805, and may also include an operation that triggers clone application A1 in the application center, the interface 806 of clone application A1 may be displayed on the tablet desktop 800. In this way, when a user logs in to different accounts, both accounts can be used simultaneously.

[0120] The display area of ​​interface 803 and the display area of ​​interface 806 may or may not overlap, which is not limited in this embodiment of the present application. It is understood that when the display area of ​​interface 803 and the display area of ​​interface 806 overlap, since the time of opening the clone application A1 is later than the time of opening application A, interface 806 can be displayed on top of interface 803. This makes it easier for the user to view the interface of the newly opened application, thereby improving the user experience.

[0121] The case where a tablet computer creates two or more clone applications of application A is similar to the case where a clone application A1 of application A is created, and will not be described in detail.

[0122] Optionally, the electronic device may not create an icon for the clone application A1, and the clone application A1 may also be opened by triggering the icon of application A, which is not limited in the embodiment of the present application.

[0123] Figure 9 A schematic diagram shows the implementation process of an electronic device creating an application avatar of application A.

[0124] The electronic device can display applications that support the application clone function in the interface, for example, the application setting interface can display applications that support the application clone function. For details, please refer to Figure 5 The relevant description of the embodiment corresponding to d is omitted here.

[0125] It is understandable that when displaying Figure 5 Before the interface shown in d is displayed, the electronic device can determine whether the application supports the application clone function. In a possible implementation, the package manager of the electronic device can obtain the configuration information of each application. For example, taking application A as an example, the configuration information of application A can be as follows: Figure 9 As shown in the configuration information 901, the configuration information 901 may include the name of application A, the version number versionCode of application A, the version name versionName of application A, and the multi-instance mode mode of application A and other information, wherein the multi-instance mode can be used to indicate whether the application supports the application clone function. For example, the name of application A is "com.app.a", and the version number of application A is "1000000". In some scenarios, the multi-instance mode can also be called the multi-opening mode. The version name of application A can be "1.0.0", and the multi-instance mode of application A is "MODE_A", which is used to indicate that application A supports the application clone function. It can be understood that the configuration information corresponding to different applications may be different, and the field identifier that supports the application clone function may be an integer, string, enumeration or other data type, which is not limited in the embodiment of the present application.

[0126] Optionally, the configuration information may also include configuration information of the maximum number of instances. For example, the maxNum field may be used to indicate the maximum number of clone applications that can be created by the application. It is understandable that, based on the maximum number of clone applications set by the application, the electronic device system may further limit the maximum number of clone applications that the application can create. The maximum number of clone applications set by the specific application and the maximum number of clone applications limited by the electronic device system may be based on the smaller value. For example, if the maximum number of clone applications set by the application is 10 and the maximum number of clone applications limited by the electronic device system is 8, the electronic device can create up to 8 clone applications; if the maximum number of clone applications set by the application is 10 and the maximum number of clone applications limited by the electronic device system is 12, the electronic device can create up to 10 clone applications. Of course, the maximum number of clone applications set by the application and the maximum number of clone applications limited by the electronic device system may also be based on the larger value, which is not limited in the embodiments of the present application.

[0127] In response to a user creating a clone application A1 of application A, the electronic device can create clone application A1. The database used by clone application A1 is different from the database used by the main application of application A, thereby storing different application data for the main application and clone application A1. Furthermore, the electronic device can distinguish the databases of different applications based on different application indexes.

[0128] The electronic device can also create a sandbox directory for the clone application A1. For example, Figure 4 Corresponding to the relevant description in the embodiment, the sandbox directory of the main application of application A can be " / data / app / ... / <userid> / com.app.a", under the same user space userId, the sandbox directory of the clone application A1 can be " / data / app / … / <userid> / 1clone.com.app.a". If the electronic device also creates a clone application A2 of application A, the sandbox directory of the clone application A2 can be " / data / app / … / <userid> / 2clone.com.app.a", and so on. As you can see, the main application of application A and each clone application can have their own corresponding sandbox, and each sandbox directory is different.

[0129] It is understandable that the main application and the clone application can have their own application information. For example, taking application A as an example, Figure 9 As shown, Figure 9 902 is the application information of the main application of application A. Figure 9 903 is the application information for application A's clone application A1. As can be seen, the package name of the main application is com.app.a, the user space identifier of the main application is userID 101, and the application index AppIndex value of the main application is 0. The package name of clone application A1 is com.app.a, the user space identifier userID of clone application A1 is 101, and the application index AppIndex value of clone application A1 is 1. In other words, the package name and user space identifier of the main application and the clone application can be the same, but the application index can be different. In this way, the electronic device can distinguish between the main application and each clone application based on the value of the application index.

[0130] In this embodiment of the present application, by using an application index as the identification information for a cloned application, the electronic device can install the application once and create multiple cloned applications on demand, without modifying the application package information, in the same user space. Furthermore, after the application is successfully installed, deleting the application installation package will not affect the subsequent creation, deletion, or operation of the cloned application.

[0131] Since the main application and each clone application can run as independent applications, the main application and each clone application can manage some functions provided by the electronic device, such as but not limited to the following functions: message notifications, sharing, application lock, microphone, battery, usage statistics, application and service limits. It can also be understood that the electronic device can uniquely identify a main application or clone application through the application package name and application index, thereby realizing independent management of functions by the main application and the clone application. For example, the following Figures 10 to 16 A schematic diagram showing how a main application and various clone applications independently manage multiple functions in an electronic device.

[0132] Figure 10 A schematic diagram of a message notification interface displayed on an electronic device.

[0133] like Figure 10 As shown, application message notifications can be displayed on the lock screen interface 1000 of the electronic device. Taking application A and clone application A1 as an example, if both application A and clone application A1 have message notifications, the lock screen interface 1000 can display application A's message notification 1001 and application A1's message notification 1002 respectively.

[0134] Among them, the message notification 1001 of application A may include the icon of application A, the message contact of application A, the message received by application A, and / or the time when the message was received, etc. The message notification 1002 of application A1 may include the icon of application A1, the message contact of application A1, the message received by application A1, and / or the time when the message was received, etc.

[0135] By separately managing the message notifications of application A and clone application A1, users can quickly understand whether the message notification comes from the main application or the clone application, thereby distinguishing different message scenarios, efficiently processing information, and improving user experience.

[0136] Figure 11 A schematic diagram of the picture sharing interface displayed on an electronic device.

[0137] like Figure 11 As shown, in the electronic device's picture sharing interface 1100, the picture to be shared, the device that can be used to share the picture, the application information that can be used to share the picture, and other picture processing functions may be included. The application information may include the application icon and / or the application name, and the other picture processing functions may include copying the picture, printing the picture, saving as another picture, adding to a transfer station, etc.

[0138] Taking application A and clone application A1 supporting the sharing function as an example, the sharing picture interface 1100 can display application information 1101 of application A and application information 1102 of application A1 respectively.

[0139] The main application and the clone application are displayed separately in the picture sharing interface, and users can choose whether to share the picture to the main application or the clone application, thereby providing users with more choices and improving the user experience.

[0140] Figure 12 A schematic diagram of the app lock interface displayed on an electronic device.

[0141] An electronic device may include an application lock function. It is understood that if an application is set with an application lock, an identity verification will be performed before the application is started to ensure that the application is used by the user himself, thereby protecting the user's privacy.

[0142] like Figure 12 As shown, the app lock interface 1200 of an electronic device may include setting options for multiple applications. For example, the setting options may include setting options 1201 for application A and setting options 1202 for clone application A1. Taking setting options 1201 for application A as an example, setting options 1201 may include the application icon, application name, lock information, and lock switch of application A. For example, if application A does not have an app lock set, the lock information may be displayed as "unlocked" and the lock switch may be displayed as off. If application A has an app lock set, the lock information may be displayed as "locked" and the lock switch may be displayed as on.

[0143] Thus, in the app lock interface 1200, the user can set an app lock for both application A and clone application A1 according to actual needs. For example, the user can set an app lock only for application A, only for clone application A1, or set an app lock for both, or not set an app lock at all, thereby improving the user experience.

[0144] Figure 13 Illustration of the microphone settings interface displayed for an electronic device.

[0145] like Figure 13 As shown, the microphone setting interface 1300 of the electronic device may include setting options for multiple applications. The user can set different microphone access permissions for different applications. The microphone access permissions may include allowing access to the microphone only during use, asking for microphone permission each time, and prohibiting access to the microphone.

[0146] For example, microphone settings interface 1300 may include settings options 1301 for application A and settings options 1302 for clone application A1. Taking settings options 1301 for application A as an example, settings options 1301 may include application A's application icon, application name, microphone permission information, and a microphone permission setting control. The microphone permission information may indicate the microphone access rights of the current application A. The microphone permission setting control may be used to set the microphone access rights of application A.

[0147] The user can set different microphone access permissions for application A and clone application A1 respectively, for example, Figure 13 As shown, the microphone access permission for App A can be set to ask for microphone permission every time it is used, while the microphone access permission for clone App A1 can be set to allow access to the microphone only during use. This way, users can set different microphone access permissions for App A and clone App A1 based on their actual needs, thereby better controlling the collection of audio data by apps, reducing data sharing, and improving the user experience.

[0148] Figure 14 Illustration of a battery interface displayed for an electronic device.

[0149] like Figure 14 As shown, the battery interface 1400 of the electronic device may include a statistical chart of today's screen-on time, so that users can view the battery usage of the day; it may also include an application power consumption ranking, so that users can view the power consumption of each application.

[0150] For example, the battery interface 1400 can display the power consumption of application A 1401 and the power consumption of clone application A1 1402. Figure 14 As shown in the figure, App A consumed 16% of the battery power, while the clone App A1 consumed 11%. This allows users to more intuitively understand the power consumption of App A and the clone App A1, and manage the main app and clone apps separately, improving the user experience.

[0151] Figure 15 A diagram of a usage statistics interface displayed for an electronic device.

[0152] like Figure 15 As shown, in the usage statistics interface 1500 of the electronic device, users can view statistical data on application usage, thereby helping users understand the usage of the electronic device. The usage statistics interface 1500 may include "Daily" and "Last Seven Days" switching pages. Taking the "Daily" switching page as an example, the "Daily" switching page may include usage data for multiple applications, including the usage duration of each application.

[0153] For example, taking an electronic device as an example in which two clones of application A are created, the usage statistics interface 1500 may include application A's total usage data 1501, as well as the main application's usage data 1502, the clone application A1's usage data 1503, and the clone application A2's usage data 1504. It is understood that application A's total usage data 1501 may be the sum of the main application's usage data 1502, the clone application A1's usage data 1503, and the clone application A2's usage data 1504.

[0154] By separately counting the usage data of the main application and each clone application, users can conveniently view the usage data of the main application and each clone application, helping them understand the usage time of each application and thus manage different applications accordingly.

[0155] Figure 16 Illustration of the Apps & Services Limits interface displayed for an electronic device.

[0156] Electronic devices can include app and service limit functionality. Users can set a time limit for an app. When the time limit is reached, the app will no longer be usable and the user will need to enter a password or wait for the next time period before being able to use the app again.

[0157] like Figure 16 As shown in a, taking the example of an electronic device creating two clones of application A, a setting item 1601 for application A may be displayed in the application and service limit interface 1600 of the electronic device. Setting item 1601 may include an icon for application A, an application name for application A, a prompt message 1602, a view icon 1603, a selection message 1604, and a selection box 1605.

[0158] Prompt message 1602 may prompt the user to view and set up information related to clones of application A. Prompt message 1602 may include "Click to view clones." Selected message 1604 may indicate whether the main application and / or clones of application A are selected. Optionally, in response to triggering selection box 1605, selected message 1604 may display "Select All."

[0159] 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 limit interface 1600 can be as follows: Figure 16 As shown in b. Prompt message 1602 in interface 1600 may display "Click to collapse," and view icon 1603 may be updated to collapse icon 1603. Interface 1600 may also display settings items 1606 for the main app, 1607 for clone app A1, and 1608 for clone app A2. Settings item 1606 may include a selection box 1609, settings item 1607 may include a selection box 1610, and settings item 1608 may include a selection box 1611. The user can trigger selection box 1609 to select the main app, trigger selection box 1610 to select clone app A1, and trigger selection box 1611 to select clone app A2.

[0160] It is understood that when the selection boxes 1609, 1610, and 1611 are all unchecked, the selected information 1604 may be displayed as "0 items selected". When any one of the selection boxes 1609, 1610, or 1611 is checked, the selected information 1604 may be displayed as "1 item checked". Figure 16 As shown in c, taking the selection box 1609 as an example, the selection box 1609 can be displayed as a selected state.

[0161] Similarly, if any two of checkboxes 1609, 1610, or 1611 are selected, selection information 1604 may be displayed as "Two items selected." If all of checkboxes 1609, 1610, and 1611 are selected, selection information 1604 may be displayed as "All selected." Alternatively, if at least one of checkboxes 1609, 1610, or 1611 is selected, checkbox 1605 may be displayed as selected.

[0162] Optionally, after selecting any one of the selection boxes 1609, 1610, or 1611, in response to triggering the operation of the collapse icon 1603, the application and service limit interface 1600 may be as follows: Figure 16 The selected information 1604 may be displayed as "1 item selected", and the selection box 1605 may be displayed as a selected state.

[0163] By separately controlling the usage time limits of applications and clone applications, users can better manage the main application and clone applications. Users can flexibly set the usage time limits of the main application and clone applications according to their own needs to meet personalized management needs.

[0164] It is understandable that the electronic device can also delete the clone application or uninstall the clone application based on the user's triggering operation. The following description is made taking the electronic device as a mobile phone as an example.

[0165] In an implementation of deleting a clone application, Figure 17 As shown, the electronic device can display the application A details interface 1700. It is understood that the specific interface 1700 can refer to the above Figure 5 and Figure 6 The relevant description of the corresponding embodiment enters Figure 17 The application A details interface 1700 shown in a. The application A details interface 1700 and Figure 6 The application A details interface 601 in d is similar and will not be described in detail.

[0166] Taking deleting the clone application A2 of application A as an example, in response to the operation of triggering the delete control 1701 of the clone application A2, the electronic device may display the following Figure 17 The pop-up window 1702 shown in b. The specific display position of the pop-up window 1702 in the interface is not limited in this embodiment of the application. The pop-up window 1702 may include the application icon of the clone application A1, the pop-up title 1703, the prompt information 1704, the cancel control 1705 and the confirmation control 1706.

[0167] Pop-up title 1703 may prompt the user to delete application A2. For example, the content of pop-up title 1703 may include "Do you want to delete 'Application A2'?" Prompt message 1704 may provide the user with information related to deleting application A2. For example, the content of prompt message 1704 may include "After deletion, the data of this clone application will be permanently deleted." The specific content of pop-up title 1703 and prompt message 1704 is not limited in this embodiment of the application.

[0168] The cancel control 1705 can be used to indicate the cancellation of deleting the application A2. In response to the operation of triggering the cancel control 1705, the electronic device can cancel the display of the pop-up window 1702 and display the following information: Figure 17 In the application A details interface 1700 shown in a, the process of deleting application A2 is not executed.

[0169] The confirmation control 1706 can be used to indicate that the application A2 is confirmed to be deleted. In response to the operation of triggering the confirmation control 1706, the electronic device can cancel the display of the pop-up window 1702, delete the application A2, and display the following information: Figure 17 Application A details interface 1700 shown in c.

[0170] The electronic device can further delete the clone application A1 of application A. The process of deleting the clone application A1 is similar to the process of deleting the clone application A2. After deleting the clone application A1, the electronic device can display the following Figure 6 The interface shown in a is not repeated here.

[0171] It is understandable that after deleting the clone application A2, the icon of the clone application A2 is no longer displayed on the desktop of the electronic device; after deleting the clone application A1, the icon of the clone application A1 is no longer displayed on the desktop of the electronic device.

[0172] Optionally, in response to triggering the operation of the delete control 1701, the electronic device may delete the clone application A1 and display the following information: Figure 17 That is, in response to the operation of triggering the delete option 1701, the electronic device may not display the desktop shown in c. Figure 17 The pop-up window 1702 shown in b is displayed instead Figure 17 Go to the desktop shown in c and delete the clone application A1.

[0173] Another way to delete the clone application is as follows: Figure 18 As shown in a, the desktop 1800 of the electronic device can display the icon of application A, the icon of clone application A1 and the icon 1801 of clone application A2. It can be understood that the specific desktop 1800 and Figure 7 The c desktop 700 is similar and will not be described in detail.

[0174] In response to the operation of triggering the icon 1801 of the clone application A2, as shown in FIG. Figure 18 As shown in Figure b, the electronic device can partially grayscale the desktop 1800. For example, the electronic device can grayscale the application icons other than the clone application A2 on the desktop 1800, including the icons of application A and clone application A1. In this way, the desktop 1800 can highlight the changes in the interface after the clone application A2 icon 1801 is triggered, improving the user's visual experience.

[0175] The electronic device may also display a selection box for icon 1801, which may include a share option 1802 and a delete option 1803. The share option 1802 may be used to share the clone application A2 with other users via other devices or other applications. The delete option 1803 may be used to delete the clone application A2.

[0176] In response to the operation of triggering the delete option 1803, such as Figure 18 As shown in c, the electronic device can display a pop-up window 1804. The specific pop-up window 1804 can refer to the above Figure 17 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 following: Figure 18 In response to the operation of triggering the confirmation control 1806, the electronic device can cancel the display of the pop-up window 1804, delete the clone application A2, and display the following: Figure 18 The desktop shown in d.

[0177] Optionally, in response to the operation of triggering the delete option 1803, the electronic device may delete the clone application A2 and display the following information: Figure 18 That is, in response to the operation of triggering the delete option 1803, the electronic device may not display the desktop shown in d. Figure 18 The pop-up window 1804 shown in c is displayed instead Figure 18 Go to the desktop shown in d and delete the clone application A2.

[0178] In an implementation of uninstalling a clone application, Figure 19 As shown in a, the desktop 1900 of the electronic device can display the icon 1901 of application A, the icon of the clone application A1 and the icon of the clone application A2. It can be understood that the specific desktop 1900 and Figure 18 The desktop of a is similar to 1800, so I will not go into details.

[0179] In response to the operation of triggering the icon 1901 of application A, as shown in FIG. Figure 19 As shown in Figure b, the electronic device can partially grayscale the desktop 1900. For example, the electronic device can grayscale the application icons other than application A on the desktop 1900, including the icons of clone application A1 and clone application A2. In this way, the desktop 1900 can highlight the changes in the interface after the icon 1901 of application A is triggered, improving the user's visual experience.

[0180] The electronic device may display a selection box for icon 1901, which may include a share option 1902 and an uninstall option 1903. The share option 1902 may be used to share application A with other users via other devices or other applications. The uninstall option 1903 may be used to uninstall application A.

[0181] In response to triggering the operation of uninstall option 1903, such as Figure 19 As shown in Figure c, the electronic device may display a pop-up window 1904. The specific display position of the pop-up window 1904 in the interface is not limited in this embodiment of the application. The pop-up window 1904 may include the application icon of the clone application A, the pop-up title 1905, the cancel control 1906 and the confirmation control 1907.

[0182] Among them, the pop-up title 1905 can be used to prompt the user whether to delete application A. For example, the content of the pop-up title 1905 can include "Do you want to delete 'Application A'?" The specific content of the pop-up title 1905 is not limited in this embodiment of the application.

[0183] The cancel control 1906 can be used to indicate the cancellation of uninstallation of application A. In response to the operation of triggering the cancel control 1906, the electronic device can cancel the display of the pop-up window 1904 and display the following: Figure 19 The desktop 1900 shown in a does not execute the process of uninstalling application A.

[0184] The confirmation control 1907 can be used to indicate the determination to uninstall application A. In response to the operation of triggering the confirmation control 1907, the electronic device can cancel the display of the pop-up window 1904, such as Figure 19 As shown in d, the electronic device may display a pop-up window 1908. The specific display position of pop-up window 1908 in the interface is not limited in this embodiment of the application. Pop-up window 1908 may include the application icon of avatar application A, pop-up window title 1909, pop-up window information 1910, cancel control 1911 and confirm control 1912.

[0185] Pop-up title 1909 can be used to further prompt the user whether to delete application A. For example, the content of pop-up title 1909 may include "Do you want to delete 'Application A'?" Prompt message 1910 can be used to provide the user with information related to deleting application A2. For example, the content of prompt message 1910 may include "The associated clone application is also uninstalled." The specific content of pop-up title 1909 and prompt message 1910 is not limited in this embodiment of the application.

[0186] The cancel control 1911 can be used to indicate the cancellation of uninstallation of application A. In response to the operation of triggering the cancel control 1911, the electronic device can cancel the display of the pop-up window 1908 and display the following: Figure 19 The desktop 1900 shown in a does not execute the process of uninstalling application A.

[0187] The confirmation control 1912 can be used to indicate the determination to uninstall application A. In response to the operation of triggering the confirmation control 1912, the electronic device can cancel the display of the pop-up window 1908, uninstall application A, and uninstall one or more clone applications created based on application A, such as clone application A1 and clone application A2, and display the following information: Figure 19 The desktop 1900 is shown in e.

[0188] Optionally, in response to triggering the uninstall option 1903 or the operation of the confirmation control 1907, the electronic device can uninstall application A, as well as uninstall one or more clone applications created based on application A, and display the following information: Figure 19 That is, in response to triggering the operation of the uninstall option 1903 or determining the control 1907, the electronic device may not display the desktop 1900 shown in FIG. Figure 19 The pop-up window shown in d 1908, but it shows Figure 19 The desktop 1900 shown in e is displayed, and application A is uninstalled, as well as one or more clone applications created based on application A.

[0189] Optionally, the electronic device may also uninstall the main application from the settings application. The embodiment of the present application does not limit the method of uninstalling the main application.

[0190] It is understandable that, for tablet computers, electronic devices can provide multiple entrances to delete clone applications.

[0191] In one possible implementation, the user can delete the created clone application from the application center. Exemplarily, in response to an operation in the application center that triggers the deletion of the clone application, for example, the triggering operation may include right-clicking the clone application icon and selecting the delete option, the electronic device may delete the clone application.

[0192] Optionally, in response to triggering the operation of deleting the clone application in the application center, the electronic device may also display a prompt box. For example, the prompt box may be as follows: Figure 18 As shown in c, no further details will be given.

[0193] In a possible implementation, the operating system of the electronic device may also support launching multiple application instances of an application. Figure 20 As shown, taking application A as an example, the electronic device can support the creation of multiple application instances of application A. Each application instance can use an internal index key as its identification information to distinguish between the application instances. In this way, the electronic device can associate the application instances through the internal index key and perform multi-process management for each application instance. It can be understood that because the package name and application index of these multiple application instances are the same as those of application A, the system permissions and parameter configuration settings of these multiple application instances are all the same.

[0194] For example, the internal index key of application instance 1 of application A can be set to 1, and the internal index key of application instance 2 of application A can be set to 2. In actual situations, the internal index keys can have other values ​​and can also be set to other data types, as long as the internal index can be used to distinguish different application instances. The specific values ​​of the internal index are not limited in this embodiment of the application.

[0195] Let's take application A as an example. Figure 21 A schematic diagram of the application clone running framework of application A is shown.

[0196] In response to triggering an operation to launch Application A on the desktop application, the desktop application may query the package manager for Application A's multi-instance mode and the maximum number of application instances supported by the application. It is understood that Application A may configure whether to support multi-instance operation in its configuration information, and the package manager may obtain Application A's configuration information.

[0197] For example, the configuration information of application A can be as follows: Figure 21 As shown in configuration information 2101, configuration information 2101 may include information such as the name of application A, version number of application A, versionName, multi-instance mode of application A, and maximum number of instances. The multi-instance mode may be used to indicate whether the application supports multi-instances, and the maximum number of instances may be used to indicate the maximum number of application instances that can be created as set by the application.

[0198] For example, Application A is named "com.app.a," its version number is "1000000," and its version name can be "1.0.0." Application A's multi-instance mode is "MODE_B," indicating that Application A supports multiple instances. The maximum number of instances of Application A is 10, indicating that the application is configured to create up to 10 instances. It is understood that different applications may have different corresponding configuration information, and the field identifier supporting multiple instances may be an integer, string, enumeration, or other data type, which is not limited in this embodiment of the present application.

[0199] It is understandable that, based on the maximum number of instances set for the application, the electronic device system can further limit the maximum number of instances that the application can create. The maximum number of instances set for the specific application and the maximum number of instances limited by the electronic device system shall prevail, whichever value is smaller. For example, if the maximum number of instances set for the application is 10 and the maximum number of instances limited by the electronic device system is 8, the electronic device can create up to 8 application instances; if the maximum number of instances set for the application is 10 and the maximum number of instances limited by the electronic device system is 12, the electronic device can create up to 10 application instances.

[0200] 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 based on the larger value, which is not limited in the embodiment of the present application.

[0201] For example, an electronic device creates two application instances of application A, namely application instance 1 and application instance 2. Figure 21 As shown, the internal index values ​​of application instance 1 and application instance 2 are different. For example, the internal index value key of application instance 1 is 1, and the internal index value key of application instance 2 is 2. In this way, the electronic device can distinguish each application instance based on the internal index value.

[0202] In response to the operation of triggering the start of application A, the electronic device can determine whether to run application instance 1 or application instance 2 based on the value of the internal index key. In a possible implementation, when the user chooses to start application instance 1, the desktop application obtains the internal index value key corresponding to application instance 1 as 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 application instance 1 based on the internal index value. Similarly, when the user chooses to start application instance 2, the desktop application obtains the internal index value key corresponding to application instance 2 as 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 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 thereto, as long as the corresponding functions can be implemented.

[0203] like Figure 21 As shown in the activity manager 2102, application instance 1 and application instance 2 can each run their own activity components, extended services, etc. For example, application instance 1 can run one or more activity components, such as activity component 1 and activity component 2. Application instance 2 can also run one or more activity components, such as activity component 1 and activity component 2.

[0204] It is understandable that if Figure 21 As shown in Application A sandbox 2103, both Application Instance 1 and Application Instance 2 use Application A's sandbox. This can also be understood as Application Instance 1 and Application Instance 2 sharing Application A's sandbox data. Within Application A's sandbox, the electronic device can create separate application instances for Application Instance 1 and Application Instance 2, respectively, and distinguish them using an internal index key.

[0205] 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 install the application once and then open multiple application instances in the same user space without modifying the application package information. In addition, after the application is successfully installed, deleting the application installation package will not affect the subsequent operation of multiple application instances.

[0206] For multiple application instances of application A, the interface of the electronic device can also display the interface corresponding to the multiple application instances. It is understandable that different electronic devices can have different display effects in the interface. The following description takes the electronic device as a tablet as an example.

[0207] For example, Figure 22 As shown in a, the tablet computer desktop 2200 may include an icon 2201 of application A. Optionally, the Dock bar of the tablet computer desktop 2200 may also include an icon 2202 of application A.

[0208] It is understood that in response to each triggering operation to open application A, the electronic device will create an application instance of application A and launch a login window. For example, in response to triggering the operation to open application A twice, such as the triggering operation including double-clicking icon 2201 or icon 2202, and also including the operation of triggering application A in the application center, two login windows of application A may be displayed on tablet computer desktop 2200, namely login window 2203 and login window 2204.

[0209] In response to an operation that triggers application A, for example, the triggering operation includes the user clicking icon 2202, the mouse clicking icon 2202, or the mouse moving to icon 2202, a login window selection box 2205 can be displayed in the tablet desktop 2200, and the user can select the window to log in in the selection box 2205.

[0210] When the login window 2203 and the login window 2204 are completed successively, as shown in FIG. Figure 22 As shown in FIG. 2 , the tablet computer desktop 2200 may display an interface 2206 of application instance 1 and an interface 2207 of application instance 2 of application A. In this way, when a user logs in to different accounts, the two accounts can be used at the same time.

[0211] The display area of ​​interface 2206 and the display area of ​​interface 2207 may or may not overlap, which is not limited in this embodiment of the present application. It is understood that when the display area of ​​interface 2206 and the display area of ​​interface 2207 overlap, the interface of the application instance logged in later can be displayed above the interface of the application instance logged in earlier, which can facilitate the user to view the interface of the newly logged in application instance and improve the user experience.

[0212] In response to an operation that triggers application A, for example, the triggering operation includes the user clicking icon 2202, the mouse clicking icon 2202, or the mouse moving to icon 2202, an application interface selection box 2208 can be displayed in the tablet desktop 2200, and the user can select the application interface to be operated in the selection box 2208.

[0213] Optionally, the electronic device may also create respective icons for multiple application instances, so that the user can open each application instance by triggering the icon operation, which is not limited in the embodiments of the present application.

[0214] The electronic device can receive message notifications from each application instance of application A and display them on the desktop. It is understandable that since the electronic device can manage multiple application instances, and each application instance shares the sandbox data of application A, the electronic device can display message notifications from each application instance in the message notification area of ​​application A.

[0215] like Figure 23 As shown, a notification center window 2301 can be displayed in the tablet computer desktop 2300. Notification center window 2301 can display notification messages of various applications received by the electronic device. Exemplarily, when the electronic device receives a notification message from application A, the notification center window 2301 can include a message notification area 2302 for application A. For example, message 1 comes from application instance 1, message 2 comes from application instance 2, and message 3 comes from application instance 3. Then, the electronic device can display notification message 2303 of application instance 1, notification message 2304 of application instance 2, and notification message 2305 of application instance 3 in the message notification area 2302 of application A. Among them, the notification message may include a contact avatar, contact, message, and / or the length of time the message was received, etc. In this way, the electronic device can display messages of various application instances on the desktop 2300, making it convenient for users to view and process messages in a timely manner.

[0216] It is understood that the interfaces provided in the embodiments of the present application are exemplary interfaces. Each interface may include more or less content and controls, and the specific content and controls included in each interface are not limited by the embodiments of the present application.

[0217] Figure 24 The present invention illustrates a method for applying a clone in an embodiment of the present invention. Applied to an electronic device, the method includes:

[0218] S2401. In response to a first operation that triggers creation of a clone application of a main application, create 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.

[0219] In the embodiment of the present application, the main application can be understood as any application in the electronic device that supports the clone function, for example, the main application can be understood as application A mentioned above.

[0220] The first operation can be understood as the operation of creating a clone application of the main application. Figure 6 The operation of creating a clone control 6013 in the interface 601 of a.

[0221] The application identifier can be understood as the application index mentioned above. 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 identifiers can be other values ​​and can be set to other data types. This embodiment of the application is not limited to this, as long as the main application and each clone application can be distinguished by the application identifier.

[0222] S2402. In response to the second operation that triggers the creation of a clone application of the main application, a second clone application is created, 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.

[0223] In the embodiment of the present application, the second operation can be understood as the operation of creating a second clone application of the main application. Figure 6 The operation of creating the clone control 6013 in the interface 601 of c.

[0224] The value of the application identifier of the second clone application can be, for example, 2. 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. In this way, different application identifiers can be used to distinguish each clone application. Each clone application can run as an independent application, and the system service of the electronic device can manage the clone application as an independent application.

[0225] Optional, in Figure 24 On the basis of the corresponding embodiment, the first clone application has a corresponding application icon; the second clone application has a corresponding application icon.

[0226] It is understood that the icons of each clone application can be the same as or different from the main application icon, and this is not limited in the embodiments of the present application. In a possible implementation, the electronic device can add some icon identifiers to the main application icon as the clone application icon. This makes it easier for users to distinguish between the main application and the clone application, improving the user's visual experience.

[0227] Optional, in Figure 24 On the basis of the corresponding embodiment, the main application, the first clone application and the second clone application are in the same user space.

[0228] It is understood that the electronic device can create separate directories for the first and second clone applications in the same user space as the main application. This way, the electronic device does not need to create multiple user spaces for each clone application, but only needs to generate an additional package information. Therefore, the file storage space of multiple user spaces will not be occupied, thereby reducing resource consumption and storage space consumption.

[0229] Optional, in Figure 24 On the basis of the corresponding embodiments, 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.

[0230] In the embodiment of this application, Figure 3 As shown, 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.

[0231] The electronic device assigns different sandbox directories to the main application, clone applications A1, and clone applications A2 of application A. This sandbox can isolate the data and code of the main application and each clone application, preventing data interference between the main application and each clone application, thereby improving system security and stability.

[0232] Optional, in Figure 24 On the basis of the corresponding embodiment, the method also includes: in response to the third operation triggered by the user, realizing the target function of the main application; in response to the fourth operation triggered by the user, realizing the target function of the first clone application; in response to the fifth operation triggered by the user, realizing the target function of the second clone application; wherein the target function includes one or more of the following: message notification function, picture sharing function, application lock function, microphone function, battery statistics function, application and service limit function, or usage behavior statistics function.

[0233] In an embodiment of the present application, the third operation can be understood as an operation that triggers viewing the target function of the main application, the fourth operation can be understood as an operation that triggers viewing the target function of the first clone application, and the fifth operation can be understood as an operation that triggers viewing the target function of the second clone application.

[0234] The electronic device implements the target functions for the main application and each clone application separately. In this way, the electronic device can manage the clone applications as independent applications, thereby independently managing the system permissions and parameter configuration of each clone application, improving the user experience.

[0235] For example, by separately managing message notifications for the main app and each clone app, users can quickly understand whether a notification is coming from the main app or the clone app, distinguishing between different messaging scenarios and efficiently processing information. By displaying the main app and each clone app separately on the picture sharing interface, users can choose whether to share pictures to the main app or the clone app, providing more options. Users can set app locks for the main app and each clone app separately to protect different permissions for each app. Users can also set different microphone access permissions for the main app and each clone app as needed, allowing them to better control the collection of audio data and reduce data sharing. By separately tracking battery usage for the main app and each clone app, users can more intuitively understand the power consumption of the main app and each clone app, allowing them to manage the main app and clone apps separately. Separately controlling usage time limits for the main app and each clone app can help users better manage the main app and clone apps. Users can flexibly set usage time limits for the main app and clone apps according to their needs, meeting personalized management requirements. The app and service limit feature allows users to easily view usage data for the main app and each clone app, helping them understand the usage time of each app and manage different apps accordingly.

[0236] Optional, in Figure 24 On the basis of the corresponding embodiment, the main application has corresponding configuration information, and the configuration information is used to identify that the main application supports the creation of a clone application.

[0237] In the embodiments of the present application, the configuration information can be understood as the multi-instance mode "MODE_A" of application A described above. It is understood that different applications may correspond to different configuration information, and the configuration information may be of an integer, string, enumeration, Boolean, or other data type, which is not limited in the embodiments of the present application. For example, the configuration information may be configuration information in the configuration file of the primary application, or it may be a pre-configured field in the electronic device, which is not limited in the embodiments of the present application.

[0238] As you can understand, configuration information can be separated from code, making it easier for developers to modify application behavior without changing the code, which improves the flexibility and maintainability of applications. Based on the configuration information in the main application, the electronic device can determine whether the main application supports the creation of a clone application, thereby providing users with different interactive experiences.

[0239] Optional, in Figure 24 On the basis of the corresponding embodiment, the method further includes: 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.

[0240] In the embodiment of the present application, the sixth operation can be understood as an operation of deleting the first clone application. In a possible implementation, the electronic device can delete the first clone application from the settings application. For example, the sixth operation may include Figure 17 In the interface 1700, the operation of the delete control 1701 is triggered, or the operation of the confirmation control 1706 is triggered. In another possible implementation, the electronic device can delete the first avatar application from the desktop. For example, the sixth operation may include Figure 18 In the interface 1800, the operation of the delete option 1803 is triggered, or the operation of the confirmation control 1806 is triggered.

[0241] When deleting a clone application, the electronic device can delete the application logo and icon corresponding to the clone application at the same time, so as to better maintain the operation of the application, correctly display the interface information, and reduce the residual useless information when deleting the clone application.

[0242] Optional, in Figure 24 Based on the corresponding embodiment, the method also includes: in response to the seventh operation of triggering the 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.

[0243] In the embodiment of the present application, the seventh operation can be understood as the operation of uninstalling the main application. The electronic device can uninstall the main application from the desktop. For example, the seventh operation can include Figure 19 In the interface 1900, the operation of the uninstall option 1903 is triggered, or the operation of the confirmation control 1907 is triggered, or the operation of the confirmation control 1912 is triggered. Optionally, the electronic device can also uninstall the main application from the setting application. The embodiment of the present application does not limit the method of uninstalling the main application.

[0244] When uninstalling a main application, the electronic device can delete the clone application corresponding to the main application, and delete the application logo and icon to maintain data consistency. It can also simplify user operations so that users do not need to manually delete the clone application again, thereby improving user experience.

[0245] Optional, in Figure 24 Based on the corresponding embodiment, the method includes: in response to the eighth operation of triggering the creation of a clone application of the main application, creating the 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 the first preset value.

[0246] In the embodiment of the present application, the eighth operation can be understood as the operation of creating a clone application of the main application. Exemplarily, the eighth operation may include triggering Figure 6 The operation of creating a clone control 6013 in the interface 601 of a, or triggering Figure 6 The operation of creating the clone control 6013 in the interface 601 of c.

[0247] An electronic device can create one or more clone applications. The first preset value can be understood as the maximum number of clone applications allowed to be created by the electronic device for the main application. It is understood that the first preset value can be pre-set by the electronic device, configured by the main application, or determined based on the settings of the electronic device and the configuration of the main application.

[0248] In a possible implementation, the maximum number of clone applications supported by a primary application is m, and the maximum number of clone applications that the electronic device limits to n. If m is greater than or equal to n, the electronic device supports the creation of a maximum of n clone applications of the primary application; if m is less than n, the electronic device supports the creation of a maximum of m clone applications of the primary application. Of course, the larger of the two values ​​can also be used as the maximum number of clone applications supported, and this embodiment of the application does not limit this.

[0249] It is understandable that running too many clone applications may reduce the performance of electronic devices and slow down the response of electronic devices. Setting the maximum number of clone applications to be created can reduce system overload, thereby better managing system load and improving the reliability and stability of electronic devices.

[0250] Optional, in Figure 24 On the basis of the corresponding embodiment, the method also includes: in response to the ninth operation that triggers opening 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; when the first application instance is created, in response to the tenth operation that triggers opening 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.

[0251] In the embodiment 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 above-mentioned application A. The first application instance can include application instance 1 of application A, and the second application instance can include application instance 2 of application A.

[0252] 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. Exemplarily, the ninth operation and the tenth operation can be respectively included in Figure 22 In the interface 2200 of a, double-click the icon 2201 or the icon 2202.

[0253] The instance identifier can be understood as the internal index key mentioned above. For example, the instance identifier of the first application instance can be 1, and the instance identifier of the second application instance can be 2. In actual situations, the instance identifier can have other values, and the instance identifier can also be set to other data types, as long as the instance identifier can distinguish different application instances. The specific value of the instance identifier is not limited in the embodiments of this application.

[0254] It is understood that when an electronic device is running a first application instance and a second application instance, in response to an operation that triggers stopping or logging out of the first application instance, the electronic device can continue to run the second application instance. In other words, the first application instance and the second application instance can run independently and in parallel, and stopping or logging out of one application instance will not affect the operation of the other application instance.

[0255] The first application instance and the second application instance can share the sandbox of the second application to create one or more application instances of the second application. Users can log in to multiple different accounts at the same time and perform different tasks, thereby meeting user needs for different application scenarios and improving user experience.

[0256] Optional, in Figure 24 On the basis of the corresponding embodiment, 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 setting.

[0257] In the embodiments of this application, the configuration information can be understood as the multi-instance mode "MODE_B" of application A described above. It is understood that different applications may correspond to different configuration information, and the configuration information may be an integer, string, enumeration, or other data type, which is not limited in this embodiment. In possible implementations, the configuration information may be configuration information in a configuration file configured by the second application, or a pre-configured field in the electronic device, which is not limited in this embodiment.

[0258] It is understood that by separating configuration information from code, developers can more easily modify the behavior of the application without having to change the code, which improves the flexibility and maintainability of the application. The electronic device can determine whether the second application supports the creation of multiple application instances based on the configuration information in the second application, thereby providing different interactive experiences for users.

[0259] The electronic device can create one or more application instances. The second preset value can be understood as the maximum number of application instances of the second application allowed to be created in the electronic device. It is understood that the second preset value can be pre-set by the electronic device, can be configured by the second application, or can be determined based on the settings of the electronic device and the configuration of the second application.

[0260] In a possible implementation, the maximum number of application instances supported by the second application is p, and the maximum number of application instances that the electronic device limits to creation is q. If p is greater than or equal to q, the electronic device supports the creation of a maximum of q application instances of the second application; if p is less than q, the electronic device supports the creation of a maximum of p application instances of the second application. Of course, the larger value of the two can also be used as the maximum number of application instances supported for creation, and this embodiment of the application is not limited thereto.

[0261] It is understandable that since each application instance consumes a certain amount of system resources, setting the maximum number of application instances to be created can reduce resource competition and excessive consumption, reduce the impact on electronic device performance, and enable the system to run stably.

[0262] 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 used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0263] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of method. In order to realize the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the method steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0264] The embodiment of the present application can divide the functional modules of the device implementing the method according to the above method example. For example, each functional 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 software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.

[0265] like Figure 25 FIG2 is a schematic diagram of a chip structure 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.

[0266] In some embodiments, the memory 2504 stores the following elements: executable modules or data structures, or a subset thereof, or an extended set thereof.

[0267] The method described in the above embodiment of the present application can be applied to the processor 2501, or implemented by the processor 2501. The processor 2501 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 2501 or an instruction in the form of software. The above-mentioned processor 2501 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field-programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components. The processor 2501 can implement or execute the methods, steps and logic block diagrams related to each processing disclosed in the embodiment of the present application.

[0268] The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Among them, the software module can be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM). The storage medium is located in memory 2504, and processor 2501 reads the information in memory 2504 and completes the steps of the above method in combination with its hardware.

[0269] The processor 2501 , the memory 2504 , and the communication interface 2503 can communicate with each other via the communication line 2502 .

[0270] In the above embodiment, the instructions stored in the memory for execution by the processor may be implemented in the form of a computer program product, wherein the computer program product may be pre-written in the memory or downloaded and installed in the memory in the form of software.

[0271] The present application also provides a computer program product including one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. 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 a website site, computer, server or data center to another website site, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available medium can include magnetic media (e.g., floppy disk, hard disk or tape), optical media (e.g., digital versatile disc (DVD)), or semiconductor media (e.g., solid state disk (SSD)).

[0272] The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part via software, hardware, firmware, or any combination thereof. Computer-readable media can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one location to another. The storage medium can be any target medium that can be accessed by a computer.

[0273] As one possible design, computer-readable media may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; computer-readable media may include magnetic disk storage or other magnetic disk storage devices. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc as used herein include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically using lasers.

[0274] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.< / userid> < / userid> < / userid> < / userid> < / userid> < / userid>

Claims

1. A method for applying a clone, applied to an electronic device, characterized in that: The method comprises: In response to a first operation that triggers 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 that triggers the creation of a clone application of the main application, a second clone application is created, 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 according to claim 1, wherein The first clone application has a corresponding application icon; the second clone application has a corresponding application icon.

3. The method according to 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, wherein 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 the user, implementing a target function of the main application; In response to a fourth operation triggered by the user, implementing the target function of the first clone application; In response to a fifth operation triggered by the user, implementing the target function of the second clone application; 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 limit function, or a 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 the 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, the first clone application, the application identifier of the first clone application, and the icon of the first clone application are deleted.

8. The method according to any one of claims 1 to 6, wherein: The method further comprises: In response to the seventh operation of triggering the uninstallation of the main application, the main application, the first clone application and the second clone application are uninstalled, and the application identifier of the main application, the application identifier of the second clone application and the application identifier of the third clone application are deleted.

9. The method according to any one of claims 1 to 8, wherein The method comprises: In response to the eighth operation of triggering the creation of a clone application of the main application, an Nth clone application is created, 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, and N is a positive integer, and N is less than or equal to a first preset value.

10. The method according to any one of claims 1 to 9, wherein The method further comprises: In response to a ninth operation triggering opening of a second application, creating a first application instance of the second application, wherein a package name of the first application instance is the same as a package name of the second application, and an application identifier of the first application instance is the same as an application identifier of the second application; When the first application instance is created, in response to the tenth operation that triggers opening the second application, a second application instance of the second application is created, 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.

11. The method according to claim 10, wherein The second application has corresponding configuration information, where 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 is less than or equal to a second preset number.

12. An electronic device, characterized in that: The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, and is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the electronic device to execute the method according to any one of claims 1 to 11.

13. A chip system, characterized in that: The chip system is applied to an electronic device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the electronic device executes 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. When the computer instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 11.

15. A computer program product, characterized in that The computer program product comprises a computer program code, and when the computer program code is run on an electronic device, the electronic device is enabled to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Multi-case target establishing method, apparatus and mobile terminal

    CN106227588A

  • Information processing method and terminal

    CN107291322A

  • Terminal equipment control method and device, terminal equipment and computer readable storage medium

    CN108228472A

  • Data access method, electronic equipment and computer readable storage medium

    CN117785498A

  • Apparatus and method for running multiple instances of a same application in mobile devices

    EP3048552A1