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

An implementation method for establishing connection between cordova and weex

An implementation method and connection establishment technology, applied in the direction of software design, etc., can solve the problems that cordova pages and weex pages cannot directly jump and communicate, and achieve the effects of rich plug-ins, mature community ecology, and increased play space

Active Publication Date: 2019-05-07
ZHEJIANG SUPCON INFORMATION TECH CO LTD
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The purpose of the present invention is to provide an implementation method for establishing a connection between cordova and weex in order to overcome the shortcomings of the prior art that the cordova page and the weex page cannot directly jump and communicate

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
  • An implementation method for establishing connection between cordova and weex
  • An implementation method for establishing connection between cordova and weex
  • An implementation method for establishing connection between cordova and weex

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0081] Example 1: Run jsStringl code in weex

[0082] In Android:

[0083] Map params=new HashMap ();

[0084] params.put("cordovaCode", jsStringl);

[0085] mWXSDKInstance.fireGlobalEventCallback("geolocation", params);

[0086] In IOS system:

[0087] [mWXSDKInstance fireGlobalEvent: @″geolocation″params:@{@″cordovaCode″:@jsString1}];

[0088] jsString1 is a piece of executable JavaScript code that carries information that needs to be processed. Since the received information is passively received, in order to actively transmit the information received by the weex controller to the weex page, the present invention adopts the method of transmitting the information carried by the JavaScript code to achieve information transmission. . The JavaScript code can perform a specific function, such as refreshing page information, storing information, and so on.

[0089] This information is the information sent by the cordova interface class sendWXJS method in step 4. The Cordova page sends in...

example 2

[0124] Example 2: Run the jsString4 code in cordova.

[0125] In Android system:

[0126] loadUrl("javascript:try{"+jsString4+"});

[0127] In IOS system:

[0128] [*.webViewEngine evaluateJavaScript:jsString4completionHandler:*];

[0129] The idea of ​​receiving information is the same as the weex controller. jsString4 is a piece of executable JavaScript code. Since the received information is passively received, in order to actively transmit the information received by the cordova controller to the cordova page, the present invention implements information transmission by transmitting the information carried by the JavaScript code. The JavaScript code can perform a specific function, such as refreshing page information, storing information, and so on.

[0130] This information is sent by the sendCorJS method of the weex interface class in step 5. The weex page sends information through the sendCorJS method. After the cordova controller receives the information, it parses it and pass...

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 an implementation method for establishing connection between cordova and weex. The invention provides a page management method aiming at the difference of page loading modes between cordova and weex. The method comprises the following steps: managing pages of cordova and weex; a service is provided for establishing a connection between the cordova and the wex; Jumping and information transmission between the cordova page and the weex page can be completed by directly calling the plug-in interface by a web developer; According to the method, a method barrier between cordova and weex is broken through, and the development space of a developer is increased.

Description

Technical field [0001] The invention relates to the technical field of establishing a connection between cordova and weex in the development of mobile applications, and in particular to a realization method for establishing a connection between cordova and weex. Background technique [0002] With the development of Internet technology and the widespread use of smart phones, the status of APP mobile applications has become more and more prominent, and its application scope has become more and more extensive. In order to cope with the increasingly fierce market competition, how to quickly develop high-quality apps has become a research topic for all developers. [0003] Cordova is an open source mobile development framework that allows standard web technologies to be used for platform development. Support loading a set of web pages written by HTML5; provide a wealth of open source plug-ins, support custom plug-ins, plug-in interfaces are written by JavaScript, web developers can cal...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/20
Inventor 杨奇泽李琳琳殷豪翔赵鸿明胡宏栋陈行健柴泽照
Owner ZHEJIANG SUPCON 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