Method for sharing data between applications and electronic device
Patent Information
- Application Number
- CN202310799094.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In operating systems, data synchronization between multiple applications is redundant and wasteful of resources, resulting in poor data synchronization efficiency and performance. Furthermore, data isolation mechanisms between different applications limit data sharing.
By creating shared sandboxes in electronic devices and establishing a mapping relationship between application sandboxes and shared sandboxes, different applications can share data under an isolation mechanism, use shared identifiers to confirm access permissions, and directly achieve data sharing when the interface jumps.
It improves the efficiency of data sharing between multiple applications, reduces resource waste, enhances user experience, and strengthens data security.
Smart Images

Figure CN119227055B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a data sharing method and electronic device between applications. Background Technology
[0002] An operating system (OS) is a set of interconnected system software programs that manage and control computer operation, the use and operation of hardware and software resources, and the provision of public services to organize user interaction. Operating systems include mobile operating systems, and applications running on a mobile operating system are called applications (APPs, hereinafter referred to as apps). For each app, the system creates a dedicated application sandbox directory in the storage space. Apps can store and process their own data in this sandbox directory; within this dedicated sandbox directory, an app can only see the data of the current app; correspondingly, files in this dedicated sandbox directory are not visible to other apps. In this way, different apps run in different application sandboxes, thus completely isolating data between different apps and ensuring application data security, but also limiting data sharing between apps.
[0003] In some real-world scenarios, multiple applications require data synchronization. For example, step counts in application A and application B need to be consistent; applications A, B, and C should all display the same status (e.g., night mode). Therefore, applications need to synchronize data via cloud communication or local inter-process communication, which leads to data redundancy and resource waste, resulting in poor efficiency and performance. Summary of the Invention
[0004] This application provides a data sharing method and electronic device for inter-application, which reduces resource waste and improves the efficiency of data sharing among multiple applications.
[0005] Firstly, embodiments of this application provide a data sharing method between applications, applied to an electronic device. This method can be executed by the electronic device itself, or by components such as chips, processors, or chip systems within the device. This application does not limit its scope. The following description uses an electronic device executing this method as an example. The method includes: the electronic device responding to a first user operation by running a first application; the electronic device determining a shared sandbox corresponding to the first application; the electronic device writing first data from the first application into the shared sandbox; wherein the first data is used for sharing with a second application; the electronic device responding to a second user operation by running a second application; and the electronic device reading the first data from the shared sandbox.
[0006] Using this method, the first and second applications in an electronic device can write and read data in a shared sandbox respectively. Therefore, even with isolation mechanisms between application sandboxes of different applications, data sharing between the first and second applications can be achieved, thereby reducing resource waste, improving data sharing efficiency, and thus enhancing the user experience.
[0007] In one possible design, before the electronic device writes the first data, the method further includes: the electronic device creating a shared sandbox based on a first application and a second application; the electronic device establishing a first mapping relationship, which is a mapping relationship between the directory of the first application sandbox and the directory of the shared sandbox; the first application sandbox is the data storage space corresponding to the first application.
[0008] With this design, electronic devices can create shared sandboxes and establish a mapping relationship between the directories of the first application sandbox and the shared sandbox. Thus, the first application can determine the shared sandbox through the directory of the first application sandbox, improving the efficiency of data sharing.
[0009] In one possible design, the electronic device establishes a second mapping relationship, which is a mapping relationship between the directory of the second application sandbox and the directory of the shared sandbox; the second application sandbox is the data storage space corresponding to the second application.
[0010] With this design, electronic devices can establish a mapping relationship between the directory of the second application sandbox and the directory of the shared sandbox. Thus, even when the second application has an isolation mechanism, the shared sandbox can be determined through the directory of the second application sandbox, thereby improving the efficiency of data sharing.
[0011] In one possible design, the signing certificate of the first application includes a first shared identifier, and the signing certificate of the second application includes a second shared identifier; the first shared identifier and the second shared identifier are the same; the aforementioned electronic device creates a shared sandbox, including: the electronic device creates a shared sandbox based on the first shared identifier or the second shared identifier.
[0012] By configuring shared identifiers within applications, this design allows for the identification of applications accessing the shared sandbox based on the shared identifiers of the shared sandbox and the shared identifiers of different applications. This reduces the probability of data in the shared sandbox being maliciously tampered with or stolen, thereby improving data security.
[0013] In one possible design, the aforementioned electronic device determines the shared sandbox corresponding to the first application, including: the electronic device determines the shared sandbox based on the directory of the first application sandbox and the first mapping relationship; the aforementioned electronic device reads the first data from the shared sandbox, including: the electronic device determines the shared sandbox based on the directory of the second application sandbox and the second mapping relationship; the electronic device reads the first data from the shared sandbox.
[0014] With this design, based on the first and second mapping relationships, the first and second applications can determine the shared sandbox through their respective application sandbox directories, thereby writing and reading data in the shared sandbox.
[0015] In one possible design, the aforementioned electronic device responds to a second user operation by running a second application, including: the electronic device detecting a screen switching instruction in the user interface of the first application; the electronic device switching the first application from foreground to background operation in response to the screen switching instruction; and the electronic device running the second application and displaying the user interface of the second application.
[0016] With this design, electronic devices can directly switch between user interfaces of different applications when an interface switching command is detected. Compared to the traditional method of requiring user authorization to confirm whether to switch, this design can reduce user operation redundancy and improve user experience when data sharing between multiple applications is known.
[0017] In one possible design, the user interface of the first application is the first login interface, the user interface of the second application is the second login interface, and the first data includes account data and password data.
[0018] In one possible design, the first application has the same business function as at least one target application; the second application is one of at least one target application; before the electronic device determines the shared sandbox corresponding to the first application, the method further includes: the electronic device determining that the first data is data with the same business function as described above.
[0019] By adopting this design, the first application can determine the shared sandbox for writing the first data as a shared sandbox for both the first and second applications based on the business function to which the first data belongs, thus preventing the first data from being read by other applications and improving data security.
[0020] In one possible design, the first data is configuration information, and the method further includes: when the electronic device is running the second application, it can update the configuration file of the second application based on the configuration information.
[0021] With this design, the first and second applications can update configuration files based on the aforementioned data sharing method between applications, thereby reducing user operations and improving user experience.
[0022] Secondly, embodiments of this application provide an inter-application data sharing device, which includes modules / units that execute the methods described in the first aspect or any possible design of the first aspect; these modules / units can be implemented in hardware or by hardware executing corresponding software.
[0023] Thirdly, this application also provides an electronic device, including a processor, a microcontroller unit, and a memory. The memory stores one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor and the microcontroller unit, the electronic device performs the data sharing method between applications described in the first aspect or any possible design of the first aspect.
[0024] Fourthly, this application also provides an electronic device, including a microcontroller unit and a memory. The memory stores one or more computer programs; when the one or more computer programs stored in the memory are executed by the microcontroller unit, the electronic device performs the inter-application data sharing method described in the first aspect or any possible design of the first aspect.
[0025] Fifthly, this application also provides a computer-readable storage medium storing instructions that, when executed on an electronic device, cause the electronic device to perform the inter-application data sharing method described in the first aspect or any possible design of the first aspect.
[0026] Sixthly, this application also provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method described in the first aspect or any possible design of the first aspect.
[0027] In a seventh aspect, embodiments of this application also provide a chip, the chip including a processor and a microcontroller unit; the processor sends accessory management information to the microcontroller unit, and the microcontroller unit implements the data sharing method between applications described in the first aspect or any possible design of the first aspect based on the accessory management information.
[0028] Eighthly, embodiments of this application also provide a chip system including a processor for supporting an inter-application data sharing method for a computer device to implement the first aspect or any possible design of the first aspect. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. The chip system may be composed of chips or may include chips and other discrete devices.
[0029] The technical effects that can be achieved by any of the second to eighth aspects mentioned above can be described with reference to the technical effects that can be achieved by any possible design in the first aspect mentioned above. The repetitions will not be discussed. Attached Figure Description
[0030] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0031] Figure 2 A software structure block diagram of an electronic device provided in an embodiment of this application;
[0032] Figure 3a A display interface diagram of an electronic device provided in an embodiment of this application;
[0033] Figure 3b A display interface diagram of another electronic device provided in an embodiment of this application;
[0034] Figure 3c An example diagram illustrating the application uploading process provided in this application embodiment;
[0035] Figure 3d A display interface diagram of another electronic device provided in an embodiment of this application;
[0036] Figure 4 A flowchart illustrating a data sharing method between applications provided in an embodiment of this application;
[0037] Figure 5a An example diagram illustrating a directory mapping method provided in an embodiment of this application;
[0038] Figure 5b An example diagram illustrating another directory mapping method provided in this application embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] In the description of the embodiments of this application, "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. "Multiple" in this application refers to two or more. Furthermore, it should be understood that in the description of this application, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0041] The following explanations of some terms used in this application are provided to facilitate understanding by those skilled in the art.
[0042] (1) Application: or simply application, is a software program that can perform one or more specific functions. Typically, multiple applications can be installed on an electronic device. Examples include camera applications, SMS applications, email applications, video applications, and music applications. The applications mentioned below can be those pre-installed at the factory or those downloaded by the user from the internet or obtained from other electronic devices during use.
[0043] The application can be an instant app (IAPP), which does not require explicit installation or uninstallation. Instant apps are installed automatically by the system's application framework and can be used immediately. Uninstallation of instant apps can be managed automatically by the system's application framework. In some examples, instant apps include quick apps, mini-programs, and service cards.
[0044] (2) Application Sandbox: Through access control mechanisms such as discretionary access control (DAC) and mandatory access control (MAC), system resources are isolated to protect the application itself and the system from attacks by malicious applications.
[0045] It's important to note that an application sandbox is an isolation mechanism designed for security protection, preventing data from being accessed via malicious paths. Therefore, under this sandbox protection mechanism, the data visible to an application can be limited to data stored within the application sandbox. For an application employing this isolation mechanism, the electronic device's operating system maps a dedicated application sandbox into its internal storage space; files within the application sandbox are private. The application sandbox corresponds to the interface `cacheDir` for retrieving the cache directory and the interface `filesDir` for retrieving the file directory.
[0046] In some examples, the application sandbox directory includes an application file directory. This application file directory is a directory added to the internal storage of the electronic device after the application is installed. This directory could be, for example, data / data / com.xxx.xx.
[0047] In other instances, the application sandbox directory may also include a directory containing a subset of system files (such as a small number of system files necessary for the application to run).
[0048] It should be understood that other applications cannot access files within an application's application sandbox directory. Consequently, when an application is uninstalled, all files within the application sandbox directory will be removed.
[0049] (3) Upload to app store: Upload the completed APP application to the app store. The uploaded application can be downloaded and used by users.
[0050] In some scenarios, users install more and more applications on their electronic devices, such as mobile phones. These applications generate a large amount of data during use, and there is some overlap between the data generated by different applications. Therefore, application data occupies a significant amount of storage space. As usage time increases, the phone's storage space will decrease.
[0051] In view of this, this application provides a data sharing method between applications, which can share overlapping data between multiple applications to save storage space occupied by applications, improve storage space utilization, and enhance user experience.
[0052] It should be noted that the data sharing method between applications provided in this application embodiment can be applied to electronic devices, also known as user equipment (UE), mobile station (MS), mobile terminal (MT), etc., which are devices that provide voice or data connectivity to users, and can also be Internet of Things (IoT) devices. For example, electronic devices include handheld devices with wireless connectivity, vehicle-mounted devices, etc. Currently, electronic devices can include: mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices (such as smartwatches, smart bracelets, pedometers, etc.), in-vehicle equipment (such as cars, bicycles, electric vehicles, airplanes, ships, trains, high-speed trains, etc.), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, smart home devices (such as refrigerators, televisions, air conditioners, electricity meters, etc.), intelligent robots, workshop equipment, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, or wireless terminals in smart homes, and flying equipment (such as intelligent robots, hot air balloons, drones, airplanes), etc. Electronic devices can also be devices that act as terminals in device-to-device (D2D) communication. The electronic devices involved in the embodiments of this application may be foldable electronic devices, such as foldable mobile phones, foldable tablets, etc., and this application is not limited thereto. Furthermore, exemplary embodiments of the electronic devices include, but are not limited to, those equipped with… Or electronic devices with other operating systems.
[0053] The following section uses a mobile phone as an example to introduce the structure of electronic devices.
[0054] like Figure 1As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 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, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0055] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the mobile phone 100. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has recently used or is reusing. If the processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the processor 110's waiting time, and thus improves system efficiency.
[0056] USB interface 130 is a USB standard compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. USB interface 130 can be used to connect a charger to charge mobile phone 100, and can also be used for data transfer between mobile phone 100 and peripheral devices. Charging management module 140 receives charging input from the charger. Power management module 141 connects to battery 142, charging management module 140, and processor 110. Power management module 141 receives input from battery 142 and / or charging management module 140, providing power to processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0057] The wireless communication function of mobile phone 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 100 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0058] The display screen 194 is used to display the application's interface, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0059] Camera 193 is used to capture still images or videos. Camera 193 may include a front-facing camera and a rear-facing camera.
[0060] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and software code for at least one application (e.g., iQiyi application, WeChat application, etc.). The data storage area may store data generated during the use of the mobile phone 100 (e.g., images, videos, etc.). Furthermore, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0061] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, images, videos, and other files can be saved on the external storage card.
[0062] The mobile phone 100 can achieve audio functions such as music playback and recording through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0063] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of mobile phone 100, in a different position than display screen 194.
[0064] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch buttons. The mobile phone 100 can receive button input and generate key signal inputs related to user settings and function control. Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations applied to different applications (such as taking photos, playing audio, etc.). Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 100.
[0065] Understandable Figure 1 The components shown do not constitute a specific limitation on the mobile phone. The mobile phone may include more or fewer components than shown, or combine some components, or separate some components, or have different component arrangements.
[0066] The software system of the aforementioned mobile phone 100 can adopt a layered architecture, including event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered Android system as an example to exemplify the software structure of the mobile phone 100. It should be understood that the system in this application embodiment can also be... This application does not impose any limitations on this.
[0067] The following section introduces the software architecture of electronic devices in different scenarios. Figure 2 This is a software structure block diagram of the mobile phone 100 according to an embodiment of this 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, from top to bottom: the application layer, the application framework layer, the Android runtime (ART) and native C / C++ libraries, the hardware abstraction layer (HAL), and the kernel layer.
[0068] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package can include applications such as desktop, settings, gallery, calendar, call, map, navigation, music, video, and text messaging.
[0069] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example... Figure 2 As shown, the application framework layer may include a space compression manager, window manager, content provider, view system, resource manager, notification manager, activity manager, input manager, etc.
[0070] The Android runtime consists of the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into machine code. The Android runtime primarily employs ahead-of-time (AOT) compilation and just-in-time (JIT) compilation techniques.
[0071] The core library primarily provides basic Java class library functionalities, such as libraries for fundamental data structures, mathematics, I / O, tools, databases, and networking. It also provides APIs for users to develop Android applications.
[0072] Native C / C++ libraries can include multiple functional modules. Examples include: surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0073] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to the upper layers.
[0074] The kernel layer is the layer between hardware and software. At a minimum, the kernel layer includes the file system, display driver, Bluetooth driver, camera driver, audio driver, and sensor driver. The file system provides file compression capabilities.
[0075] In some embodiments of this application, the electronic device supports multiple applications, such as one or more of the following applications: application A, application B, application C, portable application a1, portable application a2, and portable application b1. The portable application is not limited to running on the application's host (desktop, service center, etc.) in the form of card-type desktop elements such as service cards or desktop widgets. For ease of understanding, embodiments of this application provide simple examples of the electronic device's interface.
[0076] For example, when the electronic device is a mobile phone, such as Figure 3a As shown, the phone's main interface can display application icons and service cards for applications that do not require installation. Specifically, the phone's interface can display icons for applications A, B, and C, as well as service cards for applications a1, a2, and b1 that do not require installation.
[0077] For example, when the electronic device is a tablet computer, such as Figure 3b As shown, the main interface of the tablet computer can display the icons of applications and the service cards of applications that do not require installation. The interface of the tablet computer can display the icons of application A, application B and application C, as well as the service cards of applications a1, a2 and b1 that do not require installation.
[0078] In some real-world scenarios, overlapping data may exist between multiple applications. One possible design approach is for application developers to create applications through their developers. For example, such as... Figure 3c As shown, the integrated development environment (IDE) that developers can develop includes the following business functions: navigation, bike sharing, and ride-hailing. Accordingly, developers can list these three business functions as a complete application A in the app store, and list the bike sharing and ride-hailing functions as portable applications a1 and a2, respectively. It should be understood that all applications listed in the app store (including portable applications) are available for download and use by users. For example, application B includes store recommendation and store navigation functions; application C includes SMS sending and receiving functions. It should be understood that the developers of applications B and C may be the same as or different from the developer of application A; this embodiment does not limit this.
[0079] Based on the business functions described in the aforementioned scenario examples, it is known that the overlapping data between application A and application B includes commonly used location information for navigation; the overlapping data between application A, application B, and application C includes application mode settings (such as whether night mode is enabled), which can ensure consistency of status information among multiple applications; the overlapping data between application A and the portable application a1 includes shared bicycle riding route records; and the overlapping data between application A and the portable application a2 includes commonly used taxi destinations. Therefore, to save storage space occupied by applications, it is essential for different applications to improve storage space utilization through data sharing.
[0080] However, in some operating systems, applications can be organized for distribution in app stores by packaging individual applications into standalone application packages (APP Packs) and installing them separately. For example, in... In a HarmonyOS application, an App Pack contains one or more HarmonyOS Ability Packages (HAPs). An App Pack has the extension ".app". An HAP file contains the application's code, resources, third-party libraries, and application configuration files; its file extension is ".hap". Because the HAP package names for different applications may differ, the lifecycles of different applications may be completely independent during runtime. Furthermore, different applications may run in different application sandboxes, resulting in potentially complete data isolation and making data sharing difficult.
[0081] This application provides a data sharing method between applications, aiming to achieve data sharing between different applications, reduce resource waste, and improve the efficiency of data sharing between multiple applications.
[0082] Figure 4 This application provides a flowchart illustrating a data sharing method between applications, applicable to electronic devices, such as those used in this application. Figure 1 The mobile phone 100 shown in the method includes, but is not limited to, the user interface of the electronic device described above. Figure 3a and Figure 3b See below. Figure 4 The method provided in the application embodiments will be described.
[0083] S401: The electronic device responds to a first user action by running a first application. For example, the first action is the user opening the first application.
[0084] It should be understood that the first application could be as follows: Figure 3a or Figure 3b Any one of the applications A, B, C, portable application a1, portable application a2, and portable application b1 shown in this application embodiment is not limited to this.
[0085] In one possible design, the first application and at least one target application may have the same business functions. It should be understood that the same business functions may have overlapping data in different applications.
[0086] For example, in such Figure 3c In the scenario shown, the applications supported by the electronic device include application A, installation-free application a1, and installation-free application a2. Application A and installation-free application a1 both have shared bicycle service functions, and application A and installation-free application a2 both have ride-hailing service functions. In this embodiment of the application, it is assumed that the first application is application A, then at least one target application includes installation-free application a1 and installation-free application a2.
[0087] In one possible design, application developers can create applications through app stores. These developers can apply for one or more shared identifiers. Developers can then configure these shared identifiers in the application's signing certificate. After completing development, testing, and certification, the application developers formally submit their application and signing certificate to the app store. Once the app store's reviewers confirm the signing certificate has passed review, they set the application's status to "listed," indicating that the listing process is complete.
[0088] Accordingly, users can download and use the application via electronic devices. The aforementioned verification process includes confirming that the shared identifier in the signature certificate belongs to the developer. This establishes a correspondence between the shared identifier and the application's developer, preventing other developers from impersonating the developer and stealing data, thus improving data security.
[0089] Based on this design, the signing certificate of the first application includes a first shared identifier. It should be understood that the signing certificate of the first application may include multiple first shared identifiers, and this embodiment of the application does not limit this.
[0090] For example, when the first application is uploaded, the electronic device can determine the first shared identifier configured in the first application's signing certificate. The configuration methods for this first shared identifier include, but are not limited to, the following configuration method one and configuration method two:
[0091] Configuration Method 1: The electronic device can determine that the first shared identifier is the shared identifier of the developer or vendor of the first application. In this way, the signing certificate of the first application includes a first shared identifier. It should be understood that the same developer or vendor can correspond to multiple applications and / or multiple portable applications; this embodiment does not limit this.
[0092] Still with Figure 3c The scenario shown is an example. Suppose that the developer of application A is D1, and the signing certificate of application A includes D1's shared identifier.
[0093] Configuration Method 2: The first application and at least one target application have at least two identical business functions, specifically: business function 1 and business function 2; correspondingly, the electronic device can determine that the first shared identifier is either the shared identifier corresponding to business function 1 or the shared identifier corresponding to business function 2. Thus, the first application is configured with at least two first shared identifiers.
[0094] Still with Figure 3cThe scenario shown is an example where application A and the installation-free application a1 have the same business function (shared bicycle business function), and application A and the installation-free application a2 have the same business function (ride-hailing business function); the electronic device can determine that the first sharing identifier is the sharing identifier corresponding to the shared bicycle business function or the sharing identifier corresponding to the ride-hailing business function.
[0095] In one possible design, the electronic device may also create a shared sandbox before performing the action shown in step S401. In some examples, the electronic device may create a shared sandbox based on a first shared identifier.
[0096] Optionally, the electronic device may trigger the aforementioned action of creating a shared sandbox when it detects a creation command; or, the electronic device may trigger the aforementioned action of creating a shared sandbox when the first application and at least one target application with the same shared identifier are both installed on the electronic device.
[0097] In some examples, when an electronic device receives a creation command (i.e., detects a creation command), it can trigger the aforementioned action of creating a shared sandbox. Accordingly, after triggering the shared sandbox creation action, the electronic device can create shared sandboxes based on multiple applications corresponding to the creation command. For example, assuming that the signing certificates of the multiple applications corresponding to the creation command all include a shared identifier of developer D2, the electronic device can create a shared sandbox based on the shared identifier corresponding to D2. Here, D2 and the aforementioned D1 can be the same or different; this embodiment does not limit this.
[0098] In other examples, when at least two applications installed on an electronic device share the same shared identifier, the electronic device triggers the aforementioned action of creating a shared sandbox, which is used for data sharing between the at least two applications. The shared identifier is the shared identifier of the shared sandbox.
[0099] When the shared identifier of an application adopts the configuration method described above, the shared identifier of the shared sandbox can be a shared identifier corresponding to the development vendors or developers of at least two applications (e.g., the shared identifier corresponding to D1).
[0100] When the application's shared identifier adopts the aforementioned configuration method two, the shared identifier of the shared sandbox can be a shared identifier corresponding to the same business function of at least two applications (e.g., the shared identifier corresponding to business function 1).
[0101] by Figure 3cFor example, in the scenario shown, when both application A and the portable application a1 are installed on an electronic device, and application A and the portable application a1 have the same shared identifier, the action of creating a shared sandbox is triggered. The electronic device can determine that application A and the portable application a1 have the same business function (shared bicycle business function), that is, application A and the portable application a1 have the same shared identifier (the shared identifier corresponding to the shared bicycle business function). The electronic device can also determine that the shared identifier of the shared sandbox is the shared identifier corresponding to the shared bicycle business function. Accordingly, the electronic device can create a shared sandbox based on the shared identifier corresponding to the shared bicycle business function.
[0102] In this embodiment, the application sandbox of the first application is a data storage space corresponding to the first application. Therefore, the first application can access the data corresponding to the first application sandbox. Furthermore, as exemplified in the embodiments, the first application can also access the corresponding shared sandbox.
[0103] Based on the aforementioned design, before performing the action shown in step S401, the electronic device can also determine that the shared identifier of the first application is the same as the shared identifier of the shared sandbox; the electronic device can also establish a first mapping relationship, which is the mapping relationship between the directory of the first application sandbox and the directory of the shared sandbox.
[0104] For example, the electronic device can also determine that the shared identifier of application A (the shared identifier of D1) is the same as the shared identifier of the shared sandbox (the shared identifier corresponding to D2); or, the electronic device can determine that the shared identifier of application A and the shared identifier of the shared sandbox are both shared identifiers corresponding to the shared bicycle business function.
[0105] Optionally, the directory of the first application sandbox includes at least one module directory, and the electronic device establishes a mapping relationship between the module directory and the directory of the shared sandbox, that is, establishes a first mapping relationship.
[0106] For example, the directory of the first application sandbox includes one or more HAP directories, which can serve as module directories. Figure 5a As shown, the directory of the first application sandbox includes module directory 1, and the first mapping relationship is the mapping relationship between module directory 1 and the directory of the shared sandbox.
[0107] For example, such as Figure 5bAs shown, the first application sandbox includes module directory 2 and module directory 3. The electronic device includes two shared sandboxes, corresponding to shared sandbox directory 1 and shared sandbox directory 2 respectively. The first mapping relationship is the mapping relationship between module directory 2 and shared sandbox directory 1, or the first mapping relationship is the mapping relationship between module directory 3 and shared sandbox directory 2. It should be understood that the electronic device can establish mapping relationships between multiple module directories and one or more shared sandbox directories, and this application embodiment does not limit this.
[0108] Optionally, the data storage space corresponding to the application in this application can be internal storage space or external storage space, and this application embodiment does not limit this. Among them, internal storage space can be storage space that users need to access through root access or other means, while external storage space can be storage space that users can access through file managers or other means; it should be understood that users generally cannot access data in internal storage space.
[0109] S402: The electronic device determines the shared sandbox corresponding to the first application; the electronic device writes the first data into the shared sandbox. The first data is used for sharing with the second application.
[0110] It should be understood that the second application can be as follows: Figure 3a or Figure 3b Any one of the applications A, B, C, portable application a1, portable application a2, and portable application b1 shown in this application embodiment is not limited to this.
[0111] In some examples, the electronic device can determine the shared sandbox based on the directory of the first application sandbox and the first mapping relationship, thereby writing the first data into the shared sandbox.
[0112] For example, such as Figure 5b As shown, assuming the first mapping relationship is between module directory 2 and shared sandbox directory 1, the electronic device can find module directory 2 in the directory of the first application sandbox and determine the shared sandbox (e.g., determine the interface to access the shared sandbox) according to the first mapping relationship.
[0113] Optionally, assuming that the first application and the second application have the same business functions, before the electronic device performs the action shown in step S402, the electronic device may also determine that the first data is data with the same business functions as mentioned above.
[0114] Still with Figure 3c The scenarios shown are examples where the electronic device can determine that the first data is data from the aforementioned shared bicycle service function, or the electronic device can determine that the first data is data from the aforementioned ride-hailing service function.
[0115] S403: In response to a second user action, run a second application; the electronic device reads first data from the shared sandbox. For example, the second action is the user's action of opening the second application.
[0116] Optionally, before reading the first data from the shared sandbox, the electronic device may detect a third action by the user. For example, the third action could be the user generating an access request for the first data via the electronic device.
[0117] In one possible design, the second application is one of the aforementioned at least one target application.
[0118] Still with Figure 3c The scenario shown is an example where application A and the installation-free application a1 both have bike-sharing service functions, and application A and the installation-free application a2 both have ride-hailing service functions; assuming the first application is application A, the second application can be either installation-free application a1 or installation-free application a2.
[0119] In one possible design, the signing certificate of the second application includes a second shared identifier. It should be understood that the signing certificate of the second application may include multiple second shared identifiers, and this embodiment of the application does not limit this.
[0120] For example, an electronic device can determine a second shared identifier configured in the signing certificate of a second application. The configuration methods for this second shared identifier include, but are not limited to, the configuration methods one and two used by the aforementioned first application, which will not be elaborated here.
[0121] For example, when using configuration method one, assuming the second application is an installation-free application a1, and the developer of installation-free application a1 is D3, the electronic device can determine that the second shared identifier corresponding to installation-free application a1 is the shared identifier of D3. Here, D3 may be the same as or different from the aforementioned D1 and D2; this embodiment of the application does not limit this.
[0122] For example, when using configuration method two, assuming the second application is an installation-free application a1, and the installation-free application a1 has the same business function as application A (shared bicycle business function); the electronic device can determine that the second sharing identifier corresponding to the installation-free application a1 is the sharing identifier corresponding to the shared bicycle business function.
[0123] In some examples, the second shared identifier is the same as the first shared identifier, and the electronic device can create a shared sandbox based on the second shared identifier before performing the action shown in step S401.
[0124] In one possible design, before performing the action shown in step S403, the electronic device can determine that the shared identifier of the second application is the same as the shared identifier of the shared sandbox.
[0125] For example, the electronic device can also determine that the shared identifier of the installation-free application a1 (the shared identifier of D3) is the same as the shared identifier of the shared sandbox (the shared identifier corresponding to D2); or, the electronic device can determine that the shared identifier of the installation-free application a1 and the shared identifier of the shared sandbox are both shared identifiers corresponding to the shared bicycle business function.
[0126] In this embodiment, the data storage space corresponding to the second application is a second application sandbox. The second application can access the data corresponding to the directory of the second application sandbox. Furthermore, as exemplified in the embodiments, the second application can also access the corresponding shared sandbox.
[0127] Based on the aforementioned design, before executing the action shown in step S403, the electronic device can also determine that the shared identifier of the second application is the same as the shared identifier of the shared sandbox; the electronic device can also establish a second mapping relationship, which is a mapping relationship between the directory of the second application sandbox and the directory of the shared sandbox. Accordingly, when executing the action shown in step S403, the electronic device can determine the shared sandbox (e.g., determine the interface for accessing the shared sandbox) based on the directory of the second application sandbox and the second mapping relationship.
[0128] The directory of the second application sandbox may include at least one module directory. The electronic device establishes a mapping relationship between this module directory and the directory of the shared sandbox, that is, establishes a second mapping relationship. In the embodiments of this application, the method by which the electronic device establishes the second mapping relationship may be the same as or different from the aforementioned method for establishing the first mapping relationship, and the embodiments of this application do not limit this.
[0129] For example, such as Figure 5a As shown, the directory of the second application sandbox includes module directory 4, and the second mapping relationship is the mapping relationship between module directory 4 and the directory of the shared sandbox.
[0130] For example, such as Figure 5b As shown, the directory of the second application sandbox includes module directory 5, and the second mapping relationship is the mapping relationship between module directory 5 and shared sandbox directory 1. The applications supported by the electronic device may also include a third device. The data storage space corresponding to the third application is the third application sandbox, and the electronic device can also establish a third mapping relationship, which is the mapping relationship between the directory of the third application sandbox and the directory of the shared sandbox. When the directory of the third application sandbox includes module directory 6, the third mapping relationship can be the mapping relationship between module directory 6 and shared sandbox directory 2.
[0131] exist Figure 5b In the example shown, the first application sandbox directory could be Figure 3cThe data storage space corresponding to application A shown in the diagram, and the second application sandbox directory can be... Figure 3c The data storage space corresponding to the portable application a1 shown in the diagram, and the third application sandbox directory can be... Figure 3c The data storage space corresponding to the portable application a2 shown in the figure.
[0132] Optionally, when the data storage space corresponding to the second application is a shared sandbox, or in other words, when the sandbox of the second application is the same as the shared sandbox, the second application can directly access the data in the shared sandbox.
[0133] For example, application A includes three business functions: navigation, bike sharing, and ride-hailing, while the installation-free application a1 only includes one business function: bike sharing. In this case, the business functions of application A completely cover the business functions of the installation-free application a1. Electronic devices can then use the data storage space of the installation-free application a1 (e.g., an application sandbox) as a shared sandbox.
[0134] In one possible design, when the first application is running, the electronic device detects a screen transition command in the user interface of the first application; in response to the screen transition command, the electronic device switches the user interface from running the first application in the foreground to running it in the background; then it runs the second application and displays the user interface of the second application. In other words, when the target application for the screen transition command is the second application, and the shared identifier of the second application is the same as that of the first application, the electronic device can directly transition the user interface from the first application's interface to the second application's interface without user authorization; otherwise, the electronic device needs to obtain user authorization before transitioning the user interface from the first application's interface to the second application's interface.
[0135] In this way, when different applications share the same identifier, electronic devices can directly switch interfaces when they detect a screen switching command. Compared to the traditional method of requiring user authorization to confirm whether to switch, this method can reduce the number of steps required by the user and improve the user experience when multiple applications have the same business functions.
[0136] Optionally, the user interface of the first application can be a first login interface, and the user interface of the second application can be a second login interface. The first data may include account data and password data. Accordingly, after displaying the second login interface of the second application, the electronic device can read the account data and password data from the shared sandbox, thereby enabling user login.
[0137] Based on the foregoing Figure 3c In the scenario shown, the username and password used to log in to the installation-free application a1 and the login application A may be the same. This application embodiment provides an example diagram of a second application login / registration interface, as shown... Figure 3dAs shown, the login interface requires users to enter their username and password. Assuming the first application is application A and the second application is a portable application a1, when running portable application a1, the electronic device can access the shared sandbox of application A and portable application a1 to read the username and password, thus completing the login. Therefore, users do not need to re-enter their username and password when running portable application a1, reducing redundant user operations and improving the user experience.
[0138] In one possible design, when the first data is configuration information, the electronic device runs a second application and updates the configuration file of the second application according to the configuration information.
[0139] In some examples, the first application is application A, and the second application is either a portable application a1 or a portable application a2. For example, when application A is running, the first data written by the electronic device to the shared sandbox is: the theme style is selected as "Theme One". Portable applications a1 or a2 can read this first data from the shared sandbox: the theme style is selected as "Theme One". Assuming that this first data is configuration information, the electronic device can also configure the corresponding theme style of portable applications a1 or a2 to "Theme One" according to this configuration information. Conversely, portable applications a1 or a2 can also write configuration information to make application A update its configuration file. This application embodiment does not limit this.
[0140] For example, such as Figure 3a or Figure 3b As shown in the interface diagram, the installation-free application appears as a service card, allowing electronic devices to refresh these service cards using the aforementioned design. A service card is a service format that provides a more intuitive and concise visual component than an application (APP), directly displaying the services or content most relevant to the user in an interactive format. Furthermore, service cards can track changes in services or content over time, displaying the latest information; for example, a weather app's service card displays up-to-date weather information. Service cards can be embedded in various apps or interactive scenarios to better meet user needs.
[0141] In some examples, the scenarios for which service cards are applicable can also be applied to widgets, micro-widgets, or other similar applications.
[0142] Taking application A as the first application and application a1 (no installation required) as the second application, assuming that initially, the background color of both application A and application a1 is blue, the configuration data of the service card corresponding to application a1 includes: {"BackgroundColor":"blue"}. If the user needs to change the background color of application A and application a1 to red, when application A is running, the electronic device can write first data to the shared sandbox to indicate that the background color should be changed to red, as shown in step S402 above. The first data includes: {"BackgroundColor":"red"}. Correspondingly, when application a1 is running, the electronic device can read the first data from the shared sandbox as shown in step S403 above. Furthermore, the electronic device can also update the background color of the service card of application a1 to red according to the first data, thereby refreshing the service card.
[0143] By employing the data sharing method between applications provided in this application embodiment, electronic devices enable a first application and a second application to write and read data within a shared sandbox. Therefore, even with an isolation mechanism in the first application sandbox, data sharing between the first and second applications can be achieved, reducing resource waste, improving data sharing efficiency, and thus enhancing the user experience. Simultaneously, this method does not require explicit cloud communication or local inter-process communication for data synchronization, improving ease of use for developers and vendors, saving electronic device resources, and reducing system power consumption.
[0144] based on Figure 4 The method provided in the illustrated embodiments also includes an example of data sharing. In this example, the applications supported by the electronic device include: APP1, IAPP1, IAPP2, and IAPP3. APP1 has overlapping data with IAPP1, IAPP2, and IAPP3. Based on this, the data sharing method between APP1, IAPP1, IAPP2, and IAPP3 includes, but is not limited to, the following steps:
[0145] Step 1: When developing an application, the developer can apply for three shared identifiers through the application market, namely identifier (mark)1, mark 2 and mark 3. The developer can configure mark 1, mark 2 and mark 3 in APP1, mark 1 in IAPP1, mark 2 in IAPP2 and mark 3 in IAPP3 through electronic devices.
[0146] Step 2: After APP1, IAPP1, IAPP2 and IAPP3 complete the listing process, the electronic device creates three shared sandboxes according to the shared identifiers configured in APP1, IAPP1, IAPP2 and IAPP3. The shared identifiers of the three shared sandboxes are mark 1, mark 2 and mark 3 respectively.
[0147] Step 3: The electronic device verifies the consistency between the shared identifiers of the three shared sandboxes and the shared identifiers of APP1, IAPP1, IAPP2 and IAPP3. If the verification results are consistent, the mapping relationship between the three shared sandboxes and the four application sandboxes is established respectively.
[0148] In some examples, electronic devices can create interfaces to access the aforementioned three shared sandboxes by using the mapping relationship between any shared sandbox directory and the sandbox directories of APP1, IAPP1, IAPP2, and IAPP3.
[0149] Step 4: When running APP1, the electronic device determines that data1 is the overlapping data of APP1 and IAPP1; the electronic device determines the interface to access the shared sandbox based on the mapping relationship between the sandbox directory of APP1 and the directory of the shared sandbox with the shared identifier mark 1; the electronic device writes data1 to the shared sandbox with the shared identifier mark 1 through this interface.
[0150] Step 5: When running IAPP1, the electronic device determines the interface to access the shared sandbox based on the mapping relationship between the sandbox directory of IAPP1 and the directory of the shared sandbox; the electronic device reads data 1 from the shared sandbox with the shared identifier mark 1 through this interface.
[0151] Step 6: Assume that data 1 contains configuration information, such as configuring night mode. When running IAPP1, the electronic device can also update the IAPP1 configuration to night mode based on data 1.
[0152] Step 7: When APP1 is running, the electronic device detects the interface jump command. The target application to jump to in the interface jump command is IAPP1. Since both the shared identifier of APP1 and the shared identifier of IAPP1 include mark 1, the electronic device responds to the interface jump command and jumps the user interface from the interface of APP1 to the interface of IAPP1.
[0153] Conversely, IAPP1 can also write data so that APP1 can read the data. The specific solution can be understood by analogy with the above embodiments, and will not be repeated here.
[0154] It should be understood that steps 6 and 7 are optional steps, and the electronic device may determine whether to perform them based on the specific implementation.
[0155] The methods provided in the embodiments of this application above are described from the perspective of an electronic device as the executing entity. To implement the functions of the methods provided in the embodiments of this application above, the electronic device may include hardware structures and / or software modules, implementing the above functions in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular function is executed in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0156] This application provides an inter-application data sharing device, which includes modules / units for executing any of the possible designs for writing first data or reading first data. These modules / units can be implemented in hardware or by hardware executing corresponding software. The specific features of the inter-application data sharing device can be referred to the method section of the embodiments provided in this application above, and will not be repeated here.
[0157] Based on the same technical concept, this application also provides an electronic device, which includes at least one processor, at least one memory, and a microcontroller unit. The at least one memory stores computer program instructions. When the electronic device is running, the microcontroller unit performs the functions of the electronic device in the inter-application data sharing method described in the embodiments of this application. For example, when executing... Figure 4 S401 to S403 are executed by the electronic device in the illustrated embodiment.
[0158] Based on the above embodiments, this application also provides an electronic device, which includes at least one memory and a microcontroller unit. The at least one memory stores computer program instructions. When the electronic device is running, the microcontroller unit performs the functions performed by the electronic device in the inter-application data sharing method described in the embodiments of this application. For example, when performing... Figure 4 S401 to S403 are executed by the electronic device in the illustrated embodiment.
[0159] Based on the same technical concept, embodiments of this application also provide a computer storage medium, the computer-readable storage medium including a computer program, which, when run on an electronic device, causes the electronic device to perform the methods provided in the above embodiments.
[0160] The storage medium can be any available medium that a computer can access. For example, but not limited to, a computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
[0161] Based on the same technical concept, this application also provides a computer program product, which includes instructions that, when executed, cause a computer to perform the method provided in the above embodiments.
[0162] Based on the same technical concept, this application also provides a chip. The chip includes a processor and a microcontroller unit; the processor sends accessory management information to the microcontroller unit, and the microcontroller unit implements the method provided in the above embodiments according to the accessory management information.
[0163] Based on the above embodiments, this application also provides a chip for reading a computer program stored in a memory to implement the method provided in the above embodiments. Optionally, the chip may include a processor and a memory, wherein the processor is coupled to the memory and is used to read the computer program stored in the memory to implement the method provided in the above embodiments.
[0164] Based on the above embodiments, this application provides a chip system including a processor for supporting a computer device in implementing the functions involved in the electronic devices described in the above embodiments. In one possible design, the chip system further includes a memory for storing necessary programs and data of the computer device. This chip system may be composed of chips or may include chips and other discrete components.
[0165] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0167] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0168] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
Claims
1. A data sharing method between applications, applied to electronic devices, characterized in that, The method includes: Responding to the user's first action, run the first application; Determine a shared sandbox corresponding to the first application; write the first data of the first application into the shared sandbox; wherein the shared sandbox is used for data sharing between at least two applications, and the first data is used for sharing with a second application; In response to the user's second action, run the second application; read the first data from the shared sandbox; The first application's signing certificate includes a first shared identifier, and the second application's signing certificate includes a second shared identifier that is the same as the first shared identifier. The shared sandbox is created when the first shared identifier and the second shared identifier are the same. The first application corresponds to a first application sandbox, and the second application corresponds to a second application sandbox. The shared sandbox is configured to have a first mapping relationship with the directory of the first application sandbox and a second mapping relationship with the directory of the second application sandbox.
2. The method as described in claim 1, characterized in that, The method further includes: The shared sandbox is created based on the first application and the second application; Establish the first mapping relationship, which is the mapping relationship between the directory of the first application sandbox and the directory of the shared sandbox; Establish the second mapping relationship, which is the mapping relationship between the directory of the second application sandbox and the directory of the shared sandbox.
3. The method as described in claim 2, characterized in that, The step of determining the shared sandbox corresponding to the first application includes: The shared sandbox is determined based on the directory of the first application sandbox and the first mapping relationship; The step of reading the first data from the shared sandbox includes: The shared sandbox is determined based on the directory of the second application sandbox and the second mapping relationship; Read the first data from the shared sandbox.
4. The method according to any one of claims 1-3, characterized in that, The second operation, in response to a second user action, includes running the second application, including: A screen navigation command was detected in the user interface of the first application; In response to the interface jump instruction, the first application is switched from running in the foreground to running in the background; Run the second application and display its user interface.
5. The method as described in claim 4, characterized in that, The user interface of the first application is the first login interface, and the user interface of the second application is the second login interface. The first data includes account data and password data.
6. The method according to any one of claims 1-3 and 5, characterized in that, The first application has the same business functions as at least one target application; The second application is one of the at least one target application; Before determining the shared sandbox corresponding to the first application, the method further includes: The first data is determined to be data for the same business function.
7. The method according to any one of claims 1-3 and 5, characterized in that, The first data is configuration information, and the method further includes: When the second application is run, the configuration file of the second application is updated according to the configuration information.
8. An electronic device, characterized in that, Includes processor, microcontroller unit, and memory; The memory stores one or more computer programs; When one or more computer programs stored in the memory are executed by the processor and the microcontroller unit, the electronic device is able to perform the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 7.
10. A chip, characterized in that, The chip includes a processor and a microcontroller unit. The processor sends accessory management information to the microcontroller unit, and the microcontroller unit implements the method as described in any one of claims 1 to 7 based on the accessory management information.
11. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Multiple containers assigned to an application
US20140366157A1
Content Sharing Between Sandboxed Apps
US20160085602A1
