HERE Android SDK Developer's Guide

Size Management

This section provides tips on reducing the size of the HERE SDK so your application uses less storage on consumer devices.

Remove Unused Font Files

By default, the HERE Android SDK includes a number of font files to support different languages. These files may range from a few hundred kilobytes to a few megabytes in size. You can exclude unused font files to reduce the size of your HERE SDK-enabled application.

To exclude HERE SDK font files, perform these steps:
  1. From the Android Studio "Project" Tool Window (Alt+1 on Windows or Linux, Command+1 on Mac), select the "Project Files" view and navigate to the app folder to reveal its contents.
  2. Double-click on the build.gradle file to open it for editing.
  3. In the android { ... } section, add packagingOptions so that it looks like the following:
    android {
      ...
      packagingOptions {
        exclude '/lib/armeabi-v7a/libNanumGothicFontPkg.so'
        exclude '/lib/armeabi-v7a/libLohitIndicFontPkg.so'
        exclude '/lib/armeabi-v7a/libChineseFontPkg.so'
      }
      ...
    }
    Note:
    • The "Chinese" font package supports Chinese characters.
    • "Nanum Gothic" supports Korean characters.
    • "Lohit Indic" supports Indic scripts.

After completing these steps, your application consumes less space when it is installed on a device. The maximum amount that you can save with these steps is approximately 5MB.