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

# Presence State

> Understand which social.plus SDKs support user, channel, and room presence, and choose the right presence API.

Presence state lets your app show who is currently active. The SDK has two different presence surfaces:

* **Network presence** tracks the current user's heartbeat and lets iOS and Android apps read or sync other users' online state.
* **Room presence** tracks who is currently watching a live room. It is available on iOS, Android, and TypeScript.

<Info>
  Presence APIs require the presence feature to be enabled for your network. If the feature is disabled, heartbeat calls can fail with an SDK error.
</Info>

## Platform Surface

| Capability             | TypeScript               | iOS                              | Android                                          | Flutter       |
| ---------------------- | ------------------------ | -------------------------------- | ------------------------------------------------ | ------------- |
| Current user heartbeat | Not available            | `client.presence`                | `AmityCoreClient.presence()`                     | Not available |
| User presence          | Not available            | `AmityUserPresenceRepository`    | `AmityCoreClient.newUserPresenceRepository()`    | Not available |
| Channel presence       | Not available            | `AmityChannelPresenceRepository` | `AmityChatClient.newChannelPresenceRepository()` | Not available |
| Room presence          | `RoomPresenceRepository` | `AmityRoomPresenceRepository`    | `AmityCoreClient.newRoomPresenceRepository()`    | Not available |

## Which Presence API to Use

<CardGroup cols={2}>
  <Card title="User Presence" icon="user" href="/social-plus-sdk/core-concepts/realtime-communication/presence-state/user-presence">
    Read specific users' online state, sync visible users in a list, or fetch a snapshot of online users.
  </Card>

  <Card title="Channel Presence" icon="messages-square" href="/social-plus-sdk/core-concepts/realtime-communication/presence-state/channel-presence">
    Show whether any other member of a conversation channel is online.
  </Card>

  <Card title="Room Presence" icon="radio" href="/social-plus-sdk/core-concepts/realtime-communication/presence-state/room-presence">
    Count and list users currently watching a live room.
  </Card>

  <Card title="Heartbeat Sync" icon="heart-pulse" href="/social-plus-sdk/core-concepts/realtime-communication/presence-state/heartbeat-sync">
    Start and stop the heartbeat that marks the current user or room viewer as active.
  </Card>
</CardGroup>

## Behavior to Know

<AccordionGroup>
  <Accordion title="Online state is heartbeat based" icon="activity">
    iOS and Android expose `isOnline` as a computed value from the user's last heartbeat. The SDK considers a user online while the last heartbeat is recent.
  </Accordion>

  <Accordion title="Syncing is for visible UI" icon="eye">
    User and channel sync APIs are meant for visible lists. Start syncing when an item appears, then unsync when it disappears so you stay within the SDK sync limits.
  </Accordion>

  <Accordion title="Room presence is separate from user presence" icon="radio">
    Room presence uses room-specific heartbeat and count APIs. Use it for live rooms and viewer lists, not for general "online user" badges.
  </Accordion>

  <Accordion title="Flutter is not covered yet" icon="circle-slash">
    The Flutter SDK in this checkout does not expose user, channel, or room presence repositories. Do not copy iOS, Android, or TypeScript presence snippets into Flutter integrations.
  </Accordion>
</AccordionGroup>

## Related Topics

<CardGroup cols={2}>
  <Card title="Live Objects & Collections" icon="radio-tower" href="/social-plus-sdk/core-concepts/realtime-communication/live-objects-collections/overview">
    Use live data objects for SDK resources that publish real-time updates.
  </Card>

  <Card title="Realtime Events" icon="bolt" href="/social-plus-sdk/core-concepts/realtime-communication/realtime-events/overview">
    Learn how event subscriptions power live chat and social experiences.
  </Card>
</CardGroup>
