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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com