File sharing method, device, electronic device and storage medium
By injecting restricted sharing dynamic libraries and sharing plug-ins into the device, only target applications with predetermined sharing logos are displayed, which solves the problem that the file sharing scope cannot be effectively restricted and the file is safe and reliable sharing is achieved.
Patent Information
- Application Number
- CN202011506920.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2040-12-18
AI Technical Summary
When sharing files between applications and applications in devices, the existing technology cannot effectively limit the scope of files sharing, resulting in files being easily leaked and posing security risks.
By receiving a file sharing request, the file to be shared with the specified application based on the target application with a predetermined sharing identifier in the default application list. Specific steps include injecting restricted sharing dynamic libraries and sharing plug-ins, re-signing the target application's installation package, and writing to the default application list during installation.
It realizes restrictive management of file sharing, ensuring that files are only allowed to be shared between allowed applications, improving the security and reliability of files and avoiding file leakage.
Smart Images

Figure CN114647434B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application management technology, and in particular to a file sharing method, device, electronic device and storage medium. Background Art
[0002] At present, when sharing files between applications in a device (such as a smartphone), such as sharing between applications in an iOS system, the iOS system controls the sharing. That is, in the standard sharing method provided, any application that declares that it can receive the file will appear in the list of shared recipients, that is, when sharing a file, all applications that have declared that they can receive the file will be displayed. However, for some specific files, it is expected that they can only be shared between designated applications, and the applications that are displayed as being able to receive the file include not only the desired designated applications, but also applications that are not expected to be shared. Therefore, it is easy to cause file leakage, and file sharing has security risks. Summary of the invention
[0003] In view of the problems in the prior art, embodiments of the present invention provide a file sharing method, device, electronic device and storage medium.
[0004] Specifically, the embodiment of the present invention provides the following technical solutions:
[0005] In a first aspect, an embodiment of the present invention provides a file sharing method, comprising:
[0006] Receive file sharing requests;
[0007] Based on the sharing request of the file, obtaining a target application with a predetermined sharing identifier from a default application list, wherein the applications in the default application list include applications declared in a default sharing mode to receive the file;
[0008] Share the file to be shared with the application specified in the target application.
[0009] Furthermore, before obtaining a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file, the method further includes:
[0010] Injecting the restricted sharing dynamic library into the code storage directory of the code file of the target application;
[0011] Injecting a sharing plug-in into a sharing plug-in storage directory in a code file of the target application, wherein the sharing plug-in includes the predetermined sharing identifier;
[0012] After the injection of the restricted sharing dynamic library and the sharing plug-in is completed, the code file of the target application is re-signed to generate an installation package of the target application.
[0013] Furthermore, after generating the installation package of the target application, the method further includes:
[0014] When the installation package of the target application is installed, the predetermined sharing identifier is parsed from the installation package, and after the installation package is successfully installed, the target application and the predetermined sharing identifier are written into the default application list.
[0015] Furthermore, after generating the installation package of the target application, the method further includes:
[0016] When the target application is started, the target application and the predetermined sharing identifier are written into the default application list through the restricted sharing dynamic library.
[0017] Furthermore, obtaining a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file includes:
[0018] Based on the sharing request of the file, traverse the applications in the default application list to filter out a target application with the predetermined sharing identifier from the default application list, and display an icon of the target application;
[0019] The sharing of the file to be shared with the application specified in the target application includes: triggering an icon of the application specified in the target application to share the file with the specified application.
[0020] Furthermore, the target application further includes a file type identifier, and obtaining a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file includes:
[0021] Based on the sharing request of the file, obtaining the file type of the file to be shared;
[0022] The applications in the default application list are traversed to filter out applications with the predetermined sharing identifier from the default application list, and based on the file type of the file, a target application whose file type identifier matches the file type is further filtered out from the applications with the predetermined sharing identifier, and an icon of the target application is displayed.
[0023] In a second aspect, an embodiment of the present invention further provides a file sharing device, including:
[0024] A receiving module, used for receiving a file sharing request;
[0025] an acquisition module, configured to obtain a target application with a predetermined sharing identifier from a default application list based on a sharing request of the file, wherein the applications in the default application list include applications declared in a default sharing mode to be able to receive the file;
[0026] The sharing module is used to share the file to be shared with the application specified in the target application.
[0027] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the file sharing method described in the first aspect are implemented.
[0028] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the file sharing method as described in the first aspect.
[0029] In a fifth aspect, an embodiment of the present invention further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the file sharing method described in the first aspect are implemented.
[0030] It can be seen from the above technical solutions that the file sharing method, device, electronic device and storage medium provided by the embodiments of the present invention can only display the target application with a predetermined sharing identifier obtained from the default application list when sharing files, rather than displaying all applications declared in the default sharing method to receive the file. Therefore, files are only allowed to be shared between allowed applications, thereby realizing restricted management of file sharing, ensuring the security of files, avoiding leakage of files, and preventing them from being leaked to applications other than the specified application through the sharing function, thereby improving the security and reliability of file sharing. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A flowchart of a file sharing method provided by an embodiment of the present invention;
[0033] Figure 2 A structural block diagram of a file sharing device provided by an embodiment of the present invention;
[0034] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] Figure 1 FIG. 1 is a flowchart of a file sharing method provided by an embodiment of the present invention. Figure 1 As shown, the file sharing method provided by the embodiment of the present invention includes the following steps:
[0037] Step 101: Receive a file sharing request.
[0038] In a specific example of the present invention, sharing refers to file sharing between applications in a terminal device. The terminal device is, for example, a smart phone, and the applications are various applications installed in the smart phone. The file sharing request can be a file sharing to at least one application among multiple applications, for example: sharing a file from a web page to one or several applications in a smart phone; or it can be file sharing between applications, for example: sharing a file in application A to application B, application C, application D, etc.
[0039] Step 102: Based on the file sharing request, a target application with a predetermined sharing identifier is obtained from a default application list, wherein the applications in the default application list include applications that are declared to be able to receive files in the default sharing mode. For example: Based on the file sharing request, the applications in the default application list are traversed to filter out a target application with a predetermined sharing identifier from the default application list, and an icon of the target application is displayed.
[0040] It should be noted that the default application list includes applications that are declared to receive files in the default sharing method. That is to say, in the prior art, when sharing a file with an application in a smart phone, it can be shared with the application that is declared to receive files in the default sharing method. For example, if the applications that are declared to receive files in the default sharing method include application X, application Y, and application Z, then when sharing the file, the icons corresponding to application X, application Y, and application Z will be displayed. After the user selects one or more application icons, for example, the icons of application X and application Y, the file will be shared to application X and application Y after confirming the sharing. However, in an embodiment of the present invention, the file can be shared with a target application with a predetermined sharing identifier obtained from the default application list. For example, in addition to application X, application Y, and application Z, the default application list also includes application E and application F with a predetermined sharing identifier. At this time, when sharing a file, the icons of application E and application F are displayed to the user. After the user selects application E and / or application F, the file will be shared with application E and / or application F. Of course, if application X, application Y, or application Z also includes a predetermined sharing identifier, for example, application X also has a predetermined sharing identifier, then application X, application E, and application F are displayed to the user. Application X, application E, and application F are displayed for the user to select, that is, the file can be shared with the application selected by the user among application X, application E, and application F.
[0041] As a specific example, taking a mobile terminal using the mobile operating system (iOS system) developed by Apple, the standard sharing method provided by the iOS system is that a specific file cannot be shared only with designated applications, but any application that declares that it can accept files of this type will appear in the sharing recipient list (ie, the default application list).
[0042] It should be noted that the predetermined sharing identifier is pre-added to the target application, and the application with the predetermined sharing identifier identifies the file that can be accepted for sharing.
[0043] Step 103: Share the file to be shared with the application specified in the target application.
[0044] Specifically, sharing the file to be shared with the application specified in the target application includes: triggering the icon of the application specified from the target application to share the file with the specified application. For example: if the target application is application X, application E and application F, the file to be shared can be shared with the application selected by the user from application X, application E and application F. In other words, when sharing a file, only the target application with a predetermined sharing identifier obtained from the default application list can be displayed, rather than displaying all the applications that are declared in the default sharing method to receive the file, that is, the file is only allowed to be shared between allowed applications, which implements the restricted management of file sharing, ensures the security of the file, avoids the leakage of the file, and improves the security and reliability of file sharing.
[0045] According to the file sharing method of the embodiment of the present invention, when sharing a file, only the target application with a predetermined sharing identifier obtained from the default application list can be displayed, rather than displaying all the applications declared in the default sharing method to receive the file. Therefore, files are only allowed to be shared between allowed applications, thereby implementing restricted management of file sharing, ensuring the security of files, avoiding leakage of files, and preventing them from being leaked to applications other than the specified application through the sharing function, thereby improving the security and reliability of file sharing.
[0046] It can be seen from one or more of the above embodiments that before obtaining a target application with a predetermined sharing identifier from a default application list based on a file sharing request, it is necessary to set a predetermined sharing identifier for the application that is allowed to share files. Specifically, the restricted sharing dynamic library is injected into the code storage directory in the code file of the target application; the sharing plug-in is injected into the sharing plug-in storage directory in the code file of the target application, wherein the sharing plug-in includes a predetermined sharing identifier; after completing the injection of the restricted sharing dynamic library and the sharing plug-in, the code file of the target application is re-signed to generate an installation package for the target application.
[0047] Taking the iOS system as an example, an application A that allows file sharing is modified, and the restricted sharing SDK: A.framework (that is, the restricted sharing dynamic library) is injected into the .app directory of application A (that is, the code storage directory in the code file of the target application); at the same time, the Appex plug-in management SDK: B.framework (that is, the sharing plug-in) is injected into the sharing plug-in .appex directory of application A (that is, the sharing plug-in storage directory in the code file of the target application), and then re-sign to generate the modified ipa file (installation package) of application A.
[0048] After generating the installation package of the target application, the method further includes: when the installation package of the target application is installed, parsing the predetermined sharing identifier from the installation package, and after the installation package is successfully installed, writing the target application and the predetermined sharing identifier into the default application list. Alternatively, when the target application is started, writing the target application and the predetermined sharing identifier into the default application list by limiting the sharing of the dynamic library.
[0049] As a specific application, upload the ipa file of the modified application A, parse the ipa file, parse the shareIdentifier (i.e., the predetermined sharing identifier) of the sharing plug-in Appex in application A, and then push application A to the management client TS pre-installed in the smart terminal while sending the parsed shareIdentifier to the management client TS. TS clicks to install in the application list to install application A on the smart phone. When TS detects that application A has been installed and has a shareIdentifier, it will write the shareIdentifier into the appGroup (i.e., the default application list). When sharing files in TS, the target application will be displayed according to the shareIdentifier in the appGroup, so that the user can select an application from the list of displayed target applications for file sharing.
[0050] In another application, you can also share files in the application, that is, share files in one application with another or several other applications. Specifically, when application A is started, the injected A.framework will scan the PlugIns folder under the [NSBundle mainBundle].bundlePath directory. If the application A is found to have share.appex, the corresponding shareIdentifier will be written to the appGroup. When application A shares files, the "includedActivityTypes" method of the "UIActivityViewController" instance object is triggered, and the method is replaced with the custom method "encap_UIActivityViewController_includedActivityTypes". The list of supported target applications is replaced with the list that already exists in the appGroup, thereby achieving the purpose of limiting sharing.
[0051] It should be noted that after re-signing, the description file mobileprovision of the application itself will change, which will affect the communication between the application and the sharing plug-in Appex, so it is necessary to repair its original function by injecting B.framework into the sharing plug-in Appex.
[0052] Through the above operations, when sharing files, specific files can be shared only with designated applications, thereby ensuring that files can only flow between managed applications, improving the security and reliability of file sharing.
[0053] In one embodiment of the present invention, the target application may further include a file type identifier, and based on the file sharing request, a target application with a predetermined sharing identifier is obtained from the default application list, and the method may further include: based on the file sharing request, obtaining the file type of the file to be shared; traversing the applications in the default application list to filter out applications with the predetermined sharing identifier from the default application list, and based on the file type of the file, further filtering out target applications whose file type identifiers match the file type from the applications with the predetermined sharing identifiers, and displaying the icon of the target application. In other words, the file can be shared only with applications with a predetermined sharing identifier and corresponding to the file type identifier that can receive files of the same type. For example, the applications with the predetermined sharing identifiers include application A, application B, application C, and application D, and assuming that application A and application B can process files of file type X and file type Z, and application C and application D can process files of file type Y, and the file type of the file to be shared is file type Y, then only application C and application D are displayed for user selection, thereby files of a specific type can be shared only with specific applications, further improving the security and reliability of file sharing.
[0054] Figure 2 FIG. 1 is a schematic diagram showing the structure of a file sharing device provided by an embodiment of the present invention. Figure 2 As shown, the file sharing device provided in this embodiment includes: a receiving module 210, an acquisition module 220 and a sharing module 230, wherein:
[0055] The receiving module 210 is used to receive a file sharing request;
[0056] An acquisition module 220, configured to obtain a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file, wherein the applications in the default application list include applications declared in a default sharing mode to receive the file;
[0057] The sharing module 230 is used to share the file to be shared with the application specified in the target application.
[0058] Based on the contents of the above embodiments, in this embodiment, it also includes: a transformation module ( Figure 2 not shown), for:
[0059] Injecting the restricted sharing dynamic library into the code storage directory of the code file of the target application;
[0060] Injecting a sharing plug-in into a sharing plug-in storage directory in a code file of the target application, wherein the sharing plug-in includes the predetermined sharing identifier;
[0061] After the injection of the shared dynamic library and the shared plug-in is completed, the code file of the target application is re-signed to generate an installation package of the target application.
[0062] Based on the contents of the above embodiments, in this embodiment, the sharing module 230 is specifically used for:
[0063] When the installation package of the target application is installed, the predetermined sharing identifier is parsed from the installation package, and after the installation package is successfully installed, the target application and the predetermined sharing identifier are written into the default application list.
[0064] Based on the contents of the above embodiments, in this embodiment, the sharing module 230 is specifically used for:
[0065] When the target application is started, the target application and the predetermined sharing identifier are written into the default application list through the restricted sharing dynamic library.
[0066] Based on the contents of the above embodiments, in this embodiment, the acquisition module 220 is specifically used for:
[0067] Based on the sharing request of the file, traverse the applications in the default application list to filter out a target application with the predetermined sharing identifier from the default application list, and display an icon of the target application;
[0068] The sharing of the file to be shared with the application specified in the target application includes: triggering an icon of the application specified in the target application to share the file with the specified application.
[0069] Based on the contents of the above embodiments, in this embodiment, the target application further includes a file type identifier, and the acquisition module 220 is specifically used to:
[0070] Based on the sharing request of the file, obtaining the file type of the file to be shared;
[0071] The applications in the default application list are traversed to filter out applications with the predetermined sharing identifier from the default application list, and based on the file type of the file, a target application whose file type identifier matches the file type is further filtered out from the applications with the predetermined sharing identifier, and an icon of the target application is displayed.
[0072] According to the file sharing device of the embodiment of the present invention, when sharing files, only the target application with a predetermined sharing identifier obtained from the default application list can be displayed, rather than displaying all the applications declared in the default sharing method to receive the file. Therefore, files are only allowed to be shared between allowed applications, thereby implementing restricted management of file sharing, ensuring the security of files, avoiding leakage of files, and preventing them from being leaked to applications other than the designated application through the sharing function, thereby improving the security and reliability of file sharing.
[0073] Since the file sharing device provided in the embodiment of the present invention can be used to execute the file sharing method described in the above embodiment, its working principle and beneficial effects are similar, so they are not described in detail here. For specific contents, please refer to the introduction of the above embodiment.
[0074] In this embodiment, it should be noted that the various modules in the device of the embodiment of the present invention can be integrated into one or deployed separately. The above modules can be combined into one module or further divided into multiple sub-modules.
[0075] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, see Figure 3 , the electronic device specifically includes the following contents: a processor 301, a memory 302, a communication interface 303 and a communication bus 304;
[0076] The processor 301, the memory 302, and the communication interface 303 communicate with each other via the communication bus 304;
[0077] The processor 301 is used to call the computer program in the memory 302. When the processor executes the computer program, all steps of the above-mentioned file sharing method are implemented. For example, when the processor executes the computer program, the following process is implemented: receiving a file sharing request; based on the file sharing request, obtaining a target application with a predetermined sharing identifier from a default application list, wherein the application in the default application list includes an application declared in the default sharing method to receive the file; and sharing the file to be shared with an application specified in the target application.
[0078] It can be understood that the detailed functions and extended functions that can be executed by the computer program can refer to the description of the above embodiments.
[0079] Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, all steps of the above-mentioned file sharing method are implemented. For example, when the processor executes the computer program, the following process is implemented: receiving a file sharing request; based on the file sharing request, obtaining a target application with a predetermined sharing identifier from a default application list, wherein the applications in the default application list include applications declared in the default sharing method to receive the file; and sharing the file to be shared with an application specified in the target application.
[0080] It can be understood that the detailed functions and extended functions that can be executed by the computer program can refer to the description of the above embodiments.
[0081] Based on the same inventive concept, another embodiment of the present invention provides a computer program product, which includes a computer program, which implements all steps of the above-mentioned file sharing method when executed by a processor. For example, when the processor executes the computer program, it implements the following process: receiving a file sharing request; based on the file sharing request, obtaining a target application with a predetermined sharing identifier from a default application list, wherein the application in the default application list includes an application declared in the default sharing method to receive the file; and sharing the file to be shared with an application specified in the target application.
[0082] It can be understood that the detailed functions and extended functions that can be executed by the computer program can refer to the description of the above embodiments.
[0083] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0084] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. Those of ordinary skill in the art may understand and implement them without creative effort.
[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the traffic audit method described in each embodiment or some parts of the embodiment.
[0086] In addition, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0087] In addition, in the present invention, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A file sharing method, characterized in that: include: Receive file sharing requests; Based on the sharing request of the file, a target application with a predetermined sharing identifier is obtained from a default application list, wherein the applications in the default application list include applications declared in the default sharing mode to receive the file; before obtaining the target application with a predetermined sharing identifier from the default application list based on the sharing request of the file, the method further includes: injecting a restricted sharing dynamic library into a code storage directory in a code file of the target application; injecting a sharing plug-in into a sharing plug-in storage directory in a code file of the target application, wherein the sharing plug-in includes the predetermined sharing identifier; after completing the injection of the restricted sharing dynamic library and the sharing plug-in, re-signing the code file of the target application to generate an installation package for the target application; The obtaining, based on the sharing request of the file, a target application with a predetermined sharing identifier from a default application list comprises: based on the sharing request of the file, traversing the applications in the default application list to filter out the target application with the predetermined sharing identifier from the default application list, and displaying an icon of the target application; Share the file to be shared with the application specified in the target application.
2. The file sharing method according to claim 1, characterized in that: After generating the installation package of the target application, the method further includes: When the installation package of the target application is installed, the predetermined sharing identifier is parsed from the installation package, and after the installation package is successfully installed, the target application and the predetermined sharing identifier are written into the default application list.
3. The file sharing method according to claim 1, characterized in that: After generating the installation package of the target application, the method further includes: When the target application is started, the target application and the predetermined sharing identifier are written into the default application list through the restricted sharing dynamic library.
4. The file sharing method according to any one of claims 1 to 3, characterized in that: The obtaining a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file includes: The sharing of the file to be shared with the application specified in the target application includes: triggering an icon of the application specified in the target application to share the file with the specified application.
5. The file sharing method according to any one of claims 1 to 3, characterized in that: The target application also includes a file type identifier, and obtaining a target application with a predetermined sharing identifier from a default application list based on the sharing request of the file includes: Based on the sharing request of the file, obtaining the file type of the file to be shared; The applications in the default application list are traversed to filter out applications with the predetermined sharing identifier from the default application list, and based on the file type of the file, a target application whose file type identifier matches the file type is further filtered out from the applications with the predetermined sharing identifier, and an icon of the target application is displayed.
6. A file sharing device, characterized in that: include: A receiving module, used for receiving a file sharing request; An acquisition module is used to obtain a target application with a predetermined sharing identifier from a default application list based on a sharing request for the file, wherein the applications in the default application list include applications that are declared in a default sharing mode to receive the file; before obtaining the target application with a predetermined sharing identifier from the default application list based on the sharing request for the file, the module further includes: a transformation module; the transformation module is used to: inject a restricted sharing dynamic library into a code storage directory in a code file of the target application; inject a sharing plug-in into a sharing plug-in storage directory in a code file of the target application, wherein the sharing plug-in includes the predetermined sharing identifier; after completing the injection of the restricted sharing dynamic library and the sharing plug-in, re-sign the code file of the target application to generate an installation package for the target application; The obtaining, based on the sharing request of the file, a target application with a predetermined sharing identifier from a default application list comprises: based on the sharing request of the file, traversing the applications in the default application list to filter out the target application with the predetermined sharing identifier from the default application list, and displaying an icon of the target application; The sharing module is used to share the file to be shared with the application specified in the target application.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the file sharing method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the file sharing method according to any one of claims 1 to 5 are implemented.
9. A computer program product, the computer program product comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the file sharing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Document content sharing method and device, terminal and storage medium
CN111078655A
Monitoring method, terminal and storage medium
CN111338899A