WO2020006911A1 - 混合型应用的接口调用方法、装置及计算机可读存储介质 - Google Patents
混合型应用的接口调用方法、装置及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2020006911A1 WO2020006911A1 PCT/CN2018/108781 CN2018108781W WO2020006911A1 WO 2020006911 A1 WO2020006911 A1 WO 2020006911A1 CN 2018108781 W CN2018108781 W CN 2018108781W WO 2020006911 A1 WO2020006911 A1 WO 2020006911A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- callback
- call
- api
- calling
- native
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
Definitions
- the present application relates to the field of computers, and in particular, to a method, a device, and a computer-readable storage medium for calling an interface of a hybrid application.
- Hybrid app is an application that is between web app and native app. It refers to the application's native code in which some functions use dynamic web pages (HTML5 + JavaScript). ) To achieve, with both the good user interaction experience of native applications and the advantages of cross-platform development of web applications.
- native code and JavaScript (a transliterated scripting language) code call each other and pass parameters, and can call back data, but native and JavaScript have the following problems in the mutual call process: in hybrid applications
- native code and JavaScript code are usually developed separately.
- a call method corresponding to the new function needs to be added to the JavaScript code, and the native code is also processed.
- the update enables the native code to add an API (Application Programming Interface) corresponding to the new function; the hot-updated new version of the JavaScript code is released directly online, so the updated JavaScript code can be used directly, but The new version of the native code can only be used after the user updates the hybrid application.
- API Application Programming Interface
- the user usually does not update the hybrid application in time, and thus does not obtain the new version of the native code in time.
- New version of JavaScript executes new caller When calling native, because the old version of native code does not include the corresponding API, the new calling method in JavaScript cannot complete the call, the hybrid application cannot complete the corresponding function startup, or even continue to use, compatibility and The experience is poor.
- the purpose of this application is to provide a method and device for invoking a hybrid application, and a computer-readable storage medium.
- the compatibility of the hybrid application is improved through version control, and at the same time the security of asynchronous calls by JavaScript is guaranteed.
- a method for calling an interface of a hybrid application includes:
- the target API is allowed to be called when the trigger operation is responded by the current JavaScript script file.
- the present application further provides an interface calling device for a hybrid application, and the device includes:
- a version determining module configured to determine a version number of the hybrid application when a trigger operation for calling a target API through a current JavaScript script file is received through the hybrid application;
- a detection module for determining whether the target API is included in the native API defined in the hybrid application according to the version number and the current JavaScript script file;
- An operation module is used to prohibit the invocation of the target API when the target API is not included in the native API, and when the trigger operation is responded by the current JavaScript script file;
- a calling module is used to allow the target API to be called when the target API is included in the native API and the trigger operation is responded through the current JavaScript script file.
- the present application also provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor.
- the processor executes the computer program, the mixed application is implemented.
- the target API is allowed to be called when the trigger operation is responded by the current JavaScript script file.
- the present application also provides a computer-readable storage medium.
- the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded by at least one processor and executes an interface calling method for implementing a hybrid application. The following steps:
- the target API is allowed to be called when the trigger operation is responded by the current JavaScript script file.
- This application implements version control of a pseudo-protocol that interacts with JavaScript natively.
- the current JavaScript script file does not match the current version of the native due to a hot update of JavaScript but the application is not upgraded, the current JavaScript script is used.
- the file responds to the trigger operation of calling the target API, it is forbidden to call the target API and skip this call directly to ensure the normal use of the main function of the hybrid application.
- JavaScript calls multiple native methods asynchronously, the native executes them sequentially and then callbacks in order to ensure the safety of the calling process. At the same time, when multiple calls meet the preset calling sequence, the native can perform multiple calls. Merge processing, and then make a final callback after all execution is completed, improving the efficiency of calling between JavaScript and native.
- FIG. 1 shows a flowchart of an embodiment of a method for invoking an interface of a hybrid application of the present application.
- FIG. 2 shows a flowchart of another embodiment of a method for invoking an interface of a hybrid application of the present application.
- FIG. 3 shows a schematic diagram of a program module of an embodiment of an interface calling device of a hybrid application of the present application.
- FIG. 4 is a schematic diagram of a program module of another embodiment of an interface calling device of a hybrid application of the present application.
- FIG. 5 is a schematic diagram of a program module of another embodiment of an interface calling device of a hybrid application of the present application.
- FIG. 6 is a schematic diagram of a program module of another embodiment of an interface calling device of a hybrid application of the present application.
- FIG. 7 is a schematic diagram of a hardware structure of an embodiment of a computer device of the present application.
- FIG. 1 illustrates specific steps of a method for calling an interface of a hybrid application.
- the hybrid application includes both a native and a JavaScript script file, and the native and JavaScript script files call each other to implement the functions of the entire hybrid application.
- native development is based on the development tools and languages supported by the hardware platform, which are installed on computer equipment based on such hardware platforms and can call hardware functions of the computer equipment (such as speakers, acceleration sensors, cameras, etc.).
- native It can be developed based on Xcode or Objective-c supported by the IOS platform and installed on a computer device based on the IOS platform, or it can be developed based on Eclipse or Java natively supported by the Android platform and installed on a computer device based on the Android platform.
- JavaScript script files are developed based on Web technology.
- the interface calling method disclosed in this application is as follows:
- the version number of the hybrid application is determined, where the current JavaScript script file is the latest version of the JavaScript script after the hot update.
- File the current JavaScript script file may or may not match the native version of the current version of the hybrid application.
- the target API is an API that does not affect the normal use of hybrid applications.
- the hybrid application is a bank application.
- the target API is a network information read API. Without this network information read API, although the network information cannot be read, it will not affect the bank.
- JavaScript can obtain the version number of a hybrid application by calling the corresponding interface provided natively, such as calling navigator.userAgent ().
- Step 120 Determine whether the target API is included in the native API defined in the hybrid application according to the version number and the current JavaScript script file: Since the list of native APIs defined in each version of the hybrid application is maintained on the server side, the current JavaScript script The file can obtain all the native APIs defined by the hybrid application maintained on the server side according to the version number of the hybrid application.
- step 130 if the native API does not include the target API, it means that the current JavaScript script file does not match the current native version, and the native version has not been updated after the JavaScript hot update. Therefore, the call cannot be completed, and the response is made through the current JavaScript script file. When an operation is triggered, it is prohibited to call the target API. By doing so, the current JavaScript script file directly skips the call to the target API. At the same time, a prompt box may be displayed in the hybrid application to prompt the user to update the hybrid application.
- the target API is a network information reading API.
- Hybrid applications maintain versions 1.0 and 1.1.
- the 1.0 version of the hybrid application does not provide a network information reading API natively.
- the 1.1 version of the hybrid application provides the network information natively.
- Read API JavaScript has been hot updated and added the calling method of calling the network information read API.
- the current approach may be Forcibly exiting a hybrid application when the user is not updated does not allow the user to continue to use it, but reading network information is not the main function of the hybrid application. Failure to read network information will not affect the normal use of the main function of the hybrid application.
- the current JavaScript script file can directly skip the call to the network information reading API, so that the user can continue to use the hybrid application.
- step 140 if the native API includes a target API, it means that the current JavaScript script file matches the current native version and the call can be completed.
- the target API is allowed to be called.
- the hybrid application installed by the user is already version 1.1
- the current JavaScript script file needs to call the network information reading API
- it will detect that the hybrid application of version 1.1 provides the corresponding interface natively. , Then execute the call to read the current network information.
- FIG. 2 shows the specific steps when the hybrid application is allowed to call the target API during the interface call, that is, the steps of the specific implementation method of step 140 in the first embodiment, including:
- step 141 if the native API includes the target API, it means that the current JavaScript script file matches the current native version, and the call can be completed. Then, the call to the target API is performed through the current JavaScript script file to generate the corresponding Callback ID. This callback ID is used to identify the callback function of the current call.
- the generation method is usually to obtain the call trigger parameters through the current JavaScript script file.
- the call trigger parameters are the parameters of the call trigger operation.
- the call trigger parameters include but It is not limited to receiving the timestamp information of the trigger operation, the number of times the trigger operation is received continuously within a predetermined time, and the interface number of the target API.
- a string is generated by the trigger parameter of the call, and then the string is converted using the string conversion method.
- the predetermined format is the callback identifier. For example, the generated string can be converted into a short string of 20 digits by using a string conversion method.
- Step 142 Pass the callback identifier as a parameter to the native through the current JavaScript script file, and call the target API.
- the current JavaScript script file is invoked asynchronously, that is, after the current JavaScript script file executes a call, it does not need to wait for the native completion callback to continue to execute the next call according to the method of steps 141 and 142. Then there may be one or more JavaScript calls at the same time.
- step 143 if the current JavaScript script file executes only one call within a preset duration, the business logic of the call is executed natively, and the preset duration can be customized. After the execution of the business logic of this call is completed, the callback function corresponding to the callback ID of this call is called natively to complete the callback of this call. At the time of the callback, the native execution result data of the business logic can be passed to the current JavaScript script as a parameter. File to return the corresponding data of the call to the current JavaScript script file, and then clear the callback ID natively to ensure the uniqueness of the callback.
- Step 144 If the current JavaScript script file executes N calls within a preset time period, N ⁇ 2 and N is a positive integer, it is natively detected whether the calling order of the N calls conforms to the preset calling order, and the preset calling order may be A custom ordering rule.
- a more commonly used preset calling sequence is: before and after calling the data modification class API, the data read API is called separately.
- the data modification class API includes the data write API, the data delete API, and At least one of the data update APIs, for example, the four calls are: call data read API (getData ()), call data delete API (deletedData ()), call data write API (saveData ()), call data Read API.
- Step 145 When it is detected that the calling sequence of the N calls conforms to the preset calling sequence, the native executes the N calls in turn according to the calling sequence, and after executing the business logic of all the N calls, the callback ID corresponding to the last call is corresponding
- the callback function completes the callback and clears the N callback identities of N calls, that is, the native only executes the callback and clears the identity once. For the 1st to N-1 calls, the native execution does not perform the callback after completing the business logic. And clear the logo.
- call data read API corresponds to callback ID_1
- call data delete API corresponds to callback ID_2
- call data write API corresponds to callback ID_3
- call data read API corresponds to callback ID_4
- the native does not execute the callback or clear the callback ID_1, but continues to execute the second callback to delete the data, and then does not execute the callback, nor clears the callback ID_2, and continues to execute the third time.
- the callback writes data, and then does not execute the callback, nor clears the callback ID_3, continues to execute the fourth callback to read the data, and then calls the callback function corresponding to the callback ID_4 to return the final data to the current JavaScript script file, and clears the callback ID_1, Callback ID_2, Callback ID_3, and Callback ID_4.
- step 146 when it is detected that the calling sequence of the N calls does not conform to the preset calling sequence, the native executes N calls in turn according to the calling sequence, and after each call is completed, the callback function corresponding to the callback identifier of the current call is completed. Callback and clear the callback ID.
- the two calls made by the current JavaScript script file are: calling the camera API (corresponding to the callback ID_5) and calling the data read API (corresponding to the callback ID_6).
- the corresponding callback ID_5 is called.
- the callback function completes the callback and clears the callback ID_5, and then executes the second call natively to read the data, the callback function corresponding to the callback ID_6 is called to complete the callback and clear the callback ID_6.
- a hybrid application interface calling device 300 is shown.
- the device is divided into one or more program modules, and each program module can be further divided into one or more program submodules and program units.
- the one or more program modules are stored in a storage medium and executed by one or more processors to complete the application.
- the program modules, program submodules, and program units in this application refer to a series of computer program instruction segments capable of performing specific functions. They are more suitable than the program itself to describe the execution process of the interface calling device in a storage medium. The following description will specifically introduce Functions of each module, submodule, and unit in this embodiment:
- the version determining module 310 is configured to determine a version number of the hybrid application when a trigger operation for calling a target API through a current JavaScript script file is received through the hybrid application;
- a detection module 320 configured to determine whether the target API is included in the native API defined in the hybrid application according to the version number and the current JavaScript script file;
- the operation module 330 is configured to prohibit the invocation of the target API when the target API is not included in the native API, and when the trigger operation is responded by the current JavaScript script file;
- the calling module 340 is configured to allow the target API to be called when the target API is included in the native API and the trigger operation is responded by the current JavaScript script file.
- the calling module 340 further includes a calling sub-module 341, an identification generating sub-module 342, a transmitting sub-module 343, and a callback sub-module 344. Please refer to FIG. 4.
- Calling submodule 341 is used to execute the call to the target API through the current JavaScript script file;
- ID generation submodule 342 is used to generate the callback ID corresponding to this call through the current JavaScript script file.
- the callback ID is used to identify the call Callback function; transfer sub-module 343, which is used to transfer the callback identifier to the native through the current JavaScript script file; callback sub-module 344, which is used to execute the business logic of this call through native and after executing the business logic of this call , Call the callback function corresponding to the callback ID to complete the callback of this call, and clear the callback ID.
- the identifier generation sub-module 342 includes a parameter acquisition unit 342-1 and an identifier generation unit 342-2.
- a parameter obtaining unit 342-1 is used to obtain a call trigger parameter.
- the call trigger parameter includes, but is not limited to, timestamp information of the call trigger operation received, the number of times the call trigger operation is continuously received within a predetermined time, and the interface number of the target API;
- the generating unit 342-2 is configured to generate a callback identifier according to a call trigger parameter.
- the callback sub-module 344 includes a detection unit 344-1, a first execution unit 344-2, and a second execution unit 344-3.
- a detection unit 344-1 is configured to detect whether the calling sequence of N calls conforms to a preset calling sequence through native detection;
- the first execution unit 344-2 is configured to detect that the calling sequence of N calls meets a preset calling sequence, After natively executing the business logic of N calls in turn in the order of the calls, the callback function corresponding to the callback ID of the last call is called to complete the callback, and the N callback IDs of the N calls are cleared;
- the second execution unit 344-3 uses When it is detected that the calling sequence of N calls does not conform to the preset calling sequence, N calls are sequentially performed in the native calling sequence in accordance with the calling sequence, and after each call is completed, the callback function corresponding to the called callback identifier completes the callback and Clear callback ID.
- This embodiment provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server, or multiple servers) that can execute programs. Server cluster consisting of several servers) and so on.
- the computer device 70 in this embodiment includes, but is not limited to, a memory 71 and a processor 72 that can be communicatively connected to each other through a system bus, as shown in FIG. 7. It should be noted that FIG. 7 only shows a computer device 70 having a memory 71 and a processor 72, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. .
- the memory 71 (ie, a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
- the memory 71 may be an internal storage unit of the computer device 70, such as a hard disk or a memory of the computer device 70.
- the memory 71 may also be an external storage device of the computer device 70, such as a plug-in hard disk, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, Flash card, etc.
- the memory 71 may also include both the internal storage unit of the computer device 70 and its external storage device.
- the memory 71 is generally used to store an operating system and various types of application software installed in the computer device 70, for example, the program code of the interface calling device 300 of the hybrid application of the third embodiment.
- the memory 71 may also be used to temporarily store various types of data that have been output or are to be output.
- the processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments.
- the processor 72 is generally used to control the overall operation of the computer device 70.
- the processor 72 is configured to run the program code or process data stored in the memory 71, for example, the program code of the interface calling device 300 running the hybrid application of the third embodiment to implement the first and second embodiments. Interface calling methods for hybrid applications.
- This embodiment provides a computer-readable storage medium.
- the computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by at least one processor to implement the operations of the interface calling methods of the first and second embodiments. .
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供一种混合型应用的接口调用方法,包括如下步骤:在通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作时,确定混合型应用的版本号,根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API,从而禁止调用或允许调用目标API;本申请实现了对JavaScript与原生交互的伪协议的版本控制,在JavaScript进行热更新但应用未升级而导致的当前JavaScript脚本文件与原生不匹配的情况下,若检测到当前版本下无法完成调用时,则在通过当前JavaScript脚本文件响应上述触发操作时,禁止调用目标API并直接跳过此次调用,保证混合型应用主体功能的正常使用。
Description
本申请申明享有2018年7月2日递交的申请号为CN2018107100348、名称为“混合型应用的接口调用方法、装置及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
本申请涉及计算机领域,尤其涉及一种混合型应用的接口调用方法、装置及计算机可读存储介质。
混合型应用(Hybrid App)是一种介于网页应用(Web App)和原生应用(Native App)之间的应用,指的是应用的原生(Native)代码中部分功能采用动态网页(HTML5+JavaScript)来实现,兼具原生应用良好的用户交互体验以及网页应用跨平台开发的优势。
在混合型应用的使用过程中,原生代码和JavaScript(一种直译式脚本语言)代码互相调用并传递参数,而且能回调数据,但原生与JavaScript在相互调用过程中存在以下问题:在混合型应用的开发过程中,原生代码和JavaScript代码通常是分开开发的,当需要为混合型应用增加一种新的功能时,需要在JavaScript代码中增加对应于该新功能的调用方法,同时对原生代码进行更新使原生代码增加一个与该新功能对应的API(Application Programming Interface,应用程序编程接口);JavaScript代码热更新后的新版本直接被发布到线上,因此可以直接使用更新后的JavaScript代码,但原生代码更新后的新版本只有在用户更新该混合型应用后才能被使用,而实际使用时,用户通常不会及时更新混合型应用,也就不会及时获取到新版本的原 生代码,则当新版本的JavaScript执行新增加的调用方法来调用原生时,由于旧版本的原生代码中并不包括对应的API,因此JavaScript中的新的调用方法无法完成调用,混合型应用程序无法完成相应功能的启动,甚至无法继续使用,兼容性和使用体验都较差。
发明内容
本申请的目的在于提供一种混合型应用的接口调用方法、装置及计算机可读存储介质,通过版本控制提高了混合型应用的兼容性,同时保证了JavaScript异步调用时的安全性。
本申请是通过下述技术方案来解决上述技术问题:
一种混合型应用的接口调用方法,该方法包括:
若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定混合型应用的版本号;
根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API;
若原生API中不包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API;
若原生API中包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。
为了实现上述目的,本申请还提供了一种混合型应用的接口调用装置,该装置包括:
版本确定模块,用于在通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作时,确定混合型应用的版本号;
检测模块,用于根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API;
操作模块,用于在原生API中不包括目标API时,通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API;
调用模块,用于在原生API中包括目标API时,通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。
为了实现上述目的,本申请还提供了一种计算机设备,该计算机设备包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现混合型应用的接口调用方法的以下步骤:
若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定混合型应用的版本号;
根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API;
若原生API中不包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API;
若原生API中包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。
为了实现上述目的,本申请还提供了一种计算机可读存储介质,计算机可读存储介质内存储有至少一条指令,至少一条指令由至少一个处理器加载并执行实现混合型应用的接口调用方法的以下步骤:
若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定混合型应用的版本号;
根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API;
若原生API中不包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API;
若原生API中包括目标API,则在通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。
本申请的积极进步效果在于:
1、本申请实现了对JavaScript与原生交互的伪协议的版本控制,在JavaScript进行热更新但应用未升级而导致的当前JavaScript脚本文件与当前 版本的原生不匹配的情况下,在通过当前JavaScript脚本文件响应调用目标API的触发操作时,禁止调用目标API,直接跳过此次调用,保证混合型应用主体功能的正常使用。
2、JavaScript在异步调用多个原生方法时,原生按调用顺序依次执行并依次回调,保证了调用过程中的安全性;同时在多次调用符合预设调用顺序时,原生可以对多次调用进行合并处理,全部执行完成后再在最后进行一次回调,提高了JavaScript与原生之间互相调用的效率。
图1示出了本申请混合型应用的接口调用方法一实施例的流程图。
图2示出了本申请混合型应用的接口调用方法又一实施例的流程图。
图3示出了本申请混合型应用的接口调用装置一实施例的程序模块示意图。
图4示出了本申请混合型应用的接口调用装置又一实施例的程序模块示意图。
图5示出了本申请混合型应用的接口调用装置又一实施例的程序模块示意图。
图6示出了本申请混合型应用的接口调用装置又一实施例的程序模块示意图。
图7示出了本申请计算机设备一实施例的硬件结构示意图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领 域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
请参考图1,示出了混合型应用的接口调用方法的具体步骤,该混合型应用同时包括原生以及JavaScript脚本文件,原生和JavaScript脚本文件互相调用以实现整个混合型应用的功能。其中,原生基于硬件平台支持的开发工具和语言来开发,其被安装于基于该类硬件平台的计算机设备上并可以调用计算机设备的硬件功能(如扬声器、加速度传感器和摄像头等),例如,原生可以基于IOS平台支持的Xcode或Objective-c来开发并被安装于基于IOS平台的计算机设备上,或者,原生基于安卓平台支持的Eclipse或Java来开发并被安装于基于安卓平台的计算机设备上。JavaScript脚本文件基于Web技术开发。本申请公开的接口调用方法具体如下:
步骤110,若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定混合型应用的版本号,其中,当前JavaScript脚本文件为经过热更新后的最新版本的JavaScript脚本文件,该当前JavaScript脚本文件可能与当前版本的混合型应用的原生匹配,也可能不匹配。目标API为不影响混合型应用正常使用的API,比如混合型应用为银行类应用,目标API为网络信息读取API,没有该网络信息读取API虽然无法读取网络信息但不会影响银行类应用的正常使用,实际目标API具体的含义可以自定义。JavaScript可以通过调用原生提供的相应接口就可以获取混合型应用的版本号,比如调用navigator.userAgent()。
步骤120,根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API:由于各个版本的混合型应用定义的原生API的列表会维护在服务器端,因此当前JavaScript脚本文件根据混合型应用的版本号就能获取到服务器端维护的该混合型应用定义的所有的原生API。
步骤130,若原生API中不包括目标API,则说明当前JavaScript脚本文件与目前原生的版本不匹配,JavaScript热更新后原生尚未进行更新,因此此次调用不能完成,则在通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API,通过做法是当前JavaScript脚本文件直接跳过此次对目标API的调用,同时还可以在混合型应用中显示提示框提示用户更新该混合型应用。
比如,目标API为网络信息读取API,混合型应用维护有1.0版本和1.1版本,1.0版本的混合型应用的原生不提供网络信息读取API,1.1版本的混合型应用的原生提供该网络信息读取API,JavaScript已经进行了热更新并增加了调用网络信息读取API的调用方法。假设用户安装的混合型应用仍然是1.0版本的,则当前JavaScript脚本文件在需要调用该网络信息读取API时,会检测到1.0版本的混合型应用的原生不提供相应接口,目前的做法可能是在用户不更新的状态下强制退出混合型应用不允许用户继续使用,但网络信息读取不是混合型应用的主要功能,无法读取网络信息不会影响混合型应用主体功能的正常使用,因此在本申请的做法中,当前JavaScript脚本文件可以直接跳过对该网络信息读取API的调用,使得用户能够继续使用该混合型应用。
步骤140,若原生API中包括目标API,则说明当前JavaScript脚本文件与目前原生的版本相匹配,此次调用可以完成,则在通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。
例如,在上述例子中,假设用户安装的混合型应用已经是1.1版本的,则当前JavaScript脚本文件在需要调用该网络信息读取API时,会检测到1.1版本的混合型应用的原生提供相应接口,则执行调用读取到当前的网络信息。
实施例二
请参考图2,示出了混合型应用在接口调用过程中允许调用目标API时的具体步骤,也即上述实施例一中步骤140的具体实施方法的步骤,包括:
步骤141,若原生API中包括目标API,则说明当前JavaScript脚本文件与目前原生的版本相匹配,此次调用可以完成,则通过当前JavaScript脚本文件执行对目标API的调用,生成本次调用对应的回调标识,该回调标识用于标识本次调用的回调函数,生成方法通常为:通过当前JavaScript脚本文件获取调用触发参数,调用触发参数是此次调用触发操作的各项参数,调用触发参数包括但不限于接收到调用触发操作的时间戳信息、预定时间内连续接收到调用触发操作的次数以及目标API的接口编号等,由调用触发参数生成字符串,然后利用字符串转换方法将该字符串转换为预定格式即为回调标识,比如可以利用字符串转换方法将生成的该字符串转换为20进制的短字符串。
步骤142,通过当前JavaScript脚本文件将回调标识作为参数传送给原生,并对目标API进行调用。当前JavaScript脚本文件采用异步调用的方法进行调用,也即当前JavaScript脚本文件在执行一次调用后,不需要等待原生完成回调就可以按照步骤141和步骤142的方法继续执行下一次调用。则同一时刻可能会存在一个或多个JavaScript的调用。
步骤143,若当前JavaScript脚本文件在预设时长内仅执行一次调用,则原生执行本次调用的业务逻辑,其中预设时长可以自定义。在执行完成本次调用的业务逻辑后,原生调用此次调用的回调标识对应的回调函数完成本次调用的回调,在回调时,原生可以将业务逻辑的执行结果数据作为参数传送给当前JavaScript脚本文件以向当前JavaScript脚本文件返回此次调用相应的数据,然后原生清除回调标识,保证回调的唯一性。
步骤144,若当前JavaScript脚本文件在预设时长内执行N次调用,N≥2且N为正整数,则原生检测N次调用的调用顺序是否符合预设调用顺序,该预设调用顺序可以是一个自定义的顺序规则,比如比较常用的一种预设调用顺序为:在调用数据修改类API之前和之后分别调用了数据读取API,数据修改类API包括数据写入API、数据删除API和数据更新API中的至少一种,比如4次调用依次为:调用数据读取API(getData())、调用数据删除 API(deletedData())、调用数据写入API(saveData())、调用数据读取API。
步骤145,当检测到N次调用的调用顺序符合预设调用顺序时,原生按照调用顺序依次执行N次调用,并在执行完成所有N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除N次调用的N个回调标识,也即原生只执行一次回调和清除标识的操作,对于第1至N-1次调用,原生执行完成业务逻辑后并不进行回调和清除标识。
例如,当前JavaScript脚本文件执行的4次调用依次为:调用数据读取API(对应回调ID_1)、调用数据删除API(对应回调ID_2)、调用数据写入API(对应回调ID_3)、调用数据读取API(对应回调ID_4),符合预设调用顺序。则原生执行第一次调用读取数据后,不执行回调,也不清除回调ID_1,而是继续执行第二次回调删除数据,然后也不执行回调,也不清除回调ID_2,继续执行第三次回调写入数据,然后也不执行回调,也不清除回调ID_3,继续执行第四次回调读取数据,然后调用回调ID_4对应的回调函数将最终数据返回给当前JavaScript脚本文件,并清除回调ID_1、回调ID_2、回调ID_3和回调ID_4。
步骤146,当检测到N次调用的调用顺序不符合预设调用顺序时,原生按照调用顺序依次执行N次调用,且在执行完成每一次调用后,调用当前调用的回调标识对应的回调函数完成回调并清除回调标识。
例如,当前JavaScript脚本文件执行的2次调用依次为:调用相机API(对应回调ID_5)和调用数据读取API(对应回调ID_6),则原生执行第一次调用打开相机应用后,调用回调ID_5对应的回调函数完成回调并清除回调ID_5,然后原生执行第二次调用读取数据后,调用回调ID_6对应的回调函数完成回调并清除回调ID_6。
实施例三
请参考图3,示出了一种混合型应用的接口调用装置300,该装置被分割成一个或多个程序模块,每一个程序模块可以进一步被分割成一个或多个 程序子模块及程序单元,该一个或多个程序模块被存储在存储介质中,并由一个或多个处理器所执行,以完成本申请。本申请中的程序模块、程序子模块和程序单元是指能够完成特定功能的一系列计算机程序指令段,比程序本身更适合描述接口调用装置在存储介质中能够的执行过程,以下描述将具体介绍本实施例各模块、子模块和单元等功能:
版本确定模块310,用于在通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作时,确定混合型应用的版本号;
检测模块320,用于根据版本号与当前JavaScript脚本文件,确定混合型应用中定义的原生API中是否包括目标API;
操作模块330,用于在原生API中不包括目标API时,通过当前JavaScript脚本文件响应触发操作时,禁止调用目标API;
调用模块340,用于在原生API中包括目标API时,通过当前JavaScript脚本文件响应触发操作时,允许调用目标API。调用模块340进一步包括调用子模块341、标识生成子模块342、传送子模块343和回调子模块344,请参考图4。调用子模块341,用于通过当前JavaScript脚本文件执行对目标API的调用;标识生成子模块342,用于通过当前JavaScript脚本文件生成本次调用对应的回调标识,回调标识用于标识本次调用的回调函数;传送子模块343,用于通过当前JavaScript脚本文件将回调标识传送给原生;回调子模块344,用于通过原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用回调标识对应的回调函数完成本次调用的回调,并清除回调标识。
请参考图5,进一步的,标识生成子模块342包括参数获取单元342-1和标识生成单元342-2。参数获取单元342-1,用于获取调用触发参数,调用触发参数包括但不限于接收到调用触发操作的时间戳信息、预定时间内连续接收到调用触发操作的次数以及目标API的接口编号;标识生成单元342-2,用于根据调用触发参数生成回调标识。
请参考图6,进一步的,回调子模块344包括检测单元344-1、第一执 行单元344-2以及第二执行单元344-3。检测单元344-1,用于通过原生检测N次调用的调用顺序是否符合预设调用顺序;第一执行单元344-2,用于在检测到N次调用的调用顺序符合预设调用顺序时,通过原生按照调用顺序依次执行完成N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除N次调用的N个回调标识;第二执行单元344-3,用于在检测到N次调用的调用顺序不符合预设调用顺序时,通过原生按照调用顺序依次执行N次调用,且在执行完成每一次调用后,调用调用的回调标识对应的回调函数完成回调并清除回调标识。
实施例四
本实施例提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备70至少包括但不限于:可通过系统总线相互通信连接的存储器71和处理器72,如图7所示。需要指出的是,图7仅示出了具有存储器71和处理器72的计算机设备70,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
本实施例中,存储器71(即可读存储介质)包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器71可以是计算机设备70的内部存储单元,例如该计算机设备70的硬盘或内存。在另一些实施例中,存储器71也可以是计算机设备70的外部存储设备,例如该计算机设备70上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器71还可以既包括计算机设备70的内部存储单元也包括其外部存储设备。本实施例中,存储器71通常用于存储 安装于计算机设备70的操作系统和各类应用软件,例如实施例三的混合型应用的接口调用装置300的程序代码等。此外,存储器71还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器72在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器72通常用于控制计算机设备70的总体操作。本实施例中,处理器72用于运行存储器71中存储的程序代码或者处理数据,例如运行实施例三的混合型应用的接口调用装置300的程序代码,以实现实施例一和实施例二的混合型应用的接口调用方法。
实施例五
本实施例提供一种计算机可读存储介质,该计算机可读存储介质内存储有至少一条指令,该至少一条指令由至少一个处理器加载并执行以实现实施例一和二的接口调用方法的操作。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (19)
- 一种混合型应用的接口调用方法,其特征在于,所述方法包括:若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定所述混合型应用的版本号;根据所述版本号与所述当前JavaScript脚本文件,确定所述混合型应用中定义的原生API中是否包括所述目标API;若所述原生API中不包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,禁止调用所述目标API;若所述原生API中包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API。
- 根据权利要求1所述的方法,其特征在于,所述在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API,包括:通过所述当前JavaScript脚本文件执行对所述目标API的调用,生成本次调用对应的回调标识并将所述回调标识传送给原生,所述回调标识用于标识本次调用的回调函数;通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识。
- 根据权利要求2所述的方法,其特征在于,所述生成本次调用对应的回调标识,包括:获取调用触发参数,所述调用触发参数包括但不限于接收到所述调用触发操作的时间戳信息、预定时间内连续接收到所述调用触发操作的次数以及所述目标API的接口编号;根据所述调用触发参数生成所述回调标识。
- 根据权利要求2所述的方法,其特征在于,所述当前JavaScript脚本文件在预设时长内依次执行N次调用,N≥2,则通过所述原生执行本次调 用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识,包括:通过所述原生检测所述N次调用的调用顺序是否符合预设调用顺序;当检测到所述N次调用的调用顺序符合所述预设调用顺序时,通过所述原生按照所述调用顺序依次执行完成N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除所述N次调用的N个回调标识;当检测到所述N次调用的调用顺序不符合所述预设调用顺序时,原生按照所述调用顺序依次执行所述N次调用,且在执行完成每一次调用后,调用所述调用的回调标识对应的回调函数完成回调并清除所述回调标识。
- 根据权利要求4所述的方法,其特征在于,所述预设调用顺序包括:在调用数据修改类API之前和之后分别调用了数据读取API,所述数据修改类API包括数据写入API、数据删除API和数据更新API中的至少一种。
- 一种混合型应用的接口调用装置,其特征在于,所述装置包括:版本确定模块,用于在通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作时,确定所述混合型应用的版本号;检测模块,用于根据所述版本号与所述当前JavaScript脚本文件,确定所述混合型应用中定义的原生API中是否包括所述目标API;操作模块,用于在所述原生API中不包括所述目标API时,通过所述当前JavaScript脚本文件响应所述触发操作时,禁止调用所述目标API;调用模块,用于在所述原生API中包括所述目标API时,通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API。
- 根据权利要求6所述的装置,其特征在于,所述调用模块包括:调用子模块,用于通过所述当前JavaScript脚本文件执行对所述目标API的调用;标识生成子模块,用于通过所述当前JavaScript脚本文件生成本次调用对应的回调标识,所述回调标识用于标识本次调用的回调函数;传送子模块,用于通过所述当前JavaScript脚本文件将所述回调标识传送给原生;回调子模块,用于通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识。
- 根据权利要求7所述的装置,其特征在于,所述标识生成子模块包括:参数获取单元,用于获取调用触发参数,调用触发参数包括但不限于接收到调用触发操作的时间戳信息、预定时间内连续接收到调用触发操作的次数以及目标API的接口编号;标识生成单元,用于根据调用触发参数生成回调标识。
- 根据权利要求7所述的装置,其特征在于,所述回调子模块包括:检测单元,用于通过所述原生检测所述N次调用的调用顺序是否符合预设调用顺序;第一执行单元,用于在检测到所述N次调用的调用顺序符合所述预设调用顺序时,通过所述原生按照所述调用顺序依次执行完成N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除所述N次调用的N个回调标识;第二执行单元,用于在检测到所述N次调用的调用顺序不符合所述预设调用顺序时,通过所述原生按照所述调用顺序依次执行所述N次调用,且在执行完成每一次调用后,调用所述调用的回调标识对应的回调函数完成回调并清除所述回调标识。
- 根据权利要求8所述的装置,其特征在于,所述预设调用顺序包括:在调用数据修改类API之前和之后分别调用了数据读取API,所述数据修改类API包括数据写入API、数据删除API和数据更新API中的至少一种。11、一种计算机设备,其特征在于,所述计算机设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行 所述计算机程序时实现混合型应用的接口调用方法的以下步骤:若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定所述混合型应用的版本号;根据所述版本号与所述当前JavaScript脚本文件,确定所述混合型应用中定义的原生API中是否包括所述目标API;若所述原生API中不包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,禁止调用所述目标API;若所述原生API中包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API。
- 根据权利要求11所述的计算机设备,其特征在于,所述在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API,包括:通过所述当前JavaScript脚本文件执行对所述目标API的调用,生成本次调用对应的回调标识并将所述回调标识传送给原生,所述回调标识用于标识本次调用的回调函数;通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识。
- 根据权利要求12所述的计算机设备,其特征在于,所述生成本次调用对应的回调标识,包括:获取调用触发参数,所述调用触发参数包括但不限于接收到所述调用触发操作的时间戳信息、预定时间内连续接收到所述调用触发操作的次数以及所述目标API的接口编号;根据所述调用触发参数生成所述回调标识。
- 根据权利要求12所述的计算机设备,其特征在于,所述当前JavaScript脚本文件在预设时长内依次执行N次调用,N≥2,则通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所 述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识,包括:通过所述原生检测所述N次调用的调用顺序是否符合预设调用顺序;当检测到所述N次调用的调用顺序符合所述预设调用顺序时,通过所述原生按照所述调用顺序依次执行完成N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除所述N次调用的N个回调标识;当检测到所述N次调用的调用顺序不符合所述预设调用顺序时,原生按照所述调用顺序依次执行所述N次调用,且在执行完成每一次调用后,调用所述调用的回调标识对应的回调函数完成回调并清除所述回调标识。
- 根据权利要求14所述的计算机设备,其特征在于,所述预设调用顺序包括:在调用数据修改类API之前和之后分别调用了数据读取API,所述数据修改类API包括数据写入API、数据删除API和数据更新API中的至少一种。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有至少一条指令,所述至少一条指令由至少一个处理器加载并执行实现混合型应用的接口调用方法的以下步骤:若通过混合型应用接收到用于通过当前JavaScript脚本文件调用目标API的触发操作,则确定所述混合型应用的版本号;根据所述版本号与所述当前JavaScript脚本文件,确定所述混合型应用中定义的原生API中是否包括所述目标API;若所述原生API中不包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,禁止调用所述目标API;若所述原生API中包括所述目标API,则在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目标API。
- 根据权利要求16所述的计算机可读存储介质,其特征在于,所述在通过所述当前JavaScript脚本文件响应所述触发操作时,允许调用所述目 标API,包括:通过所述当前JavaScript脚本文件执行对所述目标API的调用,生成本次调用对应的回调标识并将所述回调标识传送给原生,所述回调标识用于标识本次调用的回调函数;通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述生成本次调用对应的回调标识,包括:获取调用触发参数,所述调用触发参数包括但不限于接收到所述调用触发操作的时间戳信息、预定时间内连续接收到所述调用触发操作的次数以及所述目标API的接口编号;根据所述调用触发参数生成所述回调标识。
- 根据权利要求17所述的计算机可读存储介质,其特征在于,所述当前JavaScript脚本文件在预设时长内依次执行N次调用,N≥2,则通过所述原生执行本次调用的业务逻辑,并在执行完成本次调用的业务逻辑后,调用所述回调标识对应的回调函数完成本次调用的回调,并清除所述回调标识,包括:通过所述原生检测所述N次调用的调用顺序是否符合预设调用顺序;当检测到所述N次调用的调用顺序符合所述预设调用顺序时,通过所述原生按照所述调用顺序依次执行完成N次调用的业务逻辑后,调用最后一次调用的回调标识对应的回调函数完成回调,并清除所述N次调用的N个回调标识;当检测到所述N次调用的调用顺序不符合所述预设调用顺序时,原生按照所述调用顺序依次执行所述N次调用,且在执行完成每一次调用后,调用所述调用的回调标识对应的回调函数完成回调并清除所述回调标识。
- 根据权利要求19所述的计算机可读存储介质,其特征在于,所述 预设调用顺序包括:在调用数据修改类API之前和之后分别调用了数据读取API,所述数据修改类API包括数据写入API、数据删除API和数据更新API中的至少一种。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810710034.8 | 2018-07-02 | ||
| CN201810710034.8A CN109032612B (zh) | 2018-07-02 | 2018-07-02 | 混合型应用的接口调用方法、装置及计算机可读存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020006911A1 true WO2020006911A1 (zh) | 2020-01-09 |
Family
ID=65521245
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/108781 Ceased WO2020006911A1 (zh) | 2018-07-02 | 2018-09-29 | 混合型应用的接口调用方法、装置及计算机可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109032612B (zh) |
| WO (1) | WO2020006911A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111857891A (zh) * | 2020-07-27 | 2020-10-30 | 浪潮云信息技术股份公司 | Android原生和H5下数据处理方法、终端和介质 |
| CN114879970A (zh) * | 2022-05-25 | 2022-08-09 | 平安普惠企业管理有限公司 | 预防重复触发的方法、装置、设备及存储介质 |
| CN116708534A (zh) * | 2023-07-07 | 2023-09-05 | 中国平安人寿保险股份有限公司 | 原生调用检测方法及装置、电子设备、存储介质 |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110852259A (zh) * | 2019-11-08 | 2020-02-28 | 深圳前海微众银行股份有限公司 | 活体识别方法、系统、装置、设备及计算机可读存储介质 |
| CN111124553B (zh) * | 2019-12-06 | 2024-04-26 | 北京小米移动软件有限公司 | 一种程序执行方法、装置、终端及存储介质 |
| CN116756046B (zh) * | 2023-08-16 | 2023-11-03 | 湖南长银五八消费金融股份有限公司 | 一种接口自动化测试方法、装置、设备及存储介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102622211A (zh) * | 2011-01-27 | 2012-08-01 | 腾讯科技(深圳)有限公司 | 一种应用程序开发的方法和装置 |
| CN104881318A (zh) * | 2015-05-07 | 2015-09-02 | 北京金山安全软件有限公司 | 一种接口调用方法、装置及终端 |
| CN104978176A (zh) * | 2014-04-10 | 2015-10-14 | 腾讯科技(北京)有限公司 | 应用程序接口调用方法及装置 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150008256A1 (en) * | 2012-10-09 | 2015-01-08 | Robert Beadles | Display card with memory tag- hybrid multidimensional bar text code |
| CN104102537B (zh) * | 2013-04-07 | 2017-09-29 | 华为技术有限公司 | 一种应用调用方法及用户终端 |
| CN105739967A (zh) * | 2016-01-19 | 2016-07-06 | 四川长虹电器股份有限公司 | 移动应用中js异步调用native的方法 |
| CN107678805A (zh) * | 2017-09-08 | 2018-02-09 | 阿里巴巴集团控股有限公司 | 一种应用程序接口的调用方法和装置 |
-
2018
- 2018-07-02 CN CN201810710034.8A patent/CN109032612B/zh active Active
- 2018-09-29 WO PCT/CN2018/108781 patent/WO2020006911A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102622211A (zh) * | 2011-01-27 | 2012-08-01 | 腾讯科技(深圳)有限公司 | 一种应用程序开发的方法和装置 |
| CN104978176A (zh) * | 2014-04-10 | 2015-10-14 | 腾讯科技(北京)有限公司 | 应用程序接口调用方法及装置 |
| CN104881318A (zh) * | 2015-05-07 | 2015-09-02 | 北京金山安全软件有限公司 | 一种接口调用方法、装置及终端 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111857891A (zh) * | 2020-07-27 | 2020-10-30 | 浪潮云信息技术股份公司 | Android原生和H5下数据处理方法、终端和介质 |
| CN114879970A (zh) * | 2022-05-25 | 2022-08-09 | 平安普惠企业管理有限公司 | 预防重复触发的方法、装置、设备及存储介质 |
| CN116708534A (zh) * | 2023-07-07 | 2023-09-05 | 中国平安人寿保险股份有限公司 | 原生调用检测方法及装置、电子设备、存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109032612A (zh) | 2018-12-18 |
| CN109032612B (zh) | 2022-01-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020006911A1 (zh) | 混合型应用的接口调用方法、装置及计算机可读存储介质 | |
| CN110020323B (zh) | 混合应用的页面切换方法、系统、计算机设备及存储介质 | |
| US10664290B2 (en) | Application environment that implements native code functionality in progressive web applications | |
| US20170052884A1 (en) | Generic test automation for restful web services applications | |
| WO2016177341A1 (zh) | 接口调用方法、装置及终端 | |
| CN113051088B (zh) | 程序加载方法、装置、设备及计算机可读介质 | |
| CN110162344B (zh) | 一种隔离限流的方法、装置、计算机设备及可读存储介质 | |
| CN109634641B (zh) | 一种应用程序更新方法、装置、电子设备及介质 | |
| CN110045952B (zh) | 代码调用方法与装置 | |
| CN108132832B (zh) | 应用程序启动方法和装置 | |
| CN110543348B (zh) | 一种指令处理方法、系统、电子设备和存储介质 | |
| US10606612B2 (en) | Context check bypass to enable opening shared-object libraries | |
| CN112925561B (zh) | 一种软件开发方法、装置、计算机设备及存储介质 | |
| CN107168719A (zh) | 应用程序运行方法、装置、终端及计算机可读存储介质 | |
| CN108037914B (zh) | 一种安卓原生系统结合js开发的方法及装置 | |
| CN110968358A (zh) | 一种基于浏览器插件加载脚本模块的方法及装置 | |
| CN106775608B (zh) | 独立系统进程的实现方法和装置 | |
| CN114489698A (zh) | 应用程序安装方法和装置 | |
| CN114880632B (zh) | 获取混淆资源的方法、智能终端及计算机可读存储介质 | |
| CN112527371A (zh) | 一种引导加载程序升级方法、装置、电子设备及存储介质 | |
| US20140298456A1 (en) | Securing applications for computing devices | |
| CN113296910B (zh) | 文件系统的调用方法、装置、终端设备及可读存储介质 | |
| CN114020278B (zh) | 数据处理方法、装置、设备及存储介质 | |
| CN114816482A (zh) | 块存储服务的升级方法、装置、计算机设备及存储介质 | |
| CN114356290A (zh) | 一种数据处理方法、装置及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18925591 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18925591 Country of ref document: EP Kind code of ref document: A1 |