---
title: "Chat Settings"
canonical_url: "https://apidocs.sportradar.com/resources/virtual-stadium/docs/sdk/chatSettings"
markdown_url: "https://apidocs.sportradar.com/resources/virtual-stadium/docs/sdk/chatSettings.md"
last_updated: "2026-04-16T10:19:11Z"
---

# Chat Settings

This guide covers chat configuration and odds formatting in the Virtual Stadium Data SDK.

***

## Settings Provider

The `SettingsProvider` delivers default settings from the moderation backend. These settings control chat behavior and available features.

## Available Settings

**`messageLength`**

Maximum number of characters allowed in a single message.

**`supportedReactions`**

Available reaction types for messages:

- **Unicode** - Emoji reactions shown as text
- **Custom** - Image reactions loaded from URL

**`allowedCharRanges`**

Character ranges permitted in messages for content filtering and sanitization.

**`flashBetTimers`**

Configuration for flash betting functionality with timing settings.

**`clientSettings`**

Client-specific configuration options.

**`betStopTimeoutSeconds`**

Timeout duration for bet-related operations.

**ChatSettings Data Structure:**

```kotlin
data class ChatSettings(
    val messageLength: Long,
    val supportedReactions: List<ReactionType>,
    val allowedCharRanges: List<AllowedChatRange>,
    val flashBetTimers: FlashBetTimers?,
    val clientSettings: ClientSettings?,
    val betStopTimeoutSeconds: Int,
)
```

***

## Settings Implementation

Access chat settings through the `SettingsProvider` by injecting it via dependency injection.

The `settings` flow exposes the current configuration and updates automatically when settings change.

Use settings in your UI to enforce message length limits, display available reactions, and configure betting features.

**Android**

```kotlin
import ag.sportradar.virtualstadium.datasdk.services.SettingsProvider
import androidx.lifecycle.ViewModel
import org.koin.core.component.KoinComponent
import org.koin.core.component.get

class SettingsViewModel :
    ViewModel(),
    KoinComponent {

    val settingsProvider: SettingsProvider
        get() = get()

    val settingsState = settingsProvider.settings
}
```

**Compose UI:**

```kotlin
@Composable
fun Chat(settingsViewModel: SettingsViewModel = viewModel()) {
    val settingsState by settingsViewModel.settingsState
        .collectAsStateWithLifecycle()
    
    // Use settings in UI
}
```

**iOS**

```swift
import VirtualStadiumDataSDK

class ExampleSettingsViewModel: ObservableObject {

    private var settingsProvider = KoinHelper().getSettingsProvider()

    @Published var chatSettings: ChatSettings?

    init() {
        subscribeToSettingsProvider()
    }

    private func subscribeToSettingsProvider() {
        settingsProvider.settings.subscribe { [weak self] chatSettings in
            self?.chatSettings = chatSettings
        }
    }
}
```

***

## Odds Format Provider

The `OddsFormatProvider` handles different odds formatting types for betslips.

## Supported Odds Formats

**`OddsType.US`**

American odds format (e.g., +150, -200). Fully supported locally.

**`OddsType.EU`**

European/Decimal odds format (e.g., 2.50, 1.50). Fully supported locally.

**`OddsType.UK`**

UK/Fractional odds format (e.g., 3/2, 1/2). Requires backend request for formatting.

> **Warning**
>
> For `OddsType.UK`, request data as soon as possible or before requesting messages to ensure correct formatting. The SDK handles everything else automatically.

***

## Odds Format Implementation

Access the `OddsFormatProvider` via dependency injection alongside the `SettingsProvider`.

Call `getUKOddsFormats()` when switching to UK odds format to fetch the necessary conversion data from the backend.

US and EU formats work immediately without additional requests.

**Android**

```kotlin
import ag.sportradar.virtualstadium.datasdk.services.OddsFormatProvider
import androidx.lifecycle.ViewModel
import org.koin.core.component.KoinComponent
import org.koin.core.component.get

class SettingsViewModel :
    ViewModel(),
    KoinComponent {

    val oddsFormatProvider: OddsFormatProvider
        get() = get()

    private fun changeOddsType(oddsType: OddsType) {
       if (oddsType == OddsType.UK) {
           oddsFormatProvider.getUKOddsFormats()
       }
    }
}
```

**iOS**

```swift
import VirtualStadiumDataSDK

class ExampleSettingsViewModel: ObservableObject {

    private var oddsFormatProvider = KoinHelper().getOddsFormatProvider()

    private func changeOddsType(oddsType: OddsType) {
        if (oddsType == OddsType.uk) {
            oddsFormatProvider.getUKOddsFormats()
        }
    }
}
```
