Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
80aac17
docs(react-native): ringing through the Calls SDK and Push Notificati…
suraj-chauhan-cometchat Oct 15, 2026
09de486
docs(notifications): hand ringing to the VoIP package on both React N…
suraj-chauhan-cometchat Oct 15, 2026
3dc6ebd
docs(react-native): update the calling pages around the new ringing flow
suraj-chauhan-cometchat Oct 15, 2026
c40b142
docs(react-native): correct the ring-theming claims
suraj-chauhan-cometchat Oct 16, 2026
e75afc6
docs(react-native): the ring screen IS themeable now — document it
suraj-chauhan-cometchat Oct 19, 2026
efcabc6
docs(react-native): ring-out sends nothing, and group decline is not …
suraj-chauhan-cometchat Oct 19, 2026
829f11a
docs(react-native): fix snippets that compile and silently do nothing
suraj-chauhan-cometchat Nov 2, 2026
97c5ed7
docs(react-native): call permissions are opt-in in 2.0, on both platf…
suraj-chauhan-cometchat Nov 2, 2026
f3e5c66
docs(react-native): fix the four review findings
suraj-chauhan-cometchat Nov 2, 2026
1c2263a
docs(react-native): finish the four findings across every affected page
suraj-chauhan-cometchat Nov 2, 2026
5c20b19
docs(react-native): fix review findings 5-8, all verified against source
suraj-chauhan-cometchat Nov 2, 2026
34e1bd3
docs(react-native): fix the logout wrapper, and two stale "the Kit do…
suraj-chauhan-cometchat Nov 2, 2026
ba8cd4e
docs(react-native): repin the Calls SDK to public 5.1.0, and land fin…
suraj-chauhan-cometchat Nov 2, 2026
b632416
docs(react-native): the event reason is now iOS 2.0's vocabulary, not…
suraj-chauhan-cometchat Nov 2, 2026
fe4c01e
docs(react-native): point the busy/declined hatch at the event that h…
suraj-chauhan-cometchat Nov 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 75 additions & 1 deletion calls/react-native/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
| Event | Payload | Description |
|-------|---------|-------------|
| `onAudioMuted` | - | Local audio was muted |
| `onAudioUnMuted` | - | Local audio was unmuted |

Check warning on line 66 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L66

Did you really mean 'unmuted'?
| `onVideoPaused` | - | Local video was paused |
| `onVideoResumed` | - | Local video was resumed |
| `onRecordingStarted` | - | Recording started |
Expand Down Expand Up @@ -103,10 +103,11 @@

| Event | Payload | Description |
|-------|---------|-------------|
| `onParticipantJoined` | Participant | A participant joined |
| `onParticipantConnected` | Participant | A participant's device prepared the session without joining. On the caller's prepared session this is the callee ringing |

Check warning on line 106 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L106

Did you really mean 'callee'?
| `onParticipantJoined` | Participant | A participant joined. On the caller's prepared session this is the callee answering: join now |

Check warning on line 107 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L107

Did you really mean 'callee'?
| `onParticipantLeft` | Participant | A participant left |
| `onParticipantAudioMuted` | Participant | A participant muted their audio |
| `onParticipantAudioUnmuted` | Participant | A participant unmuted their audio |

Check warning on line 110 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L110

Did you really mean 'unmuted'?
| `onParticipantVideoPaused` | Participant | A participant paused their video |
| `onParticipantVideoResumed` | Participant | A participant resumed their video |
| `onParticipantHandRaised` | Participant | A participant raised their hand |
Expand Down Expand Up @@ -252,8 +253,81 @@
export default useCallEvents;
```

## Events on a prepared session

`CometChatCalls.getActiveSession()` returns the session as soon as it is **prepared** — which is what `initiateCall` does on the caller and what the Push SDK's ring does on the callee — before anyone has joined. Listening on it is what lets a caller show "Ringing…" and detect the answer without joining first.

Check warning on line 258 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L258

Did you really mean 'callee'?

```ts
const session = CometChatCalls.getActiveSession(); // null when no session is prepared or joined
const me = CometChatCalls.getLoggedInUser()?.uid;

session?.addEventListener('onParticipantConnected', p => {
if (p.uid !== me) setStatus('Ringing…'); // the callee's device got the push
});
session?.addEventListener('onParticipantJoined', p => {
if (p.uid !== me) join(); // the callee answered
});
```

| Event | On a prepared session it means |
|-------|-------------------------------|
| `onParticipantConnected` | The other device prepared the session: it is ringing there |
| `onParticipantJoined` | The other side answered |
| `onSessionTimedOut` | Nobody joined in time |
| `onConnectionClosed` | The call ended before anyone joined (declined, cancelled from another device, or the room went away) |

<Warning>
**A prepared session has no roster.** It receives `onParticipantLeft` but never `onParticipantJoined` for participants who were already there, because there are none. `onParticipantConnected` is the only caller-side signal that the callee's device has been reached.

Check warning on line 280 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L280

Did you really mean 'callee's'?
</Warning>

---

## Incoming call events

On React Native these come from the Push Notifications SDK, not the Calls SDK. They report a call for the logged-in user starting and ending, whether it arrived by push while the app was killed or while it was running.

```ts
import { CometChatVoipNotifications } from '@cometchat/push-notifications-voip-react-native';

const offRinging = CometChatVoipNotifications.onCallRinging(call => { /* ringing */ });
const offAccepted = CometChatVoipNotifications.onCallAccepted(call => { /* answered here */ });
const offEnded = CometChatVoipNotifications.onCallEnded(e => { /* e.reason */ });
const offRingEnded = CometChatVoipNotifications.onRingEnded(e => { /* the ring stopped */ });
```

| Event | Payload | Description |
|-------|---------|-------------|
| `onCallRinging` | `PNCallInfo` | A call for the logged-in user is ringing |
| `onCallAccepted` | `PNCallInfo` | The user answered; open your call screen |
| `onCallEnded` | `PNCallEndEvent` | The call ended. Caller: `declined`, `timedOut`, `cancelled`. Callee still ringing: `cancelled`, `answeredElsewhere`, `declined`, `timedOut`. The raw wire action is on `PNCallEndEvent.callAction` |

Check warning on line 302 in calls/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

calls/react-native/events.mdx#L302

Did you really mean 'Callee'?
| `onRingEnded` | `PNRingEndEvent` | The ring stopped, whatever happened to the call |

Each returns an unsubscribe function. Subscribing late is safe: a call answered before your component mounted is held and delivered to the first subscriber. See [Ringing](/calls/react-native/ringing).

---

## Login events

`CometChatCalls.addLoginListener` reports the Calls SDK login state. The Push SDK uses it to keep the identity its ring gates read in step with the logged-in user; your app can use it to gate call UI.

```ts
CometChatCalls.addLoginListener('my-app', {
onLoginSuccess: user => console.log('logged in as', user.uid),
onLogoutSuccess: () => console.log('logged out'),
});

CometChatCalls.removeLoginListener('my-app');
```

<Note>
Listener ids are keys: registering the same id twice replaces the earlier listener. Remove it when the screen goes away. The `User` the Calls SDK hands back is a plain object with a `uid` field, not a class with `getUid()`.
</Note>

---

## Related Documentation

- [Ringing](/calls/react-native/ringing) - Start, answer and end calls
- [Actions](/calls/react-native/actions) - Control the call programmatically
- [Session Settings](/calls/react-native/session-settings) - Configure event listeners
- [Participant Management](/calls/react-native/participant-management) - Manage participants
Loading
Loading