CN110941459A - Method and device for calling Replugin - Google Patents

Method and device for calling Replugin Download PDF

Info

Publication number
CN110941459A
CN110941459A CN201911144526.6A CN201911144526A CN110941459A CN 110941459 A CN110941459 A CN 110941459A CN 201911144526 A CN201911144526 A CN 201911144526A CN 110941459 A CN110941459 A CN 110941459A
Authority
CN
China
Prior art keywords
plug
replugin
calling
page
plugin
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911144526.6A
Other languages
Chinese (zh)
Inventor
汪文昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201911144526.6A priority Critical patent/CN110941459A/en
Publication of CN110941459A publication Critical patent/CN110941459A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The disclosure relates to a method and a device for calling a Relugin, wherein the method is applied to a Hybrid App and comprises the following steps: starting an asynchronous task in a background thread, initializing a built-in Replugin, preloading the Replugin in the asynchronous task, and loading and rendering resources of a page in a UI main thread task, so that the pre-loading of the built-in plugin does not influence the rendering of the page in the background execution, the built-in plugin and the page are executed concurrently, the function corresponding to the Replugin in the page is triggered in response to a user, the preloaded Replugin is directly called, the situations of no response, blockage, abnormal exit, repeated calling and the like of a program caused by loading an overlarge Replugin when the user needs to respond are avoided, and the calling efficiency of the Replugin is improved.

Description

