Currently, most mobile Apps are developed by using the hybrid development model which involves two major technologies: Native, Web H5
Native technology mainly refers to iOS (Objective C), Android (Java), native development is less efficient, the need to repackage the entire App after development is complete, the release depends on the user's updates, higher performance higher feature coverage.
A Webview control will be embedded in DJI Pilot 2 to provide developers with a web page environment and communicate with DJI Pilot 2 through the JSBridge.
Note: For the M300 RTK remote control, the firmware of the remote control needs to be upgraded to the latest version, otherwise the Webview page will be blank.
- JS calls Java
- Java calls js
The data passing between Java and js is between two different runtime environments, which is not very fast in terms of efficiency, and will affect the performance if a large amount of data is passed.
For js to run, it needs to run with the help of a WebView instance, and running a WebView takes up a certain amount of memory. There is no intention to have the js code of the open platform running in the background all the time in the early stage. Only when the platform page is carried out will run the third-party H5 page.