How to configure the SDK media cache control (Android)

Prerequisites

A working Android app with the SDK integrated.

Step-by-step

You want to configure the SDK cache for images. The cache has an in-memory level and file system level located under /storage/self/Android/data/{app.bundle.id}/cache/ibm-mce-android-sdk/.

1. Configure the cache by adding the following code to the MceConfig.json file:

"inMemoryImageCacheCapacityInMB" - The size of the memory cache in megabytes. The default is 20MB.
"fileImageCacheCapacityInMB" - The size of the file system cache in megabytes. The default is 100MB.

"useInMemoryImageCache" - Set to true to use the memory cache or false to disable it.
"useFileImageCache" - Set to true to use the file system cache or false to disable it.