Configuration

The Configuration function is an easy way to creating a UpdaterConfiguration, by providing simple solutions and an easy-to-understand format. If you want to use a more complex function, you can use the ConfigurationBuilder.

Example Usage:

val configuration = Configuration {
periodic = 1.hours
readTimeout {
timeout = 120
unit = TimeUnit.SECONDS
}
writeTimeout {
timeout = 120
unit = TimeUnit.SECONDS
}
newUpdateNotification = "New version {} is now available and can be downloaded from {}"
}

Return

the UpdaterConfiguration

Parameters

ConfigurationBuilder.json

The JSON deserializer used by the HttpClient

ConfigurationBuilder.periodic

Defines the time between periodic version checks

ConfigurationBuilder.readTimeout

The HttpClient (with OkHttpEngine) read timout

ConfigurationBuilder.writeTimeout

The HttpClient (with OkHttpEngine) write timout

ConfigurationBuilder.notification

The notification settings

See also