Method and device for calling Replugin
Technical Field
The present disclosure relates to the field of computers, and in particular, to a method and an apparatus for calling a Replugin plug-in.
Background
The RePlugin is a plug-in framework of the mobile phone, can improve the expansibility of the App, is high in flexibility, can be independently developed, improves the development efficiency, and is packed as required. Hybrid App, mixed-mode mobile application, is an App that is between Web-App and Native-App.
Under the Hybrid App development mode, when the application responds to the user requirements and uses the native capabilities of the mobile phone, such as starting a sensor, scanning a two-dimensional code, recognizing a face and the like, the RePulgin plug-in can be called as required to realize the calling of the native capabilities of the mobile phone.
However, when the Hybrid App calls the plug-in as required, the calling efficiency is too low, and the application often enters the situations of no response, blocking, abnormal exit, repeated calling and the like of the program, thereby seriously affecting the user experience.
Disclosure of Invention
The disclosure provides a method and a device for calling a Replugin, so as to achieve the purpose of improving the calling efficiency of Replugin.
In order to achieve the above object, the present disclosure provides a method for calling a Replugin plug-in, which is applied to a hybrid app, and the method includes: starting an asynchronous task in a background thread, initializing a built-in Replugin and pre-loading the Replugin in the asynchronous task; loading and rendering resources of the page in the UI main thread task; and calling the reloading Replugin plug-in response to the user triggering the function corresponding to the Replugin plug-in the page.
Optionally, the invoking the preloaded Replugin plug-in response to the user triggering the function corresponding to the Replugin plug-in the page includes: responding to a function corresponding to the Replugin plug-in triggered by a user in the page, and judging whether the pre-loading is successful or not; and in case of success, calling the reloading Replugin.
Optionally, the reloading plugin comprises: and calling a Cordova plug-in, and pre-loading the Relugin plug-in through the Cordova plug-in. The calling the reloading Replugin plug-in comprises the following steps: and calling a Cordova plug-in, and calling a reloading plug-in through the Cordova plug-in.
Optionally, the invoking of the preloaded Replugin plug-in includes: and creating a new asynchronous task, and calling the reloading plugin through the new asynchronous task.
Optionally, the Replugin plug-in includes: a sensor plug-in, a two-dimensional code scanning plug-in, and/or a face recognition plug-in.
The present disclosure provides a device for calling a Replugin plug-in configured in a Hybrid App, the device including: and the asynchronous thread starting module is configured to start an asynchronous task in a background thread, and in the asynchronous task, a built-in Replugin is initialized and the Replugin is preloaded. And the page loading module is configured to load and render resources of the page in the UI main thread task. And the plug-in calling module is configured to respond to the function corresponding to the Replugin plug-in triggered by the user in the page, and call the reloaded Replugin plug-in.
Optionally, the plug-in calling module includes: and the preloading judgment submodule is configured to judge whether the preloading module loads the Replugin in advance successfully or not. And the calling sub-module is configured to call the reloading plugin under the condition that the preloading judgment sub-module judges that the reloading plugin is successful.
Optionally, the asynchronous thread starting module is configured to start an asynchronous task in a background thread, initialize a built-in Replugin plug-in the asynchronous task, call a Cordova plug-in, and preload the Replugin plug-in through the Cordova plug-in. The plug-in calling module is configured to respond to a function corresponding to the Relutin plug-in triggered by a user in the page, call a Cordova plug-in, and call the preloaded Relutin through the Cordova plug-in.
Optionally, the plug-in calling module is configured to create a new asynchronous task in response to a user triggering a function corresponding to the Replugin plug-in the page, and call the preloaded Replugin plug-in through the new asynchronous task.
The present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of invoking a Replugin plug-in according to any of the embodiments of the present disclosure.
The present disclosure provides an electronic device, including: a memory having a computer program stored thereon; a processor configured to execute the computer program in the memory to implement the step of invoking Replugin according to any embodiment of the present disclosure.
According to the method for calling the Replus plug-in applied to the Hybrid App, the asynchronous task is started in the background thread, the built-in Replus plug-in is initialized in the asynchronous task, the Replus plug-in is loaded in advance, and the resources of the page are loaded and rendered in the UI main thread task, so that the page rendering is not influenced by the preloading of the built-in plug-in the background execution, the built-in plug-in and the page are executed concurrently, when the user triggers the function corresponding to the Replus plug-in the page, the preloaded Replus plug-in can be directly called, the situations of no response, blocking, abnormal exit, repeated calling and the like of the program caused by loading the overlarge Replus plug-in when the user needs are responded are avoided, and the Replus calling efficiency is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
fig. 1 is a schematic diagram of a Hybrid App architecture shown in accordance with an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method of calling a Replugin plug-in according to an exemplary embodiment of the present disclosure.
Fig. 3 is a flowchart illustrating a method of calling a Replugin plug-in according to another exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram illustrating an apparatus for calling a Replugin plug-in according to an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram illustrating an apparatus for calling a Replugin plug-in according to another exemplary embodiment of the present disclosure.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
In order to make the method for calling the Relugin plug-in applied to the Hybrid App provided by the disclosure easier to understand. The Hybrid App is described below with reference to the Hybrid App architecture diagram shown in fig. 1. The Hybrid App is a compromise between the Web App and the Native App, the html5 page display at the upper layer is realized based on the Web, page resources are obtained from a server, and resources such as processing logic, a built-in Repulgin and the like in the bottom layer framework are packaged in the Hybrid App and reside in the local device where the Hybrid App is installed. As shown in fig. 1, during the running of the Hybrid App, a UI (user interface) main thread and a background thread may be started. Wherein: and the UI main thread is used for page display. And the background thread is used for the operation of some time-consuming tasks such as data request, logic processing and the like.
Fig. 2 is a flowchart illustrating a method of calling a Replugin plug-in according to an exemplary embodiment of the present disclosure. The method can be applied to Hybrid App. As shown in fig. 2, the method may include:
in step 210, an asynchronous task is started in a background thread, and in the asynchronous task, a built-in Replugin plug-in is initialized and the Replugin plug-in is preloaded.
Asynchronous tasks are tasks that are independent of the UI main thread tasks. By starting the asynchronous task in the background thread, the execution of the UI main thread task does not need to synchronously wait for the completion of the background thread asynchronous task, and the two tasks are executed concurrently.
For example, the Hybrid App may be implemented based on the Java language. In Java, a multithreaded asynchronous task can be started by the asynctask. Inside the AsyncTask is a thread pool, and asynchronous tasks can be submitted to background threads in the thread pool for execution. Since javascript is a single thread, and preloading and calling of the Replugin are time-consuming operations, an asynchronous task is created through AsyncTask, and is found when the javascript is sequentially executed to the AsyncTask.
The Relugin plug-in is an android plug-in, and the Dex file is a component of the android plug-in. The Dex file is generated by compiling Java codes to generate class files and then generating DX commands. Initializing the built-in Replugin plug-in may include decompressing, in advance, a Dex file that releases the plug-in, and caching the Dex file in a device memory for calling. Therefore, when the Relutin plug-in is called subsequently through the Cordova plug-in, the Dex file can be quickly acquired from the equipment memory to realize the function of the Relutin plug-in, the speed of calling the Relutin plug-in is increased, and the calling efficiency of Relutin is improved.
Cordova, which provides a set of device-related APIs through which Hybrid App can access native device functions such as camera, microphone, etc. in JavaScript. Thus, a Cordova plug-in may be invoked, through which the Relugin plug-in is preloaded. And the preloading comprises installing related files, configuration information and the like of the Relutin plug-in into the Cordova plug-in project. The Relugin plug-in may include: a sensor plug-in, a two-dimensional code scanning plug-in, and/or a face recognition plug-in. Due to the fact that the Replus plug-in is pre-loaded through the Cordova plug-in, the situations of no response, blocking, abnormal exit, repeated calling and the like of a program caused by the fact that an overlarge Replus plug-in is loaded when a user needs to be responded are avoided, and the calling efficiency of Replus can be improved.
For example, the ionic framework may encapsulate a Cordova plug-in on the basis of the Cordova API. Under the ionic framework, the built-in Replugin plug-in can be asynchronously preloaded through cordiva plug-in by means of' ready (function () { }) in javascript as follows:
$ionicPlatform.ready(function(){
window.developer.plugin.preload01([{
“pluginname”;”testsdk”
}],function(result)(
console.log(result);
},function(error){
console.log(error);
});}
wherein, the testsdk is the plug-in name of Relugin, and the result of successful or failed plug-in loading is returned by CordovaPlugin. Xml may add a < metadata > tag to android manifest in the creation of the Apk, defining the plug-in name and version, consistent with the preloaded plug-in name.
It should be noted that the above codes are examples of codes for implementing Replugin preloading in an alternative implementation environment of the present disclosure, and are not used to limit the method provided by the present disclosure.
In step 220, the resources of the page are loaded and rendered in the UI main thread task.
For example, the page may be an H5 page.
In step 230, in response to the user triggering a function corresponding to the Replugin plug-in the page, the preloaded Replugin plug-in is called.
For example, a Cordova plug-in may be invoked, through which a preloaded Replugin plug-in is invoked. Because the Replumgin is preloaded by the Cordova plug-in, the loaded Replumgin can be directly called when a user needs to be responded, the situations of no response, blockage, abnormal exit, repeated calling and the like of a program caused by loading as required are avoided, and the calling efficiency of Replumgin can be improved.
In an embodiment, before calling the reloading plugin, whether the reloading is successful or not can be judged, and if the reloading is successful, the step of calling the reloading plugin is performed, so that the situations of no response, blockage, abnormal exit, repeated calling and the like of a program caused by forced calling under the condition of failure are avoided.
In an embodiment, a new asynchronous task may be created in response to a user triggering a function corresponding to the Replugin plug-in the page, and the reloaded Replugin plug-in may be called through the new asynchronous task. And after the function corresponding to the reloading Replugin is completed, closing the new asynchronous task. By the implementation mode, the process of calling the built-in Replugin plug-in is also realized asynchronously, and the response of the page to other operations of the user is not influenced.
According to the method for calling the Replumgin applied to the Hybrid App, the asynchronous task is started in the background thread, the built-in Replumgin is initialized and preloaded in the asynchronous task, and the resources of the page are loaded and rendered in the UI main thread task, so that the page rendering is not influenced by the preloading of the built-in plugin, the built-in plugin and the page are executed concurrently, when a user triggers the function corresponding to the Replumgin in the page, the preloaded Replumgin can be directly called, the situations of no response, blocking, abnormal exit, repeated calling and the like of the program caused by loading the overlarge Replumgin when the user needs are responded are avoided, and the calling efficiency of the Replumgin is improved.
Fig. 3 is a flowchart illustrating a method of calling a Replugin plug-in according to another exemplary embodiment of the present disclosure. The method can be applied to Hybrid App. As shown in fig. 3, the method may include:
in step 310, an asynchronous task is started in a background thread, in the asynchronous task, a built-in Replugin plug-in is initialized, a coreva plug-in is called, and the Replugin plug-in is preloaded through the coreva plug-in.
In step 320, in the UI main thread task, the resources of the page are loaded and rendered.
In step 330, in response to the user triggering the function corresponding to the Replugin plug-in the page, it is determined whether the preloading is successful.
In the case of a failure of the preloading, the call to the Replugin plug-in is ended, and step 260 is entered.
In step 340, in case the pre-loading is successful, a new asynchronous task is created.
In step 350, a Cordova plug-in is called in the new asynchronous task, and a preloaded Relugin is called through the Cordova plug-in.
In step 351, the user is interacted with through the called Replugin plug-in.
In step 352, after the function corresponding to the Replugin plug-in is completed, the asynchronous task is closed, and step 360 is entered.
In step 360, the previous history page is rolled back.
For example, in the case that the Replugin plug-in is a face recognition built-in plug-in, the face recognition built-in plug-in may be packaged into the Hybrid App. When a user clicks the Hybrid App to start, the Hybrid App applying the method directly initializes the face recognition built-in plug-in, and as the method asynchronously executes the face recognition built-in plug-in preloading, the process does not influence the loading of the Hybrid App page. The user clicks a face recognition control in a Hybrid App page, the Hybrid App opens a new asynchronous task stack, in the asynchronous task, judgment of whether the face recognition built-in plug-in is successfully preloaded is carried out, and the face recognition built-in plug-in is called up to carry out face recognition acquisition under the condition that the judgment is successful. After the interaction with the user, closing the current asynchronous task, returning to the historical Hybrid App page, and returning a face recognition result, wherein the result can be used for subsequent logic processing, such as: and judging whether the face recognition matching is successful or not by the server data, and the like. Therefore, the method provided by the disclosure enables the Hybrid App to be closer to the calling efficiency between the native interiors in the aspect of calling the native performance by preloading the Replugin, the smoothness degree is high, and the user experience is improved.
Fig. 4 is a block diagram illustrating an apparatus 400 for calling a Replugin plug-in according to an exemplary embodiment of the present disclosure. The device may be configured with the Hybrid App. As shown in fig. 4, the apparatus may include: an asynchronous thread starting module 410, a page loading module 420 and a plug-in calling module 430.
The asynchronous thread starting module 410 may be configured to start an asynchronous task in a background thread, where a built-in Replugin plug-in is initialized and preloaded.
The page loading module 420 may be configured to load and render resources of a page in a UI main thread task.
The plug-in calling module 430 may be configured to call the preloaded Replugin plug-in response to a user triggering a function corresponding to the Replugin plug-in the page.
According to the device for calling the Replumgin and configured on the Hybrid App, the asynchronous task is started in the background thread, the built-in Replumgin is initialized and preloaded in the asynchronous task, and the resources of the page are loaded and rendered in the UI main thread task, so that the page rendering is not influenced by the preloading of the built-in plugin, the built-in plugin and the page are executed concurrently, when a user triggers the function corresponding to the Replumgin in the page, the preloaded Replumgin can be directly called, the situations of no response, blocking, abnormal exit, repeated calling and the like of the program caused by loading the overlarge Replumgin when the user needs are responded are avoided, and the calling efficiency of the Replumgin is improved.
Fig. 5 is a block diagram illustrating an apparatus 500 for calling a Replugin plug-in according to another exemplary embodiment of the present disclosure. The device may be configured with the Hybrid App. As shown in fig. 5, the plug-in calling module 430 may include: the preload determination submodule 431 may be configured to determine whether preloading of the Replugin plug-in by the preload module is successful. The invoking sub-module 432 may be configured to invoke the reloading plugin in case that the preloading judgment sub-module determines that the reloading plugin is successful. The method comprises the steps of judging whether the preloading is successful or not before calling the reloading plugin, and entering the step of calling the reloading plugin under the condition of success, so that the situations of no response, blockage, abnormal exit, repeated calling and the like of a program caused by forced calling under the condition of failure are avoided.
Optionally, the asynchronous thread starting module 410 may be configured to start an asynchronous task in a background thread, in which an internal Replugin plug-in is initialized, a Cordova plug-in is called, and the Replugin plug-in is preloaded through the Cordova plug-in. The plug-in calling module 430 may be configured to call a Cordova plug-in response to a user triggering a function corresponding to the Replugin plug-in the page, and call a preloaded Replugin plug-in through the Cordova plug-in. Due to the fact that the Replugin is preloaded through the Cordova plug-in, when the user needs to be responded, the loaded Replugin can be directly called through the Cordova plug-in, the situations of no response, blocking, abnormal exit, repeated calling and the like of a program caused by loading according to needs are avoided, and the Replugin calling efficiency can be improved.
As shown in fig. 5, optionally, the plug-in calling module 430 of the apparatus may be configured to create a new asynchronous task in response to a user triggering a function corresponding to the Replugin plug-in the page, and call the preloaded Replugin plug-in through the new asynchronous task. By the implementation mode, the process of calling the preloaded Replugin is also realized asynchronously, and the response of the page to other operations of the user is not influenced.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 6 is a block diagram illustrating an electronic device 600 according to an example embodiment. As shown in fig. 6, the electronic device 600 may include: a processor 601 and a memory 602. The electronic device 600 may also include one or more of a multimedia component 603, an input/output (I/O) interface 604, and a communications component 605.
The processor 601 is configured to control the overall operation of the electronic device 600, so as to complete all or part of the steps in the method for calling the Replugin plug-in. The memory 602 is used to store various types of data to support operation at the electronic device 600, such as instructions for any application or method operating on the electronic device 600 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 602 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 603 may include a screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 602 or transmitted through the communication component 605. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 604 provides an interface between the processor 601 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 605 is used for wired or wireless communication between the electronic device 600 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 605 may therefore include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the above method for calling a Logic plug-in.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described method of invoking a Replugin plug-in is also provided. For example, the computer readable storage medium may be the memory 602 described above including program instructions that are executable by the processor 601 of the electronic device 600 to perform the method described above for invoking the Replugin plug-in.
In another exemplary embodiment, a computer readable storage medium including program instructions which, when executed by a processor, implement the steps of the above-described method of invoking a Replugin plug-in is also provided. For example, the computer-readable storage medium may be the memory 1932 that includes program instructions executable by the processor 1922 of the electronic device 1900 to perform the method of invoking the Repulgin plug-in described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned method of invoking a Replugin plug-in when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A method for calling a Relugin, which is applied to a Hybrid App, comprises the following steps:
starting an asynchronous task in a background thread, initializing a built-in Replugin and pre-loading the Replugin in the asynchronous task; loading and rendering resources of the page in the UI main thread task;
and calling the reloading Replugin plug-in response to the user triggering the function corresponding to the Replugin plug-in the page.
2. The method according to claim 1, wherein the calling the preloaded Repulgin plugin in response to a user triggering a function corresponding to the Repulgin plugin in the page comprises:
responding to a function corresponding to the Replugin plug-in triggered by a user in the page, and judging whether the pre-loading is successful or not;
and in case of success, calling the reloading Replugin.
3. The method of claim 1, wherein preloading the Replugin plugin comprises: calling a Cordova plug-in, and pre-loading a Relugin plug-in through the Cordova plug-in;
the calling the reloading Replugin plug-in comprises the following steps: and calling a Cordova plug-in, and calling a reloading plug-in through the Cordova plug-in.
4. The method of claim 1, wherein the invoking the preloaded Replugin comprises:
and creating a new asynchronous task, and calling the reloading plugin through the new asynchronous task.
5. The method of claim 1, wherein the Replugin plugin comprises: a sensor plug-in, a two-dimensional code scanning plug-in, and/or a face recognition plug-in.
6. An apparatus for calling a Relugin, configured in a Hybrid App, the apparatus comprising:
the asynchronous thread starting module is configured to start an asynchronous task in a background thread, initialize a built-in Replugin and pre-load the Replugin in the asynchronous task;
the page loading module is configured to load and render resources of a page in a UI main thread task;
and the plug-in calling module is configured to respond to the function corresponding to the Replugin plug-in triggered by the user in the page, and call the reloaded Replugin plug-in.
7. The apparatus of claim 6, wherein the plug-in invocation module comprises:
the preloading judgment submodule is configured to judge whether the preloading module loads the Replugin in advance successfully;
and the calling sub-module is configured to call the reloading plugin under the condition that the preloading judgment sub-module judges that the reloading plugin is successful.
8. The apparatus according to claim 6, wherein the asynchronous thread starting module is configured to start an asynchronous task in a background thread, in the asynchronous task, initialize a built-in Replugin plugin, call a Cordova plugin, and pre-load the Replugin plugin through the Cordova plugin;
the plug-in calling module is configured to respond to a function corresponding to the Relutin plug-in triggered by a user in the page, call a Cordova plug-in, and call the preloaded Relutin through the Cordova plug-in.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
CN201911144526.6A 2019-11-20 2019-11-20 Method and device for calling Replugin Pending CN110941459A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911144526.6A CN110941459A (en) 2019-11-20 2019-11-20 Method and device for calling Replugin

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911144526.6A CN110941459A (en) 2019-11-20 2019-11-20 Method and device for calling Replugin

Publications (1)

Publication Number Publication Date
CN110941459A true CN110941459A (en) 2020-03-31

Family

ID=69907969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911144526.6A Pending CN110941459A (en) 2019-11-20 2019-11-20 Method and device for calling Replugin

Country Status (1)

Country Link
CN (1) CN110941459A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968407A (en) * 2022-05-30 2022-08-30 北京金堤科技有限公司 Plug-in calling method and device, electronic equipment and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120003122A (en) * 2010-07-02 2012-01-10 에스케이플래닛 주식회사 Apparatus and method for processing image based on pre loading, and apparatus and method for processing image based on asynchronous loading
CN103577207A (en) * 2012-08-01 2014-02-12 阿里巴巴集团控股有限公司 Loading method and loading device for interface components in custom interface system
CN104679572A (en) * 2015-03-26 2015-06-03 北京神舟航天软件技术有限公司 Plug-in support method based on preloading mechanism
CN104834544A (en) * 2015-05-04 2015-08-12 广州杰赛科技股份有限公司 Data loading method and device
CN105094920A (en) * 2015-08-14 2015-11-25 网易(杭州)网络有限公司 Game rendering method and device
US20160092246A1 (en) * 2014-09-26 2016-03-31 Oracle International Corporation Reverse dependency injection in a system with dynamic code loading
CN105930208A (en) * 2016-04-01 2016-09-07 广州华多网络科技有限公司 Thread scheduling method and thread scheduling apparatus
US20160292135A1 (en) * 2015-03-30 2016-10-06 Microsoft Technology Licensing, Llc Enhanced preview technology for application add-ins
CN106909409A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of method and device of the APK plug-in units for running application program
CN107832100A (en) * 2017-10-27 2018-03-23 平安普惠企业管理有限公司 A kind of loading method and its terminal of APK plug-in units
CN107870787A (en) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 Application plug loading method and system
CN109388505A (en) * 2018-09-27 2019-02-26 天涯社区网络科技股份有限公司 A kind of asynchronous multitask sequence loading method based on Android
CN109408133A (en) * 2017-08-16 2019-03-01 阿里巴巴集团控股有限公司 A kind of method and apparatus starting component
CN110244985A (en) * 2018-03-09 2019-09-17 优酷网络技术(北京)有限公司 A kind of view rendering method, computer storage medium and terminal device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120003122A (en) * 2010-07-02 2012-01-10 에스케이플래닛 주식회사 Apparatus and method for processing image based on pre loading, and apparatus and method for processing image based on asynchronous loading
CN103577207A (en) * 2012-08-01 2014-02-12 阿里巴巴集团控股有限公司 Loading method and loading device for interface components in custom interface system
US20160092246A1 (en) * 2014-09-26 2016-03-31 Oracle International Corporation Reverse dependency injection in a system with dynamic code loading
CN104679572A (en) * 2015-03-26 2015-06-03 北京神舟航天软件技术有限公司 Plug-in support method based on preloading mechanism
US20160292135A1 (en) * 2015-03-30 2016-10-06 Microsoft Technology Licensing, Llc Enhanced preview technology for application add-ins
CN104834544A (en) * 2015-05-04 2015-08-12 广州杰赛科技股份有限公司 Data loading method and device
CN105094920A (en) * 2015-08-14 2015-11-25 网易(杭州)网络有限公司 Game rendering method and device
CN106909409A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of method and device of the APK plug-in units for running application program
CN105930208A (en) * 2016-04-01 2016-09-07 广州华多网络科技有限公司 Thread scheduling method and thread scheduling apparatus
CN107870787A (en) * 2016-09-26 2018-04-03 平安科技(深圳)有限公司 Application plug loading method and system
CN109408133A (en) * 2017-08-16 2019-03-01 阿里巴巴集团控股有限公司 A kind of method and apparatus starting component
CN107832100A (en) * 2017-10-27 2018-03-23 平安普惠企业管理有限公司 A kind of loading method and its terminal of APK plug-in units
CN110244985A (en) * 2018-03-09 2019-09-17 优酷网络技术(北京)有限公司 A kind of view rendering method, computer storage medium and terminal device
CN109388505A (en) * 2018-09-27 2019-02-26 天涯社区网络科技股份有限公司 A kind of asynchronous multitask sequence loading method based on Android

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BUGME: "RePlugin使用入门", pages 1 - 4, Retrieved from the Internet <URL:《简书》,https://www.jianshu.com/p/e63821c63619> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968407A (en) * 2022-05-30 2022-08-30 北京金堤科技有限公司 Plug-in calling method and device, electronic equipment and storage medium
CN114968407B (en) * 2022-05-30 2024-03-08 北京金堤科技有限公司 Plug-in calling method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
CN108182131B (en) Method and device for monitoring application running state, storage medium and electronic equipment
CN111078339B (en) Interface element positioning method and device, computer equipment and storage medium
WO2016177341A1 (en) Interface calling method and device, and terminal
CN113885967B (en) Method, device, equipment and medium for starting applet
CN109240697B (en) Call processing method and device and storage medium
CN111767090A (en) Method and device for starting small program, electronic equipment and storage medium
CN111427622B (en) Execution method and device of script codes in application program
CN109743359B (en) Hybrid communication processing method and device, computer equipment and storage medium
JP2022505656A (en) Sub-application development methods, equipment, computer equipment, and computer programs
CN109408256B (en) Application calling method and device
CN110941459A (en) Method and device for calling Replugin
US20220292141A1 (en) Quick Application Startup Method and Related Apparatus
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN113127329B (en) Script debugging method and device and computer storage medium
WO2020006911A1 (en) Hybrid app interface calling method and device, and computer-readable storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN106775608B (en) Method and device for realizing independent system process
CN109977331B (en) Method and device for controlling execution of page resources
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
CN113282363A (en) Method and device for optimizing hybrid APP
CN111381830A (en) Data request processing method and device in program and computer equipment
CN113515299A (en) Software development kit SDK hot upgrading method, device, equipment and storage medium
CN109933357B (en) Application program upgrading method and device
CN111124553B (en) Program execution method, device, terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination