Description: Shared mode allows multiple xwalk app to share one xwalk core library. Each xwalk app is bundled with a thin reflection layer instead of the whole runtime library, whereas there will be a library apk to be installed on device for xwalk apps to use. This produces a significant smaller apk size for xwalk app. Another advantage is that developer can update their app and runtime separately. Previously, shared mode is in experimental stage which only enables make_apk usage. This intent is to enabled shared mode for xwalk core library and publish it to developer together with Embedding API.
Affected component: Embedding API, build infrastructure Target Release: Crosswalk-12 Implementation details: 1. Version Check This is for supporting version check between xwalk app and xwalk core to gurantee the compatibility. Alongside the version name like 9.38.208 which already in used, each release of xwalk core will also have an incremental version code to show the revisoin of exposed API, as well as a minimal backword-compatible version. For xwalk apps, the xwalk core used at runtime need not be the one present at built time, but the one is compatible. To implement this, the xwalk app will be hard coded with a API version which compliance with its package at built time. On the other hand, the xwalk core will provide the following interface for external use : * Get the current API version and minimal version which the xwalk core can support * Confirm whether the API version passed from the xwalk app is supported The xwalk app will check the compatibility with the xwalk runtime library on device at startup time. If the version mismatched or the library even not exist, a dialog pops up to prompt users to get the suitable library apk via online store or other ways. 2. Use Private Keystore Currently a hard coded keystore file and password is used to sign the apk. If plan to release the xwalk core apk on Google Play, we need to use official signature what is not allowed to be published on public repository. It's still on discussion that how to make it both privatly and support the automatical build system. 3. Toolchain Support make_apk, the official HTML5 packaging tools, is already supporting shared mode by enableing option --mode=shared. We plan to integrate shared mode into Intel XDK and Cordova once step 1 and 2 is ready. And we also need corresponding support from development tool's side in the meanwhile. 4. Expose Embedding API Embedding API is technically supporting shared mode now but still lack of some features like apk download prompt. We are going to implement a series of targed class to wrapper the embedding API for shared mode. Through this, developers can easily use the exposed interface and do not need to concern about the details of underlying library. Thus, to handle resource loading across package, the Application and Activity containing Shared XWalkView needs some customization, we will provide the base Activity and Application for embedder to easily inherit in Embedding API as well. Thanks, Lin
_______________________________________________ Crosswalk-dev mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
