Information sharing control method, device, electronic device and storage medium
Through preset sharing plug-ins and cross-platform communication interfaces, the problem of low development efficiency of smartphone application software when sharing content between multiple application software is solved, and the sharing functions of rapid configuration and cross-operating systems are realized, which improves development efficiency and user experience.
Patent Information
- Application Number
- CN202111228988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-21
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-10-21
AI Technical Summary
When existing smartphone application software shares content between multiple application software, the development efficiency is low, and the sharing function needs to be integrated separately and error-prone.
Through the preset sharing plug-in, the identification of the content to be shared and the target sharing application based on the first application is obtained, and the sharing interface of the target application is called using the preset cross-platform communication interface to realize cross-platform content sharing.
It improves the efficiency of application development, simplifies the configuration process of sharing functions, reduces duplicate encoding errors, and realizes the unified sharing logic across operating systems.
Smart Images

Figure CN113946457B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of application technology, and in particular to an information sharing control method, device, electronic device, and storage medium. Background Art
[0002] With the popularity of smart phones, users are increasingly relying on mobile phone applications (Application, App) in activities such as communication, social interaction, and entertainment. Smart phones are a general term for mobile phones that have an independent operating system and independent running space, just like personal computers. Users can install software, games, navigation and other programs provided by third-party service providers, and can access wireless networks through mobile communication networks.
[0003] Currently, when developing mobile application software on smart phones, considering that users need to share content between multiple mobile application software, sharing functions are generally developed separately for various mobile application software.
[0004] It can be seen that existing mobile phone application software needs to be integrated separately, and there is a problem of low development efficiency. Summary of the Invention
[0005] The purpose of this application is to provide an information sharing control method, device, electronic device and storage medium to improve the development efficiency of application programs in order to address the deficiencies in the above-mentioned prior art.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present application are as follows:
[0007] In a first aspect, the present invention provides an information sharing control method, comprising:
[0008] Based on a first application, obtaining, according to a preset selection instruction, content to be shared and an identifier of a corresponding target shareable application, wherein the first application is edited and generated based on the first application to be edited and a sharing interface of at least one of the shareable applications, the sharing interface of at least one of the shareable applications being determined based on a preset sharing plug-in, the preset sharing plug-in being configured to include sharing interfaces corresponding to a plurality of preset sharing applications, each of the preset sharing applications being implemented based on a corresponding operating system;
[0009] According to the identifier of the target shareable application, calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in;
[0010] According to the sharing interface of the target sharable application, the content to be shared is shared from the first application to the target sharable application.
[0011] In an optional embodiment, before obtaining the content to be shared and the identifier of the corresponding target shareable application according to the preset selection instruction based on the first application, the method further includes:
[0012] Get the first application to be edited;
[0013] Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited;
[0014] A first application is generated according to the first application to be edited and a sharing interface of at least one of the shareable applications.
[0015] In an optional embodiment, before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the method further includes:
[0016] Acquire a sharing module corresponding to each of the preset sharing applications, wherein the sharing module includes: a sharing interface corresponding to each of the preset sharing applications;
[0017] The preset sharing plug-in is generated according to each of the sharing modules.
[0018] In an optional embodiment, generating the preset sharing plug-in according to each of the sharing modules includes:
[0019] Generate a compiled file repository according to each of the sharing modules, the compiled file repository including: an identifier of a preset sharing application corresponding to each of the sharing modules, a compiled file corresponding to each of the sharing modules, and a compilation address corresponding to each of the compiled files;
[0020] The preset sharing plug-in is generated according to the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file.
[0021] In an optional embodiment, before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the method further includes:
[0022] Obtaining a compilation address of a target sharing module according to the identifier of the target shareable application and the preset sharing plug-in;
[0023] The sharing interface of the target shareable application is determined according to the compilation address of the target sharing module.
[0024] In an optional embodiment, sharing the to-be-shared content from the first application to the target shareable application according to the sharing interface of the target shareable application includes:
[0025] Obtaining preset authentication information according to a sharing interface of the target shareable application;
[0026] The preset authentication information is sent to the target shareable application. If the target shareable application determines that the authentication is successful, the content to be shared is shared from the first application to the target shareable application.
[0027] In an optional embodiment, if the authentication is determined to be successful by the target shareable application, sharing the content to be shared from the first application to the target shareable application includes:
[0028] If the authentication is successful through the target shareable application, then obtaining the class object corresponding to the target sharing module from the preset sharing plug-in based on the reflection mechanism according to the sharing interface of the target shareable application;
[0029] According to the class object corresponding to the target sharing module, the content to be shared is shared from the first application to the target shareable application.
[0030] In an optional embodiment, the method further comprises:
[0031] Obtaining an update instruction for a sharing interface of at least one sharable application corresponding to the first application, the update instruction including: an identifier of a sharable application to be deleted, or an identifier of a preset sharing application to be added;
[0032] According to the update instruction, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated through the preset sharing plug-in.
[0033] In an optional embodiment, the update instruction includes: a preset add / delete script, the preset delete script includes: an identifier of a shareable application to be deleted, and the preset add script includes: an identifier of a preset sharing application to be added;
[0034] The updating of the sharing interface of at least one shareable application corresponding to the first application to be edited by the preset sharing plug-in includes:
[0035] Determining, in the preset sharing plug-in, according to the preset adding / deleting script, the compilation address of the first sharing module corresponding to the shareable application to be deleted, or the compilation address of the first preset sharing module corresponding to the preset sharing application to be added;
[0036] According to the compilation address of the first shareable module or the compilation address of the first preset sharing module, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated.
[0037] In an optional embodiment, the step of obtaining the content to be shared and the identifier of the corresponding target shareable application based on the first application and according to a preset selection instruction includes:
[0038] Based on the first application, obtaining identifiers of applications installed on the current device;
[0039] determining an identifier of a second sharable application based on the identifier of the installed application and a sharing interface of at least one sharable application corresponding to the first application;
[0040] According to the preset selection instruction, the content to be shared is acquired, and the identifier of the target shareable application is determined from the identifier of the second shareable application.
[0041] In an optional embodiment, after obtaining the content to be shared and the identifier of the corresponding target shareable application according to the preset selection instruction based on the first application, the method further includes:
[0042] If the content to be shared includes a long link URL, the long link URL is sent to the web server, and the short link URL to be shared returned by the web server according to a preset conversion algorithm is received.
[0043] In an optional embodiment, if the preset sharing application is implemented based on the iOS operating system, the sharing module corresponding to the preset sharing application is a project file, and the corresponding compiled file repository is a CocoaPods repository;
[0044] If the preset sharing application is implemented based on the Android operating system, the sharing module corresponding to the preset sharing application is a sharing component, and the corresponding compilation file repository is a Maven repository.
[0045] In a second aspect, the present invention provides an information sharing control device, comprising:
[0046] an acquisition module configured to acquire, based on a first application and according to a preset selection instruction, content to be shared and an identifier of a corresponding target shareable application, wherein the first application is edited and generated based on the first application to be edited and a sharing interface of at least one of the shareable applications, the sharing interface of at least one of the shareable applications being determined based on a preset sharing plug-in, the preset sharing plug-in being configured to include sharing interfaces corresponding to a plurality of preset sharing applications, each of the preset sharing applications being implemented based on a corresponding operating system;
[0047] a calling module, configured to call the sharing interface of the target sharable application through a preset cross-platform communication interface in the preset sharing plug-in according to the identifier of the target sharable application;
[0048] A sharing module is configured to share the content to be shared from the first application to the target sharable application according to a sharing interface of the target sharable application.
[0049] In an optional embodiment, the information sharing control device further includes an editing module for obtaining the first application to be edited;
[0050] Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited;
[0051] A first application is generated according to the first application to be edited and a sharing interface of at least one of the shareable applications.
[0052] In an optional embodiment, the calling module is further configured to obtain a sharing module corresponding to each of the preset sharing applications, the sharing module including: a sharing interface corresponding to each of the preset sharing applications;
[0053] The preset sharing plug-in is generated according to each of the sharing modules.
[0054] In an optional embodiment, the calling module is specifically configured to generate a compiled file repository based on each of the sharing modules, the compiled file repository including: an identifier of a preset sharing application corresponding to each of the sharing modules, a compiled file corresponding to each of the sharing modules, and a compilation address corresponding to each of the compiled files;
[0055] The preset sharing plug-in is generated according to the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file.
[0056] In an optional embodiment, the calling module is further configured to obtain a compilation address of a target sharing module according to the identifier of the target shareable application and the preset sharing plug-in;
[0057] The sharing interface of the target shareable application is determined according to the compilation address of the target sharing module.
[0058] In an optional embodiment, the sharing module is specifically configured to obtain preset authentication information according to a sharing interface of the target shareable application;
[0059] The preset authentication information is sent to the target shareable application. If the target shareable application determines that the authentication is successful, the content to be shared is shared from the first application to the target shareable application.
[0060] In an optional embodiment, the sharing module is specifically configured to obtain a class object corresponding to the target sharing module from the preset sharing plug-in based on a reflection mechanism according to the sharing interface of the target sharing application if authentication is determined to be successful through the target sharing application;
[0061] According to the class object corresponding to the target sharing module, the content to be shared is shared from the first application to the target shareable application.
[0062] In an optional embodiment, the information sharing control device further includes an update module, configured to obtain an update instruction for a sharing interface of at least one sharable application corresponding to the first application, the update instruction including: an identifier of a sharable application to be deleted, or an identifier of a preset sharing application to be added;
[0063] According to the update instruction, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated through the preset sharing plug-in.
[0064] In an optional embodiment, the update instruction includes: a preset add / delete script, the preset delete script includes: an identifier of a shareable application to be deleted, and the preset add script includes: an identifier of a preset sharing application to be added;
[0065] The update module is specifically configured to determine, in the preset sharing plug-in, a compilation address of a first shareable module corresponding to a shareable application to be deleted, or a compilation address of a first preset sharing module corresponding to a preset sharing application to be added, according to the preset adding / deleting script;
[0066] According to the compilation address of the first shareable module or the compilation address of the first preset sharing module, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated.
[0067] In an optional implementation manner, the acquisition module is specifically configured to acquire, based on the first application, an identifier of an application installed on the current device;
[0068] determining an identifier of a second sharable application based on the identifier of the installed application and a sharing interface of at least one sharable application corresponding to the first application;
[0069] According to the preset selection instruction, the content to be shared is acquired, and the identifier of the target shareable application is determined from the identifier of the second shareable application.
[0070] In an optional embodiment, if the preset sharing application is implemented based on the iOS operating system, the sharing module corresponding to the preset sharing application is a project file, and the corresponding compiled file repository is a CocoaPods repository;
[0071] If the preset sharing application is implemented based on the Android operating system, the sharing module corresponding to the preset sharing application is a sharing component, and the corresponding compilation file repository is a Maven repository.
[0072] In an optional embodiment, the sharing module is further configured to send the long link URL to a web server if the content to be shared includes a long link URL, and receive the short link URL to be shared returned by the web server according to a preset conversion algorithm.
[0073] In a third aspect, the present invention provides an electronic device comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the information sharing control method as described in any of the aforementioned embodiments.
[0074] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the information sharing control method as described in any of the aforementioned embodiments are executed.
[0075] The beneficial effects of this application are:
[0076] An information sharing control method, device, electronic device and storage medium provided in an embodiment of the present application include: based on a first application, obtaining the content to be shared and the identification of the corresponding target shareable application according to a preset selection instruction, wherein the first application is edited and generated according to the sharing interface of the first application to be edited and at least one shareable application, and the sharing interface of at least one shareable application is determined according to a preset sharing plug-in, and the preset sharing plug-in is configured to include sharing interfaces corresponding to multiple preset sharing applications, and each preset sharing application is implemented based on a corresponding operating system; according to the identification of the target shareable application, calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in; according to the sharing interface of the target shareable application, sharing the content to be shared from the first application to the target shareable application. By applying the embodiment of the present application, it is possible to quickly configure the sharing interface of at least one shareable application corresponding to the first application to be edited through the preset sharing plug-in, thereby realizing the rapid development of the sharing function of the first application. Compared with the existing method of developing sharing functions for different applications separately, the present application can effectively improve the development efficiency of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0078] Figure 1 A flowchart of an information sharing control method provided in an embodiment of the present application;
[0079] Figure 2 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0080] Figure 3 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0081] Figure 4 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0082] Figure 5 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0083] Figure 6 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0084] Figure 7 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0085] Figure 8 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0086] Figure 9 A flowchart of another information sharing control method provided in an embodiment of the present application;
[0087] Figure 10 A schematic diagram of the functional modules of an information sharing control device provided in an embodiment of the present application;
[0088] Figure 11 A schematic diagram of the functional modules of an information sharing control device provided in an embodiment of the present application;
[0089] Figure 12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0091] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.
[0092] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0093] During the editing process of existing applications, it is time-consuming because the sharing functions of each application need to be separately integrated. In addition, during the development process, the code needs to be rewritten each time, which is prone to errors. Therefore, existing applications have the problem of low development efficiency.
[0094] In view of this, the present application provides an information sharing control method, by which the sharing function of the first application to be edited can be quickly edited through a preset sharing plug-in, thereby improving development efficiency.
[0095] Figure 1 This is a flow chart of an information sharing control method provided in an embodiment of the present application. The execution subject of this method can be a computer, server, processor, terminal device or other electronic device that can run an application program, such as Figure 1 As shown, the method may include:
[0096] S101 : Based on a first application, obtain content to be shared and an identifier of a corresponding target shareable application according to a preset selection instruction.
[0097] Among them, the first application is edited and generated based on the sharing interface of the first application to be edited and at least one shareable application, the sharing interface of at least one shareable application is determined based on a preset sharing plug-in, the preset sharing plug-in is configured to include sharing interfaces corresponding to multiple preset sharing applications, and each preset sharing application is implemented based on a corresponding operating system.
[0098] Optionally, the content to be shared may include: text, pictures, links, audio, video, or a combination of multiple types of content, which is not limited here. Optionally, the first application to be edited may be a chat application, a travel application, a game application, a shopping application, or other application that requires editing and sharing functions.
[0099] Among them, the preset sharing plug-in is configured to include sharing interfaces corresponding to multiple preset sharing applications, that is, the sharing interface of at least one shareable application corresponding to the first application to be edited can be configured through the preset sharing plug-in, and then the first application can be edited and generated according to the sharing interface of the first application to be edited and at least one shareable application. The first application can have a sharing function of sharing the content to be shared to at least one shareable application corresponding to it, that is, based on the first application, the content to be shared can be shared to at least one shareable application. In this process, it can be seen that when the present application adopts the preset sharing plug-in to implement the sharing function of the first application, it is not limited by the operating system category corresponding to the shareable application, and can ensure the uniformity of the sharing logic. The editing process is simple and easy for users to quickly master, thereby improving the user editing experience.
[0100] Optionally, the operating systems corresponding to each preset sharing application may include but are not limited to: Android, iOS, Windows Phone, Web OS, Windows Mobile, etc., which may vary according to the actual application scenario. Of course, this application does not limit the operating system corresponding to the first application to be edited. Optionally, the operating system corresponding to the first application to be edited and at least one of its corresponding shareable applications may be different, that is, the function of sharing the first application to be edited across operating systems can be realized. For example, the operating system corresponding to the first application to be edited may be the Android system, and the operating system corresponding to a shareable application may be the iOS system, which is not limited here.
[0101] In some embodiments, the preset selection instruction can be generated by a control operation (such as clicking, long pressing, sliding, dragging, etc.). Taking a smartphone as an example, a user can generate a preset selection instruction by coordinating a first control operation (such as long pressing) and a second control operation (such as clicking). Optionally, in response to a first control operation (such as long pressing) in a first application, the content to be shared (such as a paragraph of text) can be determined, and the identifier of at least one shareable application corresponding to the first application is displayed; in response to a second control operation (such as clicking) for the identifier of at least one shareable application, the identifier of the target shareable application can be determined, that is, the target shareable application can be determined in at least one shareable application. Based on this description, the content to be shared and the identifier of the corresponding target shareable application can be obtained according to the preset selection operation.
[0102] S102 : According to the identifier of the target shareable application, the sharing interface of the target shareable application is called through the preset cross-platform communication interface in the preset sharing plug-in.
[0103] S103 : Sharing the content to be shared from the first application to the target sharable application according to the sharing interface of the target sharable application.
[0104] The preset cross-platform communication interface in the preset sharing plug-in is used to transmit the content to be shared in the first application from the first application to the sharing interface of at least one shareable application.
[0105] Based on the above description, it can be known that the first application has the sharing function of sharing the content to be shared with at least one corresponding shareable application. Therefore, after determining the identifier of the target shareable application, the sharing interface of the target shareable application can be called through the preset cross-platform communication interface in the preset sharing plug-in, and then according to the sharing interface of the target shareable application, the content to be shared from the first application to the target shareable application is shared to realize the cross-application sharing function.
[0106] In some embodiments, the content to be shared is shared from the first application to the target shareable application, and the name of the first application and the shared content can also be displayed in the target shareable application. Optionally, during the specific display, the title, brief description, etc. of the shared content can be displayed, which is not limited here.
[0107] Optionally, the preset sharing plug-in can be implemented based on the Flutter toolkit, React toolkit, etc., and can be flexibly selected according to the actual application scenario. Among them, when the preset sharing plug-in is implemented based on the Flutter toolkit, the preset cross-platform communication interface in the preset sharing plug-in may include: FlutterMethodChannel, onMethodCall, handleMethodCall, etc., which are not limited here.
[0108] In summary, an embodiment of the present application provides an information sharing control method, which includes: based on a first application, obtaining the content to be shared and the identifier of the corresponding target shareable application according to a preset selection instruction, wherein the first application is edited and generated according to the sharing interface of the first application to be edited and at least one shareable application, and the sharing interface of at least one shareable application is determined according to a preset sharing plug-in, and the preset sharing plug-in is configured to include sharing interfaces corresponding to multiple preset sharing applications, and each preset sharing application is implemented based on a corresponding operating system; according to the identifier of the target shareable application, calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in; according to the sharing interface of the target shareable application, sharing the content to be shared from the first application to the target shareable application. By applying the embodiment of the present application, it is possible to quickly configure the sharing interface of at least one shareable application corresponding to the first application to be edited through the preset sharing plug-in, thereby realizing the rapid development of the sharing function of the first application. Compared with the existing method of developing sharing functions for different applications separately, the present application can effectively improve the development efficiency of the application.
[0109] Figure 2 A flowchart of another information sharing control method provided in an embodiment of the present application. Figure 2As shown, before the step of obtaining the content to be shared and the identifier of the corresponding target shareable application according to the preset selection instruction based on the first application, the method further includes:
[0110] S201: Obtain a first application to be edited.
[0111] Wherein, referring to the above related description, it can be known that the first application to be edited can be any type of application. In some embodiments, the first application to be edited can be an application to be developed, or can be an application that needs to update the sharing function, which is not limited here.
[0112] S202: Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited.
[0113] S203: Generate a first application program according to the first application program to be edited and a sharing interface of at least one sharable application program.
[0114] Optionally, when configuring the sharing interface of at least one shareable application corresponding to the first application to be edited through a preset sharing plug-in, the sharing interface of the at least one shareable application can be part of the sharing interface corresponding to the preset sharing application, or it can be all the interfaces. This is not limited here and may vary according to the actual application scenario.
[0115] In combination with the above-mentioned relevant instructions, when editing the first application to be edited, the sharing interface of at least one shareable application corresponding to the first application to be edited can be configured through the preset sharing plug-in, and then the first application can be edited and generated based on the first application to be edited and the sharing interface of at least one shareable application, thereby realizing rapid editing of the sharing function of the first application and improving the development efficiency of the first application.
[0116] In addition, in some embodiments, the above-mentioned preset sharing plug-in can also be configured to include a registration interface, a login interface, etc. corresponding to the first application to be edited, that is, the registration function, the login function, etc. of the first application to be edited can be edited through the preset sharing plug-in. It can be understood that through this editing, in the actual application process, the first application to be edited can be logged in according to the account and password used when registering the first application to be edited. It can be seen that the application of the embodiment of the present application makes it possible to realize quick editing of the application registration and login functions during the development process of the application, thereby further improving the development efficiency of the application.
[0117] Figure 3A flowchart of another information sharing control method provided by an embodiment of the present application. Optionally, before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the method further includes:
[0118] S301: Acquire a sharing module corresponding to each preset sharing application, where the sharing module includes a sharing interface corresponding to each preset sharing application.
[0119] S302: Generate a preset sharing plug-in according to each sharing module.
[0120] The sharing module may include sharing function codes corresponding to each preset sharing application, and the sharing function codes corresponding to each preset sharing application may include sharing interfaces corresponding to each preset sharing application. Based on this description, it can be seen that, by applying the embodiments of the present application, the sharing function codes of each preset sharing application can be encapsulated into a sharing module, and then a preset sharing plug-in can be generated based on each modular sharing module, so that the user can quickly configure the sharing function of the first application to be edited based on the preset sharing plug-in, thereby improving the development efficiency of the application.
[0121] In addition, according to the actual application scenario, the sharing module in the preset sharing plug-in can also be updated. For example, a sharing module corresponding to a new preset sharing application can be added, which is not limited here.
[0122] Figure 4 A flowchart of another information sharing control method provided in an embodiment of the present application. Figure 4 As shown above, based on each sharing module, a preset sharing plug-in is generated, including:
[0123] S401 : Generate a compilation file repository based on each sharing module, where the compilation file repository includes: an identifier of a preset sharing application corresponding to each sharing module, a compilation file corresponding to each sharing module, and a compilation address corresponding to each compilation file.
[0124] S402: Generate a preset sharing plug-in according to the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file.
[0125] The identifier of the preset sharing application corresponding to each sharing module may be the name, number, device serial number, etc. of the preset sharing application, which is not limited here.
[0126] For each sharing module, each sharing module can be compiled to generate a compilation file corresponding to each sharing module, and then the compilation files corresponding to each sharing module can be integrated to generate a compilation file warehouse. Optionally, the compilation file corresponding to each sharing module can be a binary file, which is not limited here. In addition, it should be noted that according to the compilation files corresponding to each sharing module, when generating a compilation file warehouse, the compilation address corresponding to each compilation file can be obtained, and the compilation address can be synchronously stored in the compilation file warehouse. Then, when generating a preset sharing plug-in, the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compilation file can be generated. It can be understood that when generating, the compilation file pointed to by each compilation address is actually called to generate the preset sharing plug-in.
[0127] Figure 5 A flowchart of another information sharing control method provided in an embodiment of the present application.
[0128] Alternatively, as Figure 5 As shown, before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the following steps are also included:
[0129] S501: Obtain the compilation address of the target sharing module according to the identifier of the target shareable application and the preset sharing plug-in.
[0130] S502: Determine a sharing interface of a target shareable application program according to a compilation address of a target sharing module.
[0131] Before calling the sharing interface of the target shareable application, the sharing interface of the target shareable application should be determined first. As can be seen from the above description, since the preset sharing plug-in can be generated based on the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file, when determining the sharing interface of the target shareable application, the compilation address of the target sharing module can be obtained based on the identifier of the target shareable application and the preset sharing plug-in. Then, based on the compilation address of the target sharing module, the compiled file corresponding to the target sharing module can be determined. Based on the compiled file corresponding to the target sharing module, the sharing interface of the target shareable application can be determined. Among them, the target sharing module is also the sharing module corresponding to the target shareable application. Optionally, the sharing interface can be understood as a sharing function, but is not limited to this.
[0132] Figure 6 A flowchart of another information sharing control method provided in an embodiment of the present application. Figure 6 As shown, the above-mentioned method of sharing the content to be shared from the first application to the target shareable application according to the sharing interface of the target shareable application includes:
[0133] S601: Obtain preset authentication information according to the sharing interface of the target shareable application.
[0134] S602: Send preset authentication information to the target shareable application. If the target shareable application determines that the authentication is successful, the content to be shared is shared from the first application to the target shareable application.
[0135] It is understandable that when sharing the content to be shared from the first application to the target shareable application during the sharing process, the sharing process should also be authenticated to authenticate the validity of the target shareable application. Optionally, when performing the authentication, the preset authentication information can be obtained according to the sharing interface of the target shareable application. Optionally, the preset authentication information obtained can include: the authentication serial number corresponding to the target shareable application. After obtaining the preset authentication information, the preset authentication information can be sent to the target shareable application; for the target shareable application, after receiving the preset authentication information, it can optionally be matched with the authentication information to be matched. If the match is successful, it means that the target shareable application confirms that the authentication is successful, then the target shareable application can feedback the authentication result to the first application, and the first application can share the content to be shared from the first application to the target shareable application based on the authentication result. In some embodiments, after receiving the preset authentication information, the target shareable application may optionally send the preset authentication information to its corresponding target server to complete the authentication through the target server, and feed back the authentication result returned by the target server to the first application through the target shareable application. Of course, this application does not limit the specific authentication process here, which may vary according to the actual application scenario.
[0136] Optionally, if the target shareable application determines that the authentication is successful, the step of sharing the content to be shared from the first application to the target shareable application may include:
[0137] If the authentication is successful through the target shareable application, the class object corresponding to the target sharing module is obtained from the preset sharing plug-in based on the reflection mechanism according to the sharing interface of the target shareable application; according to the class object corresponding to the target sharing module, the content to be shared is shared from the first application to the target shareable application.
[0138] Among them, if the authentication is successful through the target shareable application, it means that the first application can now share the content to be shared to the target shareable application. Optionally, when sharing, the class object corresponding to the target sharing module can be obtained from the preset sharing plug-in based on the reflection mechanism according to the sharing interface of the target shareable application. According to the obtained class object, any method and property of the class object can be called, and the content to be shared can be shared from the first application to the target shareable application through the call. It can be seen that this application has the characteristics of simple implementation, strong scalability and flexible configuration when implementing the sharing function of the first application. Among them, it can be understood that the strong scalability and flexible configuration are reflected in the ability to configure the sharing interface corresponding to any preset sharing application in the preset sharing plug-in for the first application to be edited.
[0139] Figure 7 A flowchart of another information sharing control method provided in an embodiment of the present application. Figure 7 As shown, the above method also includes:
[0140] S701: Obtain an update instruction for a sharing interface of at least one sharable application corresponding to a first application.
[0141] The update instruction includes: an identifier of a shareable application to be deleted, or an identifier of a preset sharing application to be added.
[0142] S702: Update, according to the update instruction, the sharing interface of at least one sharable application corresponding to the first application to be edited by using a preset sharing plug-in.
[0143] Among them, in some application scenarios, it may be necessary to update the sharing interface of at least one shareable application corresponding to the first application to be edited. For example, before the update, the number of sharing interfaces of the shareable application corresponding to the first application to be edited is 3, and in the actual application scenario, it is necessary to add a sharing interface of a preset sharing application, or delete the identifier of a shareable application, for example, it needs to be increased to 5, or deleted to 1. Then, in this case, an update instruction of the sharing interface of at least one shareable application corresponding to the first application can be obtained, and then when updating, the sharing interface of at least one shareable application corresponding to the first application to be edited can be flexibly added or deleted through the preset sharing plug-in according to the identifier of the shareable application to be deleted, or the identifier of the preset sharing application to be added. This has the characteristics of simple implementation and can improve the applicability of the method of the present application.
[0144] Figure 8A flowchart of another information sharing control method provided by an embodiment of the present application. Optionally, the above update instruction may include: a preset add / delete script, the preset delete script may include: the identifier of the shareable application to be deleted, and the preset add script may include: the identifier of the preset sharing application to be added. Figure 8 As shown, the above-mentioned updating of the sharing interface of at least one shareable application corresponding to the first application to be edited by using the preset sharing plug-in includes:
[0145] S801: Determine, in a preset sharing plug-in, according to a preset adding / deleting script, the compilation address of a first sharing module corresponding to a shareable application to be deleted, or the compilation address of a first preset sharing module corresponding to a preset sharing application to be added.
[0146] Among them, when updating, the compilation address of the first preset sharing module corresponding to the preset sharing application to be added can be determined in the preset sharing plug-in according to the identifier of the preset sharing application to be added in the preset addition script; or, the compilation address of the first shareable module corresponding to the shareable application to be deleted can be determined in the preset sharing plug-in according to the identifier of the shareable application to be deleted in the preset deletion script.
[0147] S802: Update the sharing interface of at least one sharable application corresponding to the first application to be edited according to the compilation address of the first sharable module or the compilation address of the first preset sharing module.
[0148] Referring to the above description, after determining the compilation address of the first shareable module, or the compilation address of the first preset sharing module, the compilation address of at least one shareable application corresponding to the first application to be edited can be deleted or added through the preset sharing plug-in to achieve the purpose of updating the sharing interface of at least one shareable application corresponding to the first application to be edited.
[0149] In addition, it can be seen from the application of the embodiments of the present application that since the present application can be updated through update instructions including preset add / delete scripts, the present application can be applicable to the deletion of shareable applications implemented based on different operating systems, as well as the addition of preset shared applications implemented through the operating system, which can facilitate management and improve the applicability and flexibility of the information sharing control method of the present application.
[0150] Refer to the above-mentioned relevant examples for further explanation. If each shared module corresponds to a Modle, for each Modle, the corresponding class can be generated based on each Modle through the reflection mechanism. Then, when updating according to the update instruction, the compilation address of the first preset shared module can be added through the dependencies function in the gradle build tool, and then the newly added preset shared application can be directly called according to the reflection mechanism, or the compilation address of the first shareable module can be directly deleted; if each shared module corresponds to a project, the compilation address of the first preset shared module can be added through the Podfile tool, or the compilation address of the first shareable module can be deleted. For details, please refer to the implementation of the Podfile tool. It can be seen that there is no need to change the code in this process, which can improve development efficiency.
[0151] Figure 9 A flowchart of another information sharing control method provided in an embodiment of the present application. Figure 9 As shown, the above-mentioned process of obtaining the content to be shared and the identifier of the corresponding target shareable application based on the first application according to the preset selection instruction includes:
[0152] S901: Based on the first application, obtain identifiers of applications installed on the current device.
[0153] S902: Determine an identifier of a second sharable application based on the identifier of the installed application and a sharing interface of at least one sharable application corresponding to the first application.
[0154] S903: Acquire the content to be shared according to the preset selection instruction, and determine the identifier of the target shareable application from the identifiers of the second shareable application.
[0155] Among them, by obtaining the identification of the application installed on the current device, the application installed on the current device can be known, and based on the identification of the installed application and the sharing interface of at least one shareable application corresponding to the first application, the identification of the second shareable application that can be shared by the first application on the current device can be determined. It can be understood that according to different application scenarios, the identification of the second shareable application can include one or more, which is not limited here.
[0156] For example, if the shareable application identifiers installed on the current device include A, B, C, D and E, where the identifier of the first application is A, and the identifier of at least one shareable application corresponding to the first application includes: B, C and F, that is, the sharing interface of at least one shareable application corresponding to the first application includes: the sharing interface of shareable applications B, C and F, therefore, it can be seen that the identifier of the second shareable application includes: B and C.
[0157] Furthermore, the content to be shared can be obtained according to a preset selection instruction, and the identifier of the target shareable application can be determined from the identifier of the second shareable application. Optionally, the identifier of the target shareable application can include one or more, which is not limited here.
[0158] For example, during the specific sharing process, the user can use a first control operation (e.g., long press) in the first application to determine the content to be shared (e.g., a picture), which will display the identifiers of the second shareable application (e.g., B and C mentioned above); in response to a second control operation (e.g., click) on any of the identifiers of the second shareable application, the identifier of the target shareable application (e.g., C) will be determined. Of course, the specific sharing process is not limited to this.
[0159] Optionally, after obtaining the content to be shared and the identifier of the corresponding target shareable application according to the preset selection instruction based on the first application, the method further includes:
[0160] If the content to be shared includes a long link URL, the long link URL is sent to the web server, and the short link URL returned by the web server according to a preset conversion algorithm is received.
[0161] Among them, in some application scenarios, the content to be shared may also include a long link URL. Among them, if the first application has requirements on the length of the URL of the shared content, then a long link URL is very likely to exceed the limit and be truncated during the sharing process. Although the truncated long link URL can be shared, the truncated long link URL may be an invalid URL or an incorrect URL. In this case, if the content to be shared includes a long link URL, the long link URL can be sent to the web server. After receiving the long link URL, the web server can convert it into a short link URL according to a preset conversion algorithm and return it. It can be understood that at this time, when sharing based on the short link URL, some invalid sharing can be avoided and sharing efficiency can be improved.
[0162] Correspondingly, if the target application server receives the content to be shared including the short link URL, it can also send the short link URL to the web server. The web server can redirect the short link URL to the long link URL based on the long link conversion algorithm so that the target application server can access the web page interface corresponding to the long link URL.
[0163] Optionally, the preset conversion algorithm can be implemented using a cyclic remainder algorithm based on a preset base dictionary. Optionally, the preset base dictionary can be a base-62 dictionary, a custom base-16 dictionary, etc., which is not limited here and may vary depending on the actual application scenario. Optionally, the web server can use a Redis database to store the preset base dictionary, but is not limited to this.
[0164] Optionally, if the preset sharing application is implemented based on the iOS operating system, the sharing module corresponding to the preset sharing application is the project file, and the corresponding compiled file repository is the CocoaPods repository; if the preset sharing application is implemented based on the Android operating system, the sharing module corresponding to the preset sharing application is the sharing component, and the corresponding compiled file repository is the Maven repository.
[0165] Among them, the sharing component is also referred to as the Modle above. That is, if the preset sharing application is implemented based on the Android operating system, then the sharing module corresponding to the preset sharing application can correspond to a Modle, and the Modle can be implemented by inheriting the abstract interface to improve development efficiency; wherein, the Modle can integrate the sharing function code corresponding to the preset sharing application, such as the sharing interface, the function of determining whether the shareable application is installed, etc., which are not limited here. If the preset sharing application is implemented based on the iOS operating system, then the sharing module corresponding to the preset sharing application can correspond to a project file, which can be different depending on the operating system on which the preset sharing application is based.
[0166] Furthermore, when the preset sharing application is implemented based on the Android operating system, the editing file corresponding to the sharing module can be an aar file, and the aar file can include: all resources corresponding to the sharing module, class and res resource files, etc., and the corresponding compiled file repository can be a Maven repository. Optionally, when the sharing module corresponding to the preset sharing application is implemented based on the iOS operating system, the compiled file corresponding to the sharing module can be a project file, and the corresponding compiled file repository can be a CocoaPods repository. Of course, it should be noted that the type of corresponding compiled files and the editing file repository may be different depending on the actual application scenario, and are not limited here. When the preset sharing application is implemented based on other operating systems, please refer to this part of the content, and this application will not go into details here.
[0167] Figure 10 This is a functional diagram of an information sharing control module provided in an embodiment of the present application. The basic principle and technical effects of the device are the same as those of the corresponding method embodiment described above. For the sake of brief description, for parts not mentioned in this embodiment, please refer to the corresponding content in the method embodiment. Figure 10 As shown, the information sharing control device 100 includes:
[0168] An acquisition module 110 is configured to acquire, based on a first application and according to a preset selection instruction, content to be shared and an identifier of a corresponding target shareable application, wherein the first application is edited and generated based on the first application to be edited and a sharing interface of at least one shareable application, and the sharing interface of at least one shareable application is determined based on a preset sharing plug-in, wherein the preset sharing plug-in is configured to include sharing interfaces corresponding to multiple preset sharing applications, each of which is implemented based on a corresponding operating system;
[0169] A calling module 120 is configured to call a sharing interface of the target sharable application through a preset cross-platform communication interface in the preset sharing plug-in according to the identifier of the target sharable application;
[0170] The sharing module 130 is configured to share the content to be shared from the first application to the target sharable application according to the sharing interface of the target sharable application.
[0171] Figure 11 This is a functional module diagram of an information sharing control device provided in an embodiment of the present application. In an optional embodiment, if Figure 11 As shown, the information sharing control device 100 further includes an editing module 140 for acquiring a first application to be edited;
[0172] Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited;
[0173] A first application is generated according to the first application to be edited and at least one sharing interface of the shareable application.
[0174] In an optional embodiment, the calling module 120 is further configured to obtain a sharing module corresponding to each of the preset sharing applications, the sharing module including: a sharing interface corresponding to each of the preset sharing applications;
[0175] The preset sharing plug-in is generated according to each of the sharing modules.
[0176] In an optional embodiment, the calling module 120 is specifically configured to generate a compiled file repository based on each of the sharing modules, the compiled file repository including: an identifier of a preset sharing application corresponding to each of the sharing modules, a compiled file corresponding to each of the sharing modules, and a compilation address corresponding to each of the compiled files;
[0177] The preset sharing plug-in is generated according to the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file.
[0178] In an optional embodiment, the calling module 120 is further configured to obtain a compilation address of a target sharing module according to the identifier of the target shareable application and the preset sharing plug-in;
[0179] The sharing interface of the target shareable application is determined according to the compilation address of the target sharing module.
[0180] In an optional embodiment, the sharing module 130 is specifically used to obtain preset authentication information based on the sharing interface of the target shareable application; send the preset authentication information to the target shareable application, and if the authentication is determined to be successful by the target shareable application, the content to be shared is shared from the first application to the target shareable application.
[0181] In an optional embodiment, the sharing module 130 is specifically configured to obtain a class object corresponding to the target sharing module from the preset sharing plug-in based on a reflection mechanism according to the sharing interface of the target sharing application if the authentication is successful through the target sharing application;
[0182] According to the class object corresponding to the target sharing module, the content to be shared is shared from the first application to the target shareable application.
[0183] In an optional embodiment, the information sharing control device further includes an update module, configured to obtain an update instruction for a sharing interface of at least one sharable application corresponding to the first application, the update instruction including: an identifier of a sharable application to be deleted, or an identifier of a preset sharing application to be added;
[0184] According to the update instruction, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated through the preset sharing plug-in.
[0185] In an optional embodiment, the update instruction includes: a preset add / delete script, the preset delete script includes: an identifier of a shareable application to be deleted, and the preset add script includes: an identifier of a preset sharing application to be added;
[0186] The update module is specifically configured to determine, in the preset sharing plug-in, a compilation address of a first shareable module corresponding to a shareable application to be deleted, or a compilation address of a first preset sharing module corresponding to a preset sharing application to be added, according to the preset adding / deleting script;
[0187] According to the compilation address of the first shareable module or the compilation address of the first preset sharing module, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated.
[0188] In an optional implementation, the acquisition module 110 is specifically configured to acquire, based on the first application, an identifier of an application installed on the current device;
[0189] determining an identifier of a second sharable application based on the identifier of the installed application and a sharing interface of at least one sharable application corresponding to the first application;
[0190] According to the preset selection instruction, the content to be shared is acquired, and the identifier of the target shareable application is determined from the identifier of the second shareable application.
[0191] In an optional embodiment, if the preset sharing application is implemented based on the iOS operating system, the sharing module corresponding to the preset sharing application is a project file, and the corresponding compiled file repository is a CocoaPods repository;
[0192] If the preset sharing application is implemented based on the Android operating system, the sharing module corresponding to the preset sharing application is a sharing component, and the corresponding compilation file repository is a Maven repository.
[0193] In an optional embodiment, the sharing module 130 further includes: if the content to be shared includes a long link URL, sending the long link URL to a web server, and receiving a short link URL to be shared returned by the web server according to a preset conversion algorithm.
[0194] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0195] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0196] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be the aforementioned electronic device capable of editing an application program, such as Figure 12 As shown, the electronic device may include: a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 and the storage medium 220 communicate via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above-mentioned method embodiment. The specific implementation methods and technical effects are similar and will not be repeated here.
[0197] Optionally, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes the steps of the above method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.
[0198] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0199] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0200] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0201] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0202] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device that includes the element.
[0203] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. An information sharing control method, characterized in that: include: Get the first application to be edited; Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited; generating a first application according to the first application to be edited and a sharing interface of at least one of the shareable applications; Based on a first application, obtaining, according to a preset selection instruction, content to be shared and an identifier of a corresponding target shareable application, wherein the first application is edited and generated based on the first application to be edited and a sharing interface of at least one shareable application, the sharing interface of at least one of the shareable applications being determined based on a preset sharing plug-in, the preset sharing plug-in being configured to include sharing interfaces corresponding to a plurality of preset sharing applications, each of the preset sharing applications being implemented based on a corresponding operating system; According to the identifier of the target shareable application, calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in; According to the sharing interface of the target sharable application, the content to be shared is shared from the first application to the target sharable application.
2. The method according to claim 1, characterized in that Before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the method further includes: Acquire a sharing module corresponding to each of the preset sharing applications, wherein the sharing module includes: a sharing interface corresponding to each of the preset sharing applications; The preset sharing plug-in is generated according to each of the sharing modules.
3. The method according to claim 2, characterized in that Generating the preset sharing plug-in according to each of the sharing modules includes: Generate a compiled file repository according to each of the sharing modules, the compiled file repository including: an identifier of a preset sharing application corresponding to each of the sharing modules, a compiled file corresponding to each of the sharing modules, and a compilation address corresponding to each of the compiled files; The preset sharing plug-in is generated according to the identifier of the preset sharing application corresponding to each sharing module and the compilation address of each compiled file.
4. The method according to claim 3, characterized in that Before calling the sharing interface of the target shareable application through the preset cross-platform communication interface in the preset sharing plug-in, the method further includes: Obtaining a compilation address of a target sharing module according to the identifier of the target shareable application and the preset sharing plug-in; The sharing interface of the target shareable application is determined according to the compilation address of the target sharing module.
5. The method according to claim 1, characterized in that Sharing the content to be shared from the first application to the target shareable application according to the sharing interface of the target shareable application includes: Obtaining preset authentication information according to a sharing interface of the target shareable application; The preset authentication information is sent to the target shareable application, and if the target shareable application determines that the authentication is successful, the content to be shared is shared from the first application to the target shareable application.
6. The method according to claim 5, characterized in that If the target shareable application determines that the authentication is successful, sharing the content to be shared from the first application to the target shareable application includes: If the authentication is successful through the target shareable application, then obtaining the class object corresponding to the target sharing module from the preset sharing plug-in based on the reflection mechanism according to the sharing interface of the target shareable application; According to the class object corresponding to the target sharing module, the content to be shared is shared from the first application to the target shareable application.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining an update instruction for a sharing interface of at least one sharable application corresponding to the first application, the update instruction including: an identifier of a sharable application to be deleted, or an identifier of a preset sharing application to be added; According to the update instruction, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated through the preset sharing plug-in.
8. The method according to claim 7, characterized in that The update instruction includes: a preset add / delete script, the preset delete script includes: an identifier of a shareable application to be deleted, and the preset add script includes: an identifier of a preset sharing application to be added; The updating of the sharing interface of at least one shareable application corresponding to the first application to be edited by the preset sharing plug-in includes: Determining, in the preset sharing plug-in, according to the preset adding / deleting script, the compilation address of the first sharing module corresponding to the shareable application to be deleted, or the compilation address of the first preset sharing module corresponding to the preset sharing application to be added; According to the compilation address of the first shareable module or the compilation address of the first preset sharing module, the sharing interface of at least one shareable application corresponding to the first application to be edited is updated.
9. The method according to claim 1, characterized in that The step of obtaining the content to be shared and the identifier of the corresponding target shareable application based on the first application according to a preset selection instruction includes: Based on the first application, obtaining identifiers of applications installed on the current device; determining an identifier of a second sharable application based on the identifier of the installed application and a sharing interface of at least one sharable application corresponding to the first application; According to the preset selection instruction, the content to be shared is acquired, and the identifier of the target shareable application is determined from the identifier of the second shareable application.
10. The method according to claim 3, characterized in that If the preset sharing application is implemented based on the iOS operating system, the sharing module corresponding to the preset sharing application is a project file, and the corresponding compilation file repository is a CocoaPods repository; If the preset sharing application is implemented based on the Android operating system, the sharing module corresponding to the preset sharing application is a sharing component, and the corresponding compilation file repository is a Maven repository.
11. The method according to any one of claims 1 to 10, characterized in that After obtaining the content to be shared and the identifier of the corresponding target shareable application program based on the first application program according to the preset selection instruction, the method further includes: If the content to be shared includes a long link URL, the long link URL is sent to the web server, and the short link URL to be shared returned by the web server according to a preset conversion algorithm is received.
12. An information sharing control device, characterized in that: include: An editing module, configured to obtain a first application to be edited; Edit the first application to be edited using a preset sharing plug-in, and obtain a sharing interface of at least one shareable application corresponding to the first application to be edited; generating a first application according to the first application to be edited and a sharing interface of at least one of the shareable applications; an acquisition module configured to acquire, based on a first application and according to a preset selection instruction, content to be shared and an identifier of a corresponding target shareable application, wherein the first application is edited and generated based on the first application to be edited and a sharing interface of at least one shareable application, the sharing interface of at least one of the shareable applications being determined based on a preset sharing plug-in, the preset sharing plug-in being configured to include sharing interfaces corresponding to a plurality of preset sharing applications, each of the preset sharing applications being implemented based on a corresponding operating system; a calling module, configured to call the sharing interface of the target sharable application through a preset cross-platform communication interface in the preset sharing plug-in according to the identifier of the target sharable application; A sharing module is configured to share the content to be shared from the first application to the target sharable application according to a sharing interface of the target sharable application.
13. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the information sharing control method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the information sharing control method according to any one of claims 1 to 11 are executed.
Citation Information
Patent Citations
Method and device for sharing data of application software and plugins
CN103699451A
Shared adapter, configuration method and calling method and device thereof and mobile terminal
CN106528304A