All Products
Search
Document Center

Mobile Platform as a Service:Observe the behavior of offline packages from the HTTP level (1): download the offline packge

Last Updated:Aug 26, 2022

mPaaS client framework encapsulates the download behavior of offline packages in depth. Therefore, developers do not directly control the download behavior of offline packages. The download process of offline packages is as follows:

  1. The client sends a request to the MDS server (cn-hangzhou-component-gw.cloud.alipay.com), which provides the ID of the target H5 app to be downloaded.

  2. If the offline package exists, the server returns related information.

  3. The client takes the initiative to download the amr file of the offline package based on the Package URL and Download configuration parameters in the returned information.

Procedures

  1. Request offline package information.

    Request offline package update information

  2. Return offline package information.

    Return offline package information

  3. The client downloads the corresponding amr file according to the Package URL of the offline package obtained in the previous step.

    Download the amr file

Note

Example of offline package download log: 1-offline-package-download-example.chls.zip