segmentio / analytics-kotlin

The hassle-free way to add Segment analytics to your Kotlin app (Android/JVM).
MIT License
46 stars 27 forks source link

Fallback to the defaultSettings if cdn cannot be reached #231

Closed niallzato closed 1 month ago

niallzato commented 5 months ago

Fallback to the default Settings if the CDN cannot be reached. If the app is started with no Internet connection, this will result in an empty settings object:

data class Settings(
    var integrations: JsonObject = emptyJsonObject,
    var plan: JsonObject = emptyJsonObject,
    var edgeFunction: JsonObject = emptyJsonObject,
    var middlewareSettings: JsonObject = emptyJsonObject,
    var metrics: JsonObject = emptyJsonObject,
    var consentSettings: JsonObject = emptyJsonObject
) {