Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for data interaction between JavaScript and native APP

A data interaction and API function technology, applied in the field of communication, can solve the problems of difficult maintenance, high cost, long cycle, etc., to shorten the development cycle, facilitate cross-platform use, and save development costs.

Pending Publication Date: 2019-07-05
SHANDONG INSPUR GENESOFT INFORMATION TECH CO LTD
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In traditional mobile device APPs, most of them need to be adapted to each system. This development method is costly and takes a long time. Android, iOS, and Windows Phone all need to be developed separately; in the code, it is frequently judged that the phone model cannot call the API , code redundancy is difficult to maintain

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 for data interaction between JavaScript and native APP
  • Method for data interaction between JavaScript and native APP
  • Method for data interaction between JavaScript and native APP

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] In order to make the technical solutions of the present invention, the technical problems solved and the technical effects more clearly understood, the technical solutions of the present invention will be described clearly and completely below in conjunction with specific embodiments. Obviously, the described embodiments are only a part of the present invention. examples, but not all examples. Based on the embodiments of the present invention, all embodiments obtained by those skilled in the art without creative work are within the protection scope of the present invention.

[0031] This embodiment provides a data interaction method between JavaScript and a native APP, and uses the Webview component of the native APP under the Android system and the UIWebView component under the IOS system to load the Html web page of the native APP, so as to realize the exchange between the JavaScript and the native APP. Data interaction to use native functionality.

[0032] Realize d...

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

The invention discloses a method for data interaction between JavaScript and a native APP, and relates to the communication technology. According to the method, a webview component of the native APP introduced into an Android system and a UIWebview component of an IOS system are used for loading an Html webpage to the native APP, so that the data interaction between the JavaScript and the native APP is realized, and the native function is used. The data interaction between the JavaScript and the native APP is achieved, and the specific operation comprises the steps that an API function provided by a JavaScript API packaging layer is called on a service layer; the JavaScript API packaging layer interacts with the native API packaging layer through a unified native interaction interface provided by the interaction bridging layer; the native API packaging layer is used for packaging an interface function of the mobile terminal hardware by using native codes; and the data of the native function is requested using the encapsulated interface function. The data interaction method is used in a cross-platform mode, the development cost is saved, and meanwhile the development period is shortened.

Description

technical field [0001] The invention relates to the technical field of communication, in particular to a data interaction method between JavaScript and native APP. Background technique [0002] When developing mobile applications, webview controls (browser controls) are used to load web pages for interaction, and javascript calls native code (native function) or native code calls javascript. The usual practice is to use the native API to operate. [0003] In traditional mobile device APPs, most of them need to be adapted to each system. This development method has high cost and long cycle. Android, iOS and Windows Phone all need to be developed separately; in the code, it is frequently judged that the mobile phone model cannot be called through the API. , code redundancy is difficult to maintain. SUMMARY OF THE INVENTION [0004] The present invention provides a data interaction method between JavaScript and native APP in view of the needs and deficiencies of current tec...

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/445
CPCG06F9/44521
Inventor 宋伟伟张兴康张冬霞邵辉
Owner SHANDONG INSPUR GENESOFT INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products