Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and apparatus for communication between JS module and Java module

A communication method and object technology, applied in the computer field, can solve the problems of increasing the terminal memory occupation, reducing the application running performance, reducing the communication efficiency of JavaScript and Java, etc., and achieving the effects of reducing the memory occupation, improving the communication efficiency, and improving the running performance.

Active Publication Date: 2018-07-31
TENCENT TECH (SHENZHEN) CO LTD
View PDF7 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the main function of WebView is to display pages. In some scenarios that do not need to open pages, if the communication between JavaScript and Java is implemented through WebView, the memory usage of the terminal will be increased.
At the same time, when the page is relatively busy, using this method will reduce the communication efficiency between JavaScript and Java, thereby reducing the running performance of the application

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and apparatus for communication between JS module and Java module
  • Method and apparatus for communication between JS module and Java module
  • Method and apparatus for communication between JS module and Java module

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0020] The embodiment of the invention discloses a communication method and device between a JS module and a Java module, which can reduce the occupation of terminal memory, improve the communication efficiency between JavaScript and Java, and thereby improve the operating performance of applications. Each will be described in detail below.

[0021] see figure 1 , figure 1 It is a schematic flowchart of a communication method between a JS module and a Java module...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

Embodiments of the invention disclose a method and an apparatus for communication between a JS module and a Java module. The method comprises the steps that when an application needs to call a Java interface to realize a function through the JS module, a communication apparatus between the JS module and the Java module can search for a target Java object in the Java module through Java objects pre-injected in a JavaScript engine of the JS module; when the target Java object is searched out, a target method corresponding to the target Java object is determined to exist in the Java module; and the target method is called to execute operation corresponding to the target method for the target Java object through the JavaScript engine. Through the communication method and apparatus, the JS module and the Java module can communicate without a network view, so that the memory occupation of a terminal can be reduced, the communication efficiency is improved, and the running performance of theapplication is improved.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a communication method and device between a JS module and a Java module. Background technique [0002] With the continuous development of terminal technology, more and more applications can be installed on terminals such as smartphones and tablet computers to enrich people's lives, and have now become indispensable electronic devices in people's work and life. On the current Android device, the communication between JavaScript and Java in the application needs to be realized through the web view WebView. However, the main function of WebView is to display pages. In some scenarios that do not need to open pages, if the communication between JavaScript and Java is implemented through WebView, the memory usage of the terminal will be increased. At the same time, when the page is relatively busy, using this method will reduce the communication efficiency between JavaScript and Jav...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54
CPCG06F9/543
Inventor 王勇
Owner TENCENT TECH (SHENZHEN) CO LTD
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More