> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Notification Tray Status

> Observe and update notification tray seen status for unread indicators.

Notification tray status tracks whether the signed-in user's tray has been seen since the latest tray item occurred. Use it for tray badges, unread indicators, and "new notifications" affordances.

## Status Fields

| Concept | TypeScript | iOS | Android |
| - | - | - | - |
| Tray is seen | `isSeen` | `isSeen` | `isSeen()` |
| Last tray occurrence | `lastTrayOccurredAt` | `lastTrayOccurredAt` | `getLastOccurredAt()` |
| Last tray seen timestamp | `lastTraySeenAt` | `lastTraySeenAt` | `getLastSeenAt()` |

> [!NOTE]
>
> The current public Flutter SDK source reviewed for this page does not expose notification tray seen-status APIs.

## Parameters

| Operation | Input | Required | Platforms | Description |
| - | - | - | - | - |
| Observe tray seen status | Signed-in user session | Yes | TypeScript, iOS, Android | The SDK returns status for the current user; no explicit user ID is passed. |
| Mark tray seen | Seen timestamp | Platform-dependent | TypeScript | Timestamp to store as the tray seen time. |
| Mark tray seen | Current tray context | Yes | iOS, Android | Marks the signed-in user's tray seen without an explicit timestamp parameter. |

## Observe Tray Seen Status

Observe tray seen status when your app needs a badge or "new notifications" indicator to stay current.

```typescript TypeScript theme={null}
import { notificationTray } from '@amityco/ts-sdk';

const unsubscribe = notificationTray.getNotificationTraySeen(
  ({ data: status, loading, error }) => {
    if (loading) return;
    if (error) {
      handleError(error);
      return;
    }

    updateUI(status);
  },
);

unsubscribe();
```

```swift iOS theme={null}
token = client.notificationTray
    .getNotificationTraySeen()
    .observe { object, error in
        if let error {
            handleError(error)
            return
        }

        if let status = object.snapshot {
            showSuccessMessage(status.isSeen)
        }
    }
```

```kotlin Android theme={null}
AmityCoreClient.notificationTray()
    .getNotificationTraySeen()
    .subscribe(
        { status: AmityNotificationTraySeen -> showSuccessMessage(status.isSeen() == true) },
        { error -> handleGeneralError(error) }
    )
```

## Mark Tray Seen

Mark the tray seen after the user actually views the notification tray.

```typescript TypeScript theme={null}
import { notificationTray } from '@amityco/ts-sdk';

async function markNotificationTraySeen() {
  await notificationTray.markTraySeen(new Date().toISOString());
}
```

```swift iOS theme={null}
Task { @MainActor in
    do {
        try await client.notificationTray.markSeen()
    } catch {
        handleError(error)
    }
}
```

```kotlin Android theme={null}
AmityCoreClient.notificationTray()
    .markTraySeen()
    .subscribe(
        { showSuccessMessage("seen") },
        { error -> handleGeneralError(error) }
    )
```

## Notes

* Mark the tray as seen when the user actually views the tray, not merely when a badge is rendered.
* Keep tray-level status separate from item-level status. Marking the tray seen does not replace item-level interaction tracking in your UI.
* Re-observe or refresh tray status when the app returns to the foreground if your badge must reflect cross-device activity.

> [!NOTE]
>
> **Not real-time.** Seen status is derived from the same server-cached tray data as [notification items](/social-plus-sdk/social/discovery-engagement/notifications/notification-items.md#data-freshness), so it does not update the instant a new notification is triggered. Expect a short delay before `isSeen` / `lastTrayOccurredAt` reflect a new occurrence — an unread indicator built on this status is eventually consistent, not live.

## Related Topics

> [card] [Notification Items](/social-plus-sdk/social/discovery-engagement/notifications/notification-items.md)
>
> Query notification items and mark individual items as seen.

> [card] [Notification Overview](/social-plus-sdk/social/discovery-engagement/notifications/overview.md)
>
> Understand the notification tray SDK surface.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.