CN107102904B - Interaction method and device based on hybrid application program - Google Patents

Interaction method and device based on hybrid application program Download PDF

Info

Publication number
CN107102904B
CN107102904B CN201710198199.7A CN201710198199A CN107102904B CN 107102904 B CN107102904 B CN 107102904B CN 201710198199 A CN201710198199 A CN 201710198199A CN 107102904 B CN107102904 B CN 107102904B
Authority
CN
China
Prior art keywords
api
specified
web page
message
native layer
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.)
Active
Application number
CN201710198199.7A
Other languages
Chinese (zh)
Other versions
CN107102904A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710198199.7A priority Critical patent/CN107102904B/en
Publication of CN107102904A publication Critical patent/CN107102904A/en
Application granted granted Critical
Publication of CN107102904B publication Critical patent/CN107102904B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • G06F9/548Object oriented; Remote method invocation [RMI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an interaction method and device based on a hybrid application program, and belongs to the technical field of computers. The hybrid application includes a native layer and a Web page, the method including: the method comprises the steps that a Web page obtains request data, wherein the request data at least comprise a first appointed API, and the first appointed API is an API of a native layer to be called; the Web page encodes the request data according to a first specified protocol supported by a native layer to obtain a calling request message, and sends the calling request message, wherein the calling request message carries the request data; when receiving the calling request message, the native layer decodes the calling request message according to a first specified protocol to obtain request data; and the native layer reflexes and calls the first appointed API according to the request data to obtain a response result. The invention realizes the interaction between the Web page and the native layer, breaks the barrier between the Web page and the native layer and improves the flexibility.

Description

Interaction method and device based on hybrid application program
Technical Field
The invention relates to the technical field of computers, in particular to an interaction method and device based on a hybrid application program.
Background
Applications typically include native applications, Web applications, and hybrid applications that integrate the functionality of both native applications and Web applications. With the continuous expansion of development platforms and the gradual complication of business functions, hybrid applications are widely applied with the development advantages of cross-platform.
Referring to fig. 1, the hybrid Application includes a native layer, where the native layer may run a native page, and the native layer may also directly call an Application Programming Interface (API) to implement a corresponding function provided by the operating system. The hybrid application program also comprises a Web page, the Web page can not directly call the system layer API and can only call the API of the browser kernel, and the API of the browser kernel can be used for calling the system layer API, so that when the Web page calls the API of the browser kernel, the system layer API can be indirectly called, and corresponding functions provided by an operating system are realized.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems: in the hybrid application program, interaction cannot be carried out between the native layer and the Web page, and limitation exists.
Disclosure of Invention
In order to solve the problems of the related art, embodiments of the present invention provide an interaction method and apparatus based on a hybrid application. The technical scheme is as follows:
in a first aspect, a method for interaction based on a hybrid application, the hybrid application comprising a native layer and a Web page, the method comprising:
acquiring a display instruction, wherein the display instruction is used for indicating to display the Web page;
acquiring target data provided by the native layer by the Web page through message interaction between the Web page and the native layer, wherein the target data is data required by displaying the Web page;
displaying the target data acquired based on the Web page;
and the message sent by one of the Web page and the native layer to the opposite side is encapsulated by the protocol supported by the opposite side.
In a second aspect, there is provided a method of interaction based on a hybrid application, the hybrid application comprising a native layer and a Web page, the method comprising:
the Web page acquires request data, wherein the request data at least comprises a first appointed API, and the first appointed API is an API of the native layer to be called;
the Web page encodes the request data by adopting a first specified protocol supported by the native layer to obtain a calling request message, and sends the calling request message, wherein the calling request message carries the request data;
the native layer acquires the call request message, and decodes the call request message by adopting the first specified protocol to obtain the request data;
and the native layer calls the first appointed API in a reflection mode according to the request data to obtain a response result.
In a third aspect, there is provided an interactive apparatus based on a hybrid application, the hybrid application comprising a native layer and Web pages, the apparatus comprising:
the acquisition module is used for acquiring a display instruction, and the display instruction is used for indicating to display the Web page;
the interaction module is used for acquiring target data provided by the native layer through the Web page through message interaction between the Web page and the native layer, wherein the target data is data required by displaying the Web page;
the display module is used for displaying the target data acquired based on the Web page;
and the message sent to the opposite side by one of the Web page and the native layer is encapsulated by the protocol supported by the opposite side.
In a fourth aspect, there is provided a hybrid application based interaction device, the hybrid application comprising a native layer and Web pages, the device comprising: the interaction module comprises a native processing unit and a Web processing unit, wherein the native processing unit runs the native layer, and the Web processing unit runs the Web page;
the Web processing unit is used for acquiring request data, wherein the request data at least comprises a first specified API, and the first specified API is an API of the native layer to be called;
the Web processing unit is further configured to encode the request data by using a first specified protocol supported by the native layer to obtain a call request message, and send the call request message, where the call request message carries the request data;
the native processing unit is configured to obtain the call request message, and decode the call request message by using the first specified protocol to obtain the request data;
and the native processing unit is also used for reflecting and calling the first appointed API according to the request data to obtain a response result.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
according to the method and the device provided by the embodiment of the invention, the request data is coded according to the first specified protocol supported by the native layer through the Web page to obtain the calling request message, and the calling request message is sent, when the native layer receives the calling request message, the calling request message is decoded according to the first specified protocol to obtain the request data, and the first specified API is reflected and called according to the request data to obtain the response result, so that the Web page can call the API of the native layer, the interaction between the Web page and the native layer is realized, the barrier between the Web page and the native layer is broken, and the flexibility is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a hybrid application provided by a related art according to an embodiment of the present invention;
FIG. 2A is a schematic structural diagram of a hybrid application according to an embodiment of the present invention;
FIG. 2B is a schematic diagram of an interaction method based on a hybrid application according to an embodiment of the present invention;
FIG. 3A is a diagram illustrating a first specified protocol according to an embodiment of the invention;
fig. 3B is a schematic diagram of an intercept call request message according to an embodiment of the present invention;
FIG. 3C is a diagram of a matching string according to an embodiment of the present invention;
fig. 3D is a schematic diagram of a decoding process according to an embodiment of the present invention;
FIG. 3E is a diagram illustrating a reflection call to a first specified API according to an embodiment of the present invention;
FIG. 3F is a diagram illustrating a second specified protocol according to an embodiment of the invention;
fig. 3G is a schematic diagram of an encoding process according to an embodiment of the present invention;
FIG. 3H is a schematic diagram of a Web page provided by an embodiment of the present invention;
fig. 4A is a schematic structural diagram of an interactive apparatus based on a hybrid application according to an embodiment of the present invention;
FIG. 4B is a schematic structural diagram of an interactive apparatus based on a hybrid application according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Before explaining the present invention in detail, first, the concept related to the present invention is explained as follows:
1. mixing application programs:
the application programs include a native application program, a web application program, and a hybrid application program, wherein the native application program is an application program directly running on an operating system, the web application program is an application program running in a browser, and the hybrid application program employs a part of the native application program and a part of the web application program, so that a part of the hybrid application program runs in the operating system and a part runs on the web.
2. The hybrid application program comprises a native layer and a Web page, wherein the native layer can run a native page, and data of the native page is stored in the device without connecting a network. The Web page runs in the browser kernel and needs to be downloaded from the network after the device is connected with the network.
3. Calling the request message: the request message sent by the Web page to the native layer is obtained by encoding the request message by adopting a first specified protocol supported by the native layer and is used for requesting to call an API provided by the native layer.
4. Invoking the response message: the native layer returns a response message to the Web page based on the call request message sent by the Web page, and the response message is obtained by encoding the response message by using a second specified protocol supported by the Web page and can represent the result of calling the API by the native layer.
5. The APIs of the native layer include the following three types:
the first is an API that can directly implement a certain function, and after the API is implemented in the native layer, the native layer can implement the corresponding function when calling the API in a reflection manner. And the Web page can call the API by interacting with the native layer, so that corresponding functions can be realized.
The second type is an API for calling a system layer API, and after the API is implemented in the native layer, when the native layer calls the API in a reflection manner, the native layer may indirectly call the system layer API corresponding to the API, thereby implementing a function corresponding to the system layer API. And the Web page can call the API by interacting with the native layer, so that the system layer API corresponding to the API is indirectly called, and the function corresponding to the system layer API is realized.
And the third is an API for calling the API of the native page, after the native layer realizes the API, when the native layer calls the API in a reflection mode, the API of the native page corresponding to the API can be indirectly called, so that the function corresponding to the API of the native page is realized. And the Web page can call the API by interacting with the native layer, so that the API of the native page corresponding to the API is indirectly called, and the interaction between the Web page and the native page is realized.
6. System layer API: the API in the operating system may implement functions provided by the operating system when called, such as obtaining the type of the operating system, obtaining the screen size, obtaining the network connection condition, obtaining the storage space of the device, and the like.
API of native page: when called, the function related to the native page can be realized, for example, an API for obtaining data download progress in the process of downloading data by the native page.
Fig. 2A is a schematic structural diagram of a hybrid application provided in an embodiment of the present invention, and referring to fig. 2A, the hybrid application includes a Web page, a native layer, a browser kernel, and a system layer. The native layer can directly call the system layer API or the native page API, and the Web page can call the browser kernel API and indirectly call the system layer API.
In the embodiment of the invention, the interaction between the Web page and the native layer can be carried out, so that the Web page can call the API of the native layer, and can also indirectly call the API of the system layer or the API of the native page through the API of the native layer.
Because the API of the browser kernel can only call part of the system layer API, the Web page can also only call part of the system layer API through the browser kernel, and the application range is narrow. In the embodiment, when the Web page calls the system layer API through the native layer, the limitation of the browser kernel can be eliminated, more system layer APIs can be called, and the application range is expanded.
Moreover, when the Web page calls the API of the native page through the native layer, the interaction with the native page can be realized, and further, the function of the native page is realized. Furthermore, because the Web page can realize the function of the native layer, and the Web page can be dynamically updated, and the instantaneity is strong, the Web page can be adopted to replace the native page when the page is developed, not only can no influence be caused on the page function, but also the instantaneity of the page can be improved.
Fig. 2B is a schematic diagram of an interaction method based on a hybrid application program, which is applied to the hybrid application program, where the hybrid application program may be installed on a variety of electronic devices such as a mobile phone, a computer, and a tablet computer, and an interaction subject of the embodiment of the present invention is a native layer and a Web page in the hybrid application program. Referring to fig. 2B, the method includes:
200. the Web page obtains the requested data.
In the embodiment of the invention, the native layer comprises one or more APIs, and different functions can be realized by calling different APIs. When the Web page needs to call a certain API provided by the native layer, request data may be obtained, where the request data includes at least a first specified API, and may further include a parameter to be input to the first specified API, a second specified API, and a specified serial number.
The first designated API is an API which is provided by a native layer and is to be called by a Web page, and can be in a character string format or other formats generally; the second specified API is an API which needs to be called when a calling response message is sent to the Web page after the first specified API is called by the native layer, and can also be in a character string format or other formats; and the sequence number is designated as the sequence number of the call request message to be generated.
In practical applications, the Web page may set configuration information, where the configuration information may include multiple functions that the Web page needs to implement and an API of a native layer that needs to be called when implementing one or more functions, and when the Web page determines to call the first specified API according to the configuration information, step 201 may be performed to obtain the request data.
201. The Web page encodes the request data by adopting a first specified protocol supported by a native layer to obtain a calling request message, and sends the calling request message.
The first specified protocol refers to a protocol supported by the native layer, and may be jsb protocol or other protocols, and based on the first specified protocol, the Web page may interact with the native layer.
In one possible implementation, the first specified protocol includes a plurality of portions arranged in a first specified order and separated by a first specified indicia, which may be "//", "? "," (",") "and the like, and the first designated indicia at different locations may be the same or different, e.g., the first designated indicia between the first portion and the second portion in the plurality of portions is"/", and the first designated indicia between the second portion and the third portion is"? ".
Wherein the plurality of portions include a first specified character string, a request API, parameters to be input to the request API, a response API, and a message sequence number; the first specified character string is used for indicating that the corresponding call request message supports a first specified protocol, such as 'jsb', 'jsb://' and the like, the request API is an API of a native layer to be called of the Web page, the response API is an API of the Web page to be called when the native layer returns a call response message, the message sequence number is used for determining the only corresponding call request message, the message sequence numbers of different call request messages are different, and the message sequence numbers can be set to different numbers or different character strings and the like.
For example, the first designated protocol (jsb protocol) may include the following components, as shown in FIG. 3A:
1. protocol string: a fixed string, used to identify whether the jsb protocol is present, is generally defined as "jsb".
2. And requesting an API: the API of the native layer to be called is generally a character string;
3. and response API: the API provided by the Web page can inform the Web page by calling the second specified API after the native layer processing is finished;
4. message sequence number: uniqueness, typically a number, for identifying the request message;
5. message body: the parameters including the parameters to be input to the request specification API may be in Json (JavaScript Object Notation) format or other formats. If the message body comprises:
parameter 1: XXX is used for the reaction of the raw materials,
parameter 2: XXX is used for the reaction of the raw materials,
parameter 3: XXX (x, y, x, y),
parameter 4: XXX is used for the reaction of the raw materials,
……
based on the specification of the first specified protocol, the Web page may use the first specified API as a request API, use the second specified API as a response API, use the specified serial number as a message serial number, and compose, according to the first specified order and the first specified flag, the first specified character string, the first specified API, the parameter to be input to the first specified API, the second specified API, and the specified serial number into a call request message so as to send the call request message to the native layer.
Based on the first specific protocol shown in fig. 3A, the first specific API is getMobileInfo, the specific sequence number is 1, the second specific API is getMobileInfo _ callback, and the parameters to be input to the first specific API include two parameters "param 1 ═ xxx" and "param 2 ═ yyy", then the call request message obtained by encoding using the first specific protocol may be:
jsb://getMobileInfo/1/getMobileInfo_callbackparam1=xxx&param2=yyy。
202. and the native layer acquires the calling request message, and decodes the calling request message by adopting a first specified protocol to obtain the request data.
The hybrid application program includes a browser kernel, and when any request message is sent by a Web page, the request message is actually sent to the browser kernel, and the browser kernel acquires the request message and responds to the request message.
In the embodiment of the invention, in order to ensure that the native layer can acquire the call request message sent by the Web page, when the Web page sends the call request message, the native layer intercepts the call request message and judges whether the call request message supports the first specified protocol. If the invoke request message supports the first specified protocol, indicating that the invoke request message is sent to the native layer, the native layer may respond to the invoke request message without sending the invoke request message to the browser kernel. And if the call request message does not support the first specified protocol, the call request message is not sent to the native layer, and the native layer does not respond to the call request message and sends the call request message to the browser kernel.
As shown in fig. 3B, the native layer may perform the intercepting of the call request message by rewriting the shouldoverlaveriderurrlloading.
The determining, by the native layer, whether the invocation request message supports the first specified protocol may include: and judging whether the calling request message comprises a first specified character string, and if the calling request message comprises the first specified character string, determining that the calling request message supports a first specified protocol.
As shown in fig. 3C, since the request messages intercepted by shouldoverlaveriderurrlloading are all request messages with character string properties, when determining, a method of character string matching may be adopted to match whether the first 6 characters in the call request message are "jsb://", if so, the call request message of this time is intercepted, and if not, the call request message is sent to the browser kernel.
After intercepting the call request message, the native layer decodes the call request message by adopting a first specified protocol to obtain request data so as to perform response processing according to the request data. Further, based on the first specified protocol provided in step 201, the native layer may decompose the call request message into a first specified string, a first specified API, parameters to be input to the first specified API, a second specified API, and a specified sequence number according to a first specified order and a first specified tag in the call request message.
As shown in fig. 3D, the native layer uses a protocol decoder to convert the jsb protocol call request message into a well-structured data list.
203. And the native layer reflexes and calls the first appointed API according to the request data to obtain a response result.
When the request data comprises the first designated API and the parameters to be input into the first designated API, the native layer reflects and calls the first designated API, and the parameters are input into the first designated API to obtain a response result.
As shown in fig. 3E, the native layer uses the reflection capability to search the API of the native layer for the first specific API, and calls the first specific API to generate a response result during the execution of the first specific API.
The native layer API includes three types: an API that may directly implement a certain function, an API for calling a system layer API, and an API for calling a native page API.
In a first possible implementation manner, when the first specified API is an API that can directly implement a certain function, the native layer reflects to call the first specified API, and a response result can be directly obtained after the first specified API is executed.
In a second possible implementation manner, the first specified API is an API for calling a target system layer API, after the native layer reflects and calls the first specified API, the first specified API starts to execute, the target system layer API is called in the execution process, and at this time, the target system layer API executes to obtain a response result and returns the response result to the native layer.
In a third possible implementation manner, the first specified API is an API for calling a third specified API of the target native page, after the native layer reflects and calls the first specified API, the first specified API starts to execute, the third specified API of the target native page is called in the execution process, and the third specified API executes to obtain a response result and returns the response result to the native layer.
204. And the native layer encodes the response result by adopting a second specified protocol supported by the Web page to obtain a calling response message.
In one possible implementation, the second designated protocol includes a plurality of portions arranged in a second designated order and separated by a second designated indicia, which may be "/", "? "," (",") and the like, and second reference numerals in different positions may be the same or different, e.g., a second reference numeral "taken between a first portion and a second portion in a plurality of portions, and a second reference numeral" taken between a second portion and a third portion "(", a second reference numeral "taken between a third portion and a fourth portion") ".
Wherein the plurality of portions include a second specified string, a request API, a response result, and a message sequence number; wherein the second specified string is used for indicating that the corresponding call response message supports a second specified protocol; the request API is an API of a native layer called by the Web page; the response API is an API of a Web page to be called when the native layer returns a call response message; the response result is obtained when the native layer calls the request API, and the response result may include response data and a response status, where the response data is generated when the native layer calls the request API, and the response status is used to indicate whether the native layer calls the request API successfully; the message serial number is used for determining the only corresponding call request message and is the same as the message serial number in the call request message responded;
for example, the second specified protocol (javascript protocol) may include the following parts as shown in fig. 3F:
1. protocol string: and fixing the character string to identify whether the character string is a javascript protocol, which is generally defined as javascript.
2. And response API: a response API declared in the transmitted calling request message can be notified to the Web page by calling the API;
3. message body: carrying a response result, wherein the response result comprises:
message sequence number: XXX is used for the reaction of the raw materials,
and response results are as follows: XXX is used for the reaction of the raw materials,
and requesting an API: XXX is used for the reaction of the raw materials,
……
correspondingly, when the native layer generates the call response message, the native layer firstly uses the first specified API as a request API, uses the second specified API as a response API, uses the specified sequence number in the call request message as a message sequence number, and combines the second specified character string, the first specified API, the second specified API, the response result and the specified sequence number into a call response message according to the second specified sequence and the second specified mark, and further sends the call response message to the Web page by calling the second specified API.
As shown in fig. 3G, the native layer uses a protocol encoder to encode the response result, and then sends a call request message by calling the second specified API.
205. The native layer sends a call response message to the Web page.
206. And the Web page acquires the call response message, and decodes the call response message by adopting a second specified protocol to obtain a response result.
When the native layer calls the second specified API, a call response message can be sent through the second specified API, so that the Web page obtains the call response message through the second specified API.
When the Web page obtains the call response message through the second specified API, the call response message may be decomposed into a second specified string, a first specified API, a second specified API, a response result, and a specified sequence number according to a second specified order and a second specified flag specified by a second specified protocol.
According to the method provided by the embodiment of the invention, the Web page adopts the first specified protocol supported by the native layer to encode the request data to obtain the calling request message and send the calling request message, when the native layer obtains the calling request message, the first specified protocol is adopted to decode the calling request message to obtain the request data, and the first specified API is reflected and called according to the request data to obtain the response result, so that the Web page can call the API of the native layer, the interaction between the Web page and the native layer is realized, the barrier between the Web page and the native layer is broken, and the flexibility is improved.
Furthermore, an API for calling the system layer API or an API for calling the native page API is implemented in the native layer, so that the API of the system layer or the native page can be indirectly called by the Web page when the API of the native layer is called, the API is not limited to calling the system layer API through the API of the browser kernel, the mode of calling the API is expanded, and the functions which can be realized by the Web are further expanded. And aiming at the system layer API which can not be called by the API of the browser kernel, calling can be carried out through the native layer, and the range of the system layer API which can be called by the Web page is expanded.
Furthermore, the native page can be used off-line, the running speed is high, and the display effect is good. The Web page can be dynamically updated, and the instantaneity is high. However, since the Web page cannot run in the operating system, many APIs cannot be called, resulting in many limitations on the Web page. In this embodiment, because the Web page can implement the function of the native page, and the Web page can be dynamically updated, and the immediacy is strong, the Web page can be used to replace the native page when the page is developed, which not only does not cause any influence on the function, but also can improve the immediacy of the page.
The method for interaction between the Web page and the native layer provided by the embodiment can be applied to a scene that the native layer is required to provide target data when the Web page is displayed. In this scenario, the method may comprise the steps of:
210. a display instruction for instructing display of a Web page is acquired.
The display instruction can be triggered by the confirmation operation of the user on the Web page, or by the operation of opening the Web page in the hybrid application program, or by other methods.
220. And acquiring target data provided by the native layer by the Web page through message interaction between the Web page and the native layer, wherein the target data is data required when the Web page is displayed. And the message sent by one side of the Web page and the native layer to the opposite side is encapsulated by adopting a protocol supported by the opposite side.
When the Web page is displayed, target data is required to be acquired, and the target data can be data required to be displayed when the Web page is displayed or data required to be applied by a background in the process of displaying the Web page. Since the target data is provided by the native layer, the Web page needs to perform message interaction with the native layer when acquiring the target data.
Based on the method provided by the embodiment shown in fig. 2B, in step 200, the first specified API obtained by the Web page is used to obtain the target data, then when the step 201 and the step 203 are executed, the native layer may reflect and call the first specified API to obtain the target data, then when the step 204 is executed, the native layer may encode the target data as a response result to obtain a call response message, and when the step 206 is executed, the Web page decodes the call response message to obtain the target data.
When the first designated API is used for directly acquiring target data, the native layer calls the first designated API in a reflection mode, and then the target data can be directly acquired;
or the first specified API is used for calling a target system layer API, when the target system layer API is used for acquiring target data, the native layer reflexes and calls the first specified API according to the request data, and when the first specified API is executed, the target system layer API is called to obtain the target data;
or the first specified API is used for calling a third specified API of the target native page, when the third specified API is used for acquiring the target data, the native layer reflexes and calls the first specified API according to the request data, and when the first specified API is executed, the third specified API of the target native page is called to obtain the target data.
230. And displaying the target data acquired based on the Web page.
Referring to FIG. 3H, FIG. 3H provides a Web page for recommending applications that includes a plurality of applications recommended to a user. In the process of downloading the application A by the native page, the Web page can acquire the 60% downloading progress of the native page to the application A and the suspended current downloading state by performing message interaction with the native page, and displays the acquired information in the Web page.
Besides the scenario that the native layer provides the target data for the Web page, the method for interaction between the Web page and the native layer provided by the above embodiment may also be applied in various scenarios, for example, a scenario that the Web page controls the native page to perform some operations, and the like.
Referring to fig. 3H, when the native page suspends downloading the application a, the Web page may display a "continue clicking" button according to the current downloading state "suspended", and when a trigger instruction for the "continue clicking" button is obtained, the Web page may further perform message interaction with the native layer, so as to control the native page to continue downloading the application a.
Fig. 4A is a schematic structural diagram of an interactive device based on a hybrid application according to an embodiment of the present invention. Referring to fig. 4A, a hybrid application includes a native layer and a Web page, the apparatus comprising:
an obtaining module 401, configured to obtain a display instruction, where the display instruction is used to instruct to display a Web page;
an interaction module 402, configured to obtain, by a Web page, target data provided by a native layer through message interaction between the Web page and the native layer, where the target data is data required when the Web page is displayed;
a display module 403, configured to display target data acquired based on a Web page;
and the message sent by one side of the Web page and the native layer to the opposite side is encapsulated by adopting a protocol supported by the opposite side.
The interaction module 402 is configured to execute the steps of the Web page interacting with the native layer in the foregoing embodiment.
Fig. 4B is a schematic structural diagram of an interactive device based on a hybrid application according to an embodiment of the present invention. Referring to fig. 4B, the hybrid application includes a native layer and a Web page, and the apparatus includes: the interaction module 402, the interaction module 402 includes a native processing unit 4021 and a Web processing unit 4022, the native processing unit 4021 runs a native layer, and the Web processing unit 4022 runs a Web page;
the native processing unit 4021 is configured to perform the operations performed by the native layer in the above embodiments;
the Web processing unit 4022 is configured to execute the operations performed by the Web pages in the above-described embodiments.
It should be noted that: in the above embodiment, when the interaction device based on the hybrid application performs interaction, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device running the hybrid application is divided into different functional modules to complete all or part of the functions described above. In addition, the interaction apparatus based on the hybrid application provided in the foregoing embodiment and the interaction method based on the hybrid application belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiment and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention. The terminal can run the hybrid application shown in the above embodiments and implement the functions performed by the native layer and the Web page described above. Specifically, the method comprises the following steps:
the terminal 500 may include components such as a RF (Radio Frequency) circuit 110, a memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal structure shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information from a base station and then sends the received downlink information to the one or more processors 180 for processing; in addition, data relating to uplink is transmitted to the base station. In general, the RF circuitry 110 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the RF circuitry 110 may also communicate with networks and other terminals via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), and the like.
The memory 120 may be used to store software programs and modules, such as the software programs and modules corresponding to the terminal shown in the above exemplary embodiment, and the processor 180 executes various functional applications and data processing, such as implementing video-based interaction, by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 500, and the like. Further, the memory 120 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, input unit 130 may include a touch-sensitive surface 131 as well as other input terminals 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding link device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input terminals 132. In particular, other input terminals 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 500, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 140 may include a Display panel 141, and optionally, the Display panel 141 may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
The terminal 500 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that may turn off the display panel 141 and/or a backlight when the terminal 500 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 500, detailed descriptions thereof are omitted.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 500. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of peripheral headphones with the terminal 500.
The terminal 500 may assist the user in e-mail, web browsing, streaming media access, etc. through the transmission module 170, which provides the user with wireless or wired broadband internet access. Although fig. 5 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the terminal 500 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal 500, links various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 500 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the handset. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 180.
The terminal 500 further includes a power supply 190 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 180 via a power management system, such that functions of managing charging, discharging, and power consumption are performed via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal 500 may further include a camera, a bluetooth module, etc., which will not be described herein. Specifically, in the present embodiment, the display unit of the terminal 500 is a touch screen display, and the terminal 500 further includes a memory, and one or more programs, where the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for implementing the operations performed by the native layer and the Web page in the above embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (13)

1. A hybrid application based interaction method, wherein the hybrid application comprises a native layer and a Web page, the method comprising:
acquiring a display instruction, wherein the display instruction is used for indicating to display a Web page;
the Web page acquires request data, wherein the request data comprises a first appointed Application Programming Interface (API), the first appointed API is an API of the native layer to be called, and is used for acquiring target data, and the target data is data required by displaying the Web page;
the Web page encodes the request data by adopting a first specified protocol supported by the native layer to obtain a calling request message, and sends the calling request message to the native layer;
the native layer acquires the calling request message, decodes the calling request message by adopting the first specified protocol to obtain the request data, and reflects and calls the first specified API according to the request data to obtain the target data, and the Web page acquires the target data provided by the native layer;
displaying the target data acquired based on the Web page;
wherein, the message sent by one side of the Web page and the native layer to the opposite side is encapsulated by the protocol supported by the opposite side;
wherein the first designated protocol comprises a plurality of portions arranged in a first designated order, and the portions are separated by first designated indicia;
the plurality of portions include a first specified character string, a request API, parameters to be input to the request API, a response API, and a message sequence number; the first specified character string is used for indicating that a corresponding calling request message supports the first specified protocol, the request API is an API of a native layer to be called of the Web page, the response API is an API of the Web page to be called when the native layer returns a calling response message, and the message serial number is used for determining the only corresponding calling request message;
the request data comprises the first appointed API, parameters to be input to the first appointed API, a second appointed API and an appointed serial number, the second appointed API is an API of the Web page to be called when the native layer returns a call response message to the Web page, and the appointed serial number is a serial number of the call request message to be generated;
the Web page encodes the request data by adopting a first specified protocol supported by the native layer to obtain a call request message, and the call request message comprises:
taking the first specified API as the request API, the second specified API as the response API and the specified sequence number as the message sequence number;
and according to the first designated sequence and the first designated mark, the first designated character string, the first designated API, the parameters to be input into the first designated API, the second designated API and the designated sequence number form the call request message.
2. The method of claim 1, wherein the obtaining, by the Web page, the target data provided by the native layer comprises:
the native layer encodes the target data by adopting a second specified protocol supported by the Web page to obtain a calling response message, and sends the calling response message to the Web page;
and the Web page acquires the call response message, and decodes the call response message by adopting the second specified protocol to obtain the target data.
3. The method of claim 1, wherein the obtaining, by the native layer, the call request message and decoding the call request message using the first specified protocol to obtain the request data comprises:
and the native layer acquires the call request message, and decomposes the call request message into the first specified character string, the first specified API, the parameter to be input to the first specified API, the second specified API and the specified serial number according to the first specified sequence and the first specified mark.
4. The method of claim 1, wherein the native layer obtaining the call request message and decoding the call request message using the first specified protocol to obtain the request data comprises:
the native layer acquires the calling request message and judges whether the calling request message comprises the first specified character string;
and when the calling request message is determined to comprise the first specified character string, decoding the calling request message by adopting the first specified protocol to obtain the request data.
5. The method of claim 1, wherein the reflection invoking the first specified API to obtain the target data according to the request data comprises:
the first appointed API is used for calling a target system layer API, the target system layer API is used for acquiring the target data, the native layer reflects and calls the first appointed API according to the request data, and the target system layer API is called to acquire the target data when the first appointed API is executed; alternatively, the first and second electrodes may be,
the native layer is used for reflecting and calling the first designated API according to the request data, and calling the third designated API of the target native page when the first designated API is executed to obtain the target data.
6. The method of claim 2, wherein the second designated protocol includes a plurality of portions arranged in a second designated order, and wherein the plurality of portions are separated by a second designated label;
the plurality of portions including a second specified string, the request API, the response API, a response result, and the message sequence number; the second specified character string is used for indicating that a corresponding calling response message supports the second specified protocol, and the response result is obtained when the native layer calls the request API;
the native layer encodes the target data by adopting a second specified protocol supported by the Web page to obtain a call response message, and the call response message comprises:
taking the first specified API as the request API, the second specified API as the response API, the target data as the response result, and the specified sequence number in the call request message as the message sequence number;
and according to the second specified sequence and the second specified mark, the second specified character string, the first specified API, the second specified API, the target data and the specified serial number form the call response message.
7. The method of claim 6, wherein the Web page obtaining the call response message and decoding the call response message using the second specified protocol to obtain the target data comprises:
and the Web page acquires the call response message, and decomposes the call response message into the second specified character string, the first specified API, the second specified API, the target data and the specified serial number according to the second specified sequence and the second specified mark.
8. A hybrid application based interaction method, wherein the hybrid application comprises a native layer and a Web page, the method comprising:
the method comprises the steps that a Web page obtains request data, wherein the request data comprise a first appointed API, and the first appointed API is an API of a native layer to be called;
the Web page encodes the request data by adopting a first specified protocol supported by the native layer to obtain a calling request message, and sends the calling request message, wherein the calling request message carries the request data;
the native layer acquires the call request message, and decodes the call request message by adopting the first specified protocol to obtain the request data;
the native layer calls the first appointed API in a reflection mode according to the request data to obtain a response result;
wherein the first designated protocol comprises a plurality of portions arranged in a first designated order, and the portions are separated by first designated indicia;
the plurality of portions include a first specified string, a request API, parameters to be input to the request API, a response API, and a message sequence number; the first specified character string is used for indicating that a corresponding calling request message supports the first specified protocol, the request API is an API of a native layer to be called of the Web page, the response API is an API of the Web page to be called when the native layer returns a calling response message, and the message serial number is used for determining the only corresponding calling request message;
the request data comprises the first appointed API, parameters to be input to the first appointed API, a second appointed API and an appointed serial number, the second appointed API is an API of the Web page to be called when the native layer returns a call response message to the Web page, and the appointed serial number is a serial number of the call request message to be generated;
the Web page encodes the request data by adopting a first specified protocol supported by the native layer to obtain a call request message, and the call request message comprises:
taking the first specified API as the request API, the second specified API as the response API and the specified sequence number as the message sequence number;
and according to the first designated sequence and the first designated mark, the first designated character string, the first designated API, the parameters to be input into the first designated API, the second designated API and the designated sequence number form the call request message.
9. The method of claim 8, wherein the native layer reflexes the first specified API to obtain a response based on the request data, comprising:
the native layer is used for reflecting and calling the first appointed API according to the request data, and calling the target system layer API when executing the first appointed API to obtain the response result; alternatively, the first and second electrodes may be,
the native layer reflects and calls the first designated API according to the request data, and calls the third designated API of the target native page when executing the first designated API to obtain the response result.
10. The method of claim 8, wherein the native layer, after reflexively calling the first specified API according to the request data and obtaining a response result, further comprises:
the native layer encodes the response result by adopting a second specified protocol supported by the Web page to obtain a calling response message;
the native layer sends the call response message to the Web page;
and the Web page acquires the call response message, and decodes the call response message by adopting the second specified protocol to obtain the response result.
11. The method of claim 10, wherein the second designated protocol includes a plurality of portions arranged in a second designated order, and wherein the plurality of portions are separated by a second designated label;
the plurality of portions including a second specified string, the request API, the response API, a response result, and the message sequence number; the second specified character string is used for indicating that a corresponding calling response message supports the second specified protocol, and the response result is obtained when the native layer calls the request API;
the native layer encodes the response result by adopting a second specified protocol supported by the Web page to obtain a call response message, and the call response message comprises:
taking the first specified API as the request API, the second specified API as the response API, and the specified sequence number in the call request message as the message sequence number;
and according to the second specified sequence and the second specified mark, the second specified character string, the first specified API, the second specified API, the response result and the specified serial number form the call response message.
12. A hybrid application based interaction device, wherein the hybrid application comprises a native layer and a Web page, the device comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a display instruction which is used for indicating to display a Web page;
the interaction module is used for acquiring request data through the Web page, wherein the request data comprise a first specified API, the first specified API is an API of the native layer to be called, the first specified API is used for acquiring target data, and the target data is data required by displaying the Web page;
the interaction module is further configured to encode the request data by using a first specified protocol supported by the native layer through the Web page to obtain a call request message, and send the call request message to the native layer;
the interaction module is further configured to obtain the call request message through the native layer, decode the call request message by using the first specified protocol to obtain the request data, reflect and call the first specified API according to the request data to obtain the target data, and obtain the target data provided by the native layer through the Web page;
the display module is used for displaying the target data acquired based on the Web page;
wherein, the message sent by one side of the Web page and the native layer to the opposite side is encapsulated by the protocol supported by the opposite side;
wherein the first designated protocol comprises a plurality of portions arranged in a first designated order, and the portions are separated by first designated indicia;
the plurality of portions include a first specified string, a request API, parameters to be input to the request API, a response API, and a message sequence number; the first specified character string is used for indicating that a corresponding calling request message supports the first specified protocol, the request API is an API of a native layer to be called of the Web page, the response API is an API of the Web page to be called when the native layer returns a calling response message, and the message serial number is used for determining the only corresponding calling request message;
the request data comprises the first appointed API, parameters to be input to the first appointed API, a second appointed API and an appointed serial number, the second appointed API is an API of the Web page to be called when the native layer returns a call response message to the Web page, and the appointed serial number is a serial number of the call request message to be generated;
the interaction module is further configured to:
taking the first specified API as the request API, the second specified API as the response API and the specified sequence number as the message sequence number;
and according to the first designated sequence and the first designated mark, the first designated character string, the first designated API, the parameters to be input into the first designated API, the second designated API and the designated sequence number form the call request message.
13. A hybrid application based interaction device, wherein the hybrid application comprises a native layer and a Web page, the device comprising: the interaction module comprises a native processing unit and a Web processing unit, wherein the native processing unit runs the native layer, and the Web processing unit runs a Web page;
the Web processing unit is used for acquiring request data, wherein the request data comprises a first specified API, and the first specified API is an API of the native layer to be called;
the Web processing unit is further configured to encode the request data by using a first specified protocol supported by the native layer to obtain a call request message, and send the call request message, where the call request message carries the request data;
the native processing unit is configured to obtain the call request message, and decode the call request message by using the first specified protocol to obtain the request data;
the native processing unit is further used for reflecting and calling the first appointed API according to the request data to obtain a response result;
wherein the first designated protocol comprises a plurality of portions arranged in a first designated order, and the portions are separated by first designated indicia;
the plurality of portions include a first specified string, a request API, parameters to be input to the request API, a response API, and a message sequence number; the first specified character string is used for indicating that a corresponding calling request message supports the first specified protocol, the request API is an API of a native layer to be called of the Web page, the response API is an API of the Web page to be called when the native layer returns a calling response message, and the message serial number is used for determining the only corresponding calling request message;
the request data comprises the first appointed API, parameters to be input to the first appointed API, a second appointed API and an appointed serial number, the second appointed API is an API of the Web page to be called when the native layer returns a call response message to the Web page, and the appointed serial number is a serial number of the call request message to be generated;
the Web processing unit is further configured to:
taking the first specified API as the request API, the second specified API as the response API and the specified sequence number as the message sequence number;
and according to the first designated sequence and the first designated mark, the first designated character string, the first designated API, the parameters to be input into the first designated API, the second designated API and the designated sequence number form the call request message.
CN201710198199.7A 2017-03-29 2017-03-29 Interaction method and device based on hybrid application program Active CN107102904B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710198199.7A CN107102904B (en) 2017-03-29 2017-03-29 Interaction method and device based on hybrid application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710198199.7A CN107102904B (en) 2017-03-29 2017-03-29 Interaction method and device based on hybrid application program

Publications (2)

Publication Number Publication Date
CN107102904A CN107102904A (en) 2017-08-29
CN107102904B true CN107102904B (en) 2022-05-17

Family

ID=59676122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710198199.7A Active CN107102904B (en) 2017-03-29 2017-03-29 Interaction method and device based on hybrid application program

Country Status (1)

Country Link
CN (1) CN107102904B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107678805A (en) * 2017-09-08 2018-02-09 阿里巴巴集团控股有限公司 The call method and device of a kind of application programming interfaces
CN110020323B (en) * 2018-07-27 2023-04-07 平安科技(深圳)有限公司 Page switching method and system for hybrid application, computer equipment and storage medium
CN109684156B (en) * 2018-08-27 2022-05-17 平安科技(深圳)有限公司 Monitoring method, device, terminal and storage medium based on mixed mode application
CN109471739A (en) * 2018-10-24 2019-03-15 百度在线网络技术(北京)有限公司 Data transmission method and device between local application and webpage kernel
CN109327530B (en) * 2018-10-31 2023-05-23 网易(杭州)网络有限公司 Information processing method, device, electronic equipment and storage medium
CN109471614A (en) * 2018-11-01 2019-03-15 上海找钢网信息科技股份有限公司 The method and device of application program mixed developing
CN111768666B (en) * 2019-04-01 2022-04-08 小船出海教育科技(北京)有限公司 Method and terminal for interacting online classroom
CN110795154B (en) * 2019-10-10 2024-02-06 深圳市证通电子股份有限公司 Cross-platform device driving method, device and computer readable storage medium
CN113448654B (en) * 2020-12-07 2024-03-01 北京新氧科技有限公司 Interaction method and device for web application program and native application program
CN112818265B (en) * 2021-02-22 2023-11-10 北京拉勾网络技术有限公司 Interaction method and mobile terminal

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657118A (en) * 2013-11-18 2015-05-27 ***通信集团公司 Native + Web mixed mobile application achieving method and device
CN104750487A (en) * 2015-03-25 2015-07-01 广州市悦智计算机有限公司 Development method and starting method for mobile terminal APP
CN104808971A (en) * 2014-01-24 2015-07-29 北京三星通信技术研究有限公司 Network application program manager, method, device and mobile terminal
CN105450731A (en) * 2015-11-05 2016-03-30 珠海多玩信息技术有限公司 Method and apparatus for realizing communication between web layer and native layer
CN106020845A (en) * 2016-05-31 2016-10-12 广东能龙教育股份有限公司 Client hybrid rapid development method
CN106095598A (en) * 2016-05-31 2016-11-09 腾讯科技(深圳)有限公司 A kind of data processing method and client
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104657118A (en) * 2013-11-18 2015-05-27 ***通信集团公司 Native + Web mixed mobile application achieving method and device
CN104808971A (en) * 2014-01-24 2015-07-29 北京三星通信技术研究有限公司 Network application program manager, method, device and mobile terminal
CN104750487A (en) * 2015-03-25 2015-07-01 广州市悦智计算机有限公司 Development method and starting method for mobile terminal APP
CN105450731A (en) * 2015-11-05 2016-03-30 珠海多玩信息技术有限公司 Method and apparatus for realizing communication between web layer and native layer
CN106020845A (en) * 2016-05-31 2016-10-12 广东能龙教育股份有限公司 Client hybrid rapid development method
CN106095598A (en) * 2016-05-31 2016-11-09 腾讯科技(深圳)有限公司 A kind of data processing method and client
CN106445583A (en) * 2016-08-31 2017-02-22 广州品唯软件有限公司 Page display method, equipment and system

Also Published As

Publication number Publication date
CN107102904A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN107102904B (en) Interaction method and device based on hybrid application program
CN110752980B (en) Message sending method and electronic equipment
CN107040609B (en) Network request processing method and device
CN109857403B (en) Page updating method and device, page processing method and device
CN108039963B (en) Container configuration method and device and storage medium
WO2018077041A1 (en) Method and apparatus for running application
CN106371964B (en) Method and device for prompting message
US9354919B2 (en) Method and device for loading android virtual machine application
WO2018006841A1 (en) Qr code information transmission method, device and apparatus
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN109088844B (en) Information interception method, terminal, server and system
WO2013182063A1 (en) Webapp startup method and device
CN106713608B (en) Application function state modification method and device and terminal
WO2015010466A1 (en) Information display method and apparatus, and mobile terminal
CN113613064B (en) Video processing method, device, storage medium and terminal
WO2014206138A1 (en) Webpage data update method, apparatus and terminal device
JP5997848B2 (en) Mobile terminal resource processing method, apparatus, client-side computer, server, mobile terminal, program, and recording medium
CN107479799B (en) Method and device for displaying window
CN108323236B (en) Interaction method and terminal
CN106095423B (en) Method, terminal and server for providing browsing service
CN106302101B (en) Message reminding method, terminal and server
CN106919458B (en) Method and device for Hook target kernel function
CN107463395B (en) Component calling method and device
CN106330875B (en) Message display method and device
CN106201220B (en) Display content acquisition method and device

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
GR01 Patent grant
GR01 Patent grant