MicroStrategy ONE

Prepackage Bundles in Library Android

Follow the procedure below to prepackage JavaScript bundles in the Library Android app. Prepackaging bundles improves the app’s performance since it prevents file downloads in runtime.

This procedure was written using Python 3.12.3.

  1. Install Python 3.

  2. Install the Requests library using the following command:

    Copy
    pip3 install requests
  3. Download and unzip the bundle tools and switch to the root directory of the download files in the terminal using the following command.

    Copy
    python3  ./bundleWeb/fetch_from_server.py -l '{prefix};{username}:{password}:{authmode}@{serverurl}': 

    Arguments:

    • serverurl The URL of the Library.

    • username The user login to connect to Library.

    • password The user password to connect to Library.

    • authmode Use 1 for Standard and 16 for LDAP authentication.

    Example:

    Copy
    python3 ./bundleWeb/fetch_from_server.py -l 'Test;testUser:testPassword:16@https://xxx.customer.cloud.microstrategy.com/MicroStrategyLibrary' 
  4. Once the download is complete, a message indicates the output folder. A message similar to "…to output folder: XXXX" appears, where XXXX is the location of the final bundle.

  5. Copy all files from the bundle folder to the SDK folder in the following path. Make sure to remove any existing old files before doing so.

    Copy
    {rootSDKFolder}/app/src/main/assets/static/bundles/ 

    The final path should look like:

    Copy
    {rootSDKFolder}/app/src/main/assets/static/bundles/190856d6e89c5d1bcd2d1089780b4f6458a5995276cfd565d21c2e26b1911039.e05fa9a06c0b25851514d0b6aee558281fc00e711fe3929ef657135f2d40c540 

  6. Ensure that you have also copied integrated.cache.list.json to the following directory:

    Copy
    {rootSDKFolder}/app/src/main/assets/static/bundles/
  7. After copying the files, rebuild the Library Android APK package.