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

# Notifications

Receive and manage Central Hub notification state for bets, comments, and social activity.

## Notification Types

`CentralHubNotificationsProvider` exposes three main notification groups:

- **Bet share notifications** — new bets shared by users the customer follows.
- **Comment notifications** — new comments on the user's shared bets.
- **Social notifications** — social events such as new followers.

The provider also tracks unread counters so you can badge your UI correctly.

## Usage

**Android**

```kotlin
class NotificationsViewModel : ViewModel(), KoinComponent {

    private val notificationsProvider: CentralHubNotificationsProvider = get()

    val notificationsState = notificationsProvider.state

    init {
        notificationsProvider.loadData()
    }

    fun markAsRead(notificationIds: List<String>) {
        notificationsProvider.readNotifications(notificationIds)
    }

    fun markAllRead() {
        notificationsProvider.readAllNotifications()
    }

    override fun onCleared() {
        super.onCleared()
        notificationsProvider.destroy()
    }
}
```

```kotlin
@Composable
fun NotificationsScreen(
    viewModel: NotificationsViewModel = viewModel(),
) {
    val state by viewModel.notificationsState.collectAsStateWithLifecycle()

    Column {
        Text("Unread Bets: ${state.numOfUnreadBetSlips}")
        Text("Unread Comments: ${state.numOfUnreadComments}")
        Text("Unread Social: ${state.numOfUnreadSocial}")

        LazyColumn {
            items(state.betslipNotifications) { notification ->
                BetNotificationCard(notification) {
                    viewModel.markAsRead(listOf(notification.id))
                }
            }

            items(state.commentNotifications) { notification ->
                CommentNotificationCard(notification)
            }

            items(state.socialNotifications) { notification ->
                SocialNotificationCard(notification)
            }
        }
    }
}
```

**iOS**

```swift
class NotificationsViewModel: ObservableObject {

    private let notificationsProvider =
        KoinHelper().getCentralHubNotificationsProvider()

    @Published var notificationsState: CentralHubNotificationsState?

    init() {
        subscribeToNotifications()
        notificationsProvider.loadData()
    }

    private func subscribeToNotifications() {
        notificationsProvider.state.subscribe { [weak self] state in
            self?.notificationsState = state
        }
    }

    func markAsRead(notificationIds: [String]) {
        notificationsProvider.readNotifications(ids: notificationIds)
    }

    func markAllRead() {
        notificationsProvider.readAllNotifications()
    }

    deinit {
        notificationsProvider.destroy()
    }
}
```

## Data Models

### CentralHubNotificationsState

```kotlin
data class CentralHubNotificationsState(
    val numOfNewNotifications: Int,
    val numOfUnreadBetSlips: Int,
    val numOfUnreadSocial: Int,
    val numOfUnreadComments: Int,
    val betslipNotifications: List<BetShareNotification>,
    val socialNotifications: List<SocialNotification>,
    val commentNotifications: List<CommentNotification>,
    val newFollowersData: NewFollowersData,
    val loadingState: LoadingStatus,
)
```

## Related Topics

- [Bet Sharing](https://apidocs.sportradar.com/resources/virtual-stadium/docs/sdk/centralHub/betSharing.md) - Notifications for newly shared bets.
- [Comments & Reactions](https://apidocs.sportradar.com/resources/virtual-stadium/docs/sdk/centralHub/commentsAndReactions.md) - Notifications for comment activity.
- [Social Features](https://apidocs.sportradar.com/resources/virtual-stadium/docs/sdk/centralHub/social.md) - Notifications for new followers.
