setOfflineConfig

fun setOfflineConfig(context: Context, offlineConfig: OfflineConfig)

Sets a OfflineConfig which can be used to configure the behaviour of the offline content feature. Default value is a default OfflineConfig. If the DeviceStateRequirements in the OfflineConfig change, the download service will be notified to reload them using the provided context.

Android 12+ (API 31+) Note: This API starts a foreground service, which API 31+ apps may only start while the app is in the foreground. See foreground service background start restrictions.

Note: If a custom download service implementation is used, OfflineContentManager.setDownloadServiceClass must be used first!