Platform docs
Auth, users, webhooks & more
Info:
This is beta documentation for Stream Video React Native SDK v2. For the latest stable version, see the latest version (v1).

Expo

Info:

The ringing flow requires @stream-io/react-native-webrtc version 145.0.0 or higher.

Add push notifications for ringing calls to your Expo project. Covers both Android and iOS setup.

Users receive push notifications for incoming calls and can accept or reject directly from the notification.

Android preview iOS preview
Android preview of the Firebase push notification
iOS preview of VoIP notification using Apple Push Notification service (APNs)
Info:

Full-screen notifications are displayed when the phone screen is locked or the app is active (foreground state). However, when the app is terminated or in the background and the screen is awake, notifications may appear as heads-up notifications instead of a full-screen alerts.

Add push provider credentials to Stream

Follow these guides to add push providers:

Install Dependencies

npx expo install @stream-io/react-native-callingx@beta

@stream-io/react-native-callingx registers calls in iOS CallKit and Android Telecom.

Info:

If your app already uses @react-native-firebase/messaging or expo-notifications for your own non-ringing push flows, keep them. The Expo config plugin auto-detects them and resolves the FCM-service conflict for you — see Firebase messaging conflicts.

Add Firebase credentials

  1. Create a Firebase project at Firebase console
  2. Add your Android app in Project settings > Your apps. Use the same package name as android.package in app.json
  3. Download google-services.json to your project root
  4. Add to app.json:
app.json
{
  "android": {
    "googleServicesFile": "./google-services.json"
  }
}
Info:

The google-services.json file contains unique and non-secret identifiers of your Firebase project. For more information, see Understand Firebase Projects.

Note:

No iOS Firebase credentials needed. Ringing on iOS uses Apple's VoIP push via APNs, not Firebase. Skip GoogleService-Info.plist and ios.googleServicesFile unless you also install @react-native-firebase/* for your own flows — those packages require the plist even when you don't use Firebase messaging on iOS.

iOS - Notifications entitlement

Add the notifications entitlement to app.json:

app.json
{
  "expo": {
    "ios": {
      "entitlements": {
        "aps-environment": "production"
      }
    }
  }
}

Add the config plugin properties

In app.json, in the plugins field, add the ringing property to the @stream-io/video-react-native-sdk plugin.

app.json
{
  "plugins": [
    [
      "@stream-io/video-react-native-sdk",
      {
        "ringing": true
      }
    ],
    [
      "@config-plugins/react-native-webrtc",
      {
        "cameraPermission": "$(PRODUCT_NAME) requires camera access in order to capture and transmit video",
        "microphonePermission": "$(PRODUCT_NAME) requires microphone access in order to capture and transmit audio"
      }
    ]
    // your other plugins
  ]
}
Info:

If you also install @react-native-firebase/* for your own flows, add their plugins to the array and add an expo-build-properties entry forcing static framework linking (required by firebase-ios-sdk):

app.json
{
  "plugins": [
    // ... other plugins
    "@react-native-firebase/app",
    "@react-native-firebase/messaging",
    [
      "expo-build-properties",
      {
        "ios": {
          "useFrameworks": "static",
          "forceStaticLinking": [
            "RNFBApp",
            "RNFBMessaging",
            "stream-react-native-webrtc"
          ]
        }
      }
    ]
  ]
}

The config plugin auto-detects RNFB and generates the correct messaging service — see Firebase messaging conflicts.

Info:

The plugin adds a foreground service and the necessary permissions for Android. It shows incoming call notifications and keeps video/audio calls active when the app is in the background.

When uploading the app to the Play Store, declare these permissions in the Play Console and explain their usage, including a link to a video demonstrating the service. This is a one-time requirement. For more information, click here.

The added permissions are:

  • android.permission.FOREGROUND_SERVICE_PHONE_CALL - To maintain active video and audio calls when app goes to background
  • android.permission.FOREGROUND_SERVICE_CAMERA - To access camera when app goes to background
  • android.permission.FOREGROUND_SERVICE_MICROPHONE - To access microphone when app goes to background
Tip:

If Expo EAS build is not used, please do npx expo prebuild --clean to generate the native directories again after adding the config plugins.

Firebase message handling is automatic

You don't need to wire up any Firebase message handlers for ringing. The config plugin generates a FirebaseMessagingService (or the SDK's own StreamMessagingService is used directly when you don't ship a competing FCM library) and routes Stream call.ring push notifications into the ringing flow automatically.

Warning:

Previous versions required calling firebaseDataHandler(msg.data) from inside your own messaging().setBackgroundMessageHandler(...). That API has been removed — delete those calls from your project.

Info:

If you install @react-native-firebase/messaging or expo-notifications for your own non-ringing flows, the config plugin auto-detects them, generates a messaging service that extends their base, and delegates ring pushes to Stream. See Firebase messaging conflicts.

Setup the push notifications configuration for the SDK

The SDK automatically processes the incoming push notifications once the setup above is done if the push notifications configuration has been set using StreamVideoRN.setPushConfig. Also you can override the default notification texts and adjust ringtone for both iOS CallKit and Android Telecom.

Below is an example of how these methods can be called:

src/utils/setPushConfig.ts
import {
  StreamVideoClient,
  StreamVideoRN,
  User,
} from "@stream-io/video-react-native-sdk";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { STREAM_API_KEY } from "../../constants";

export function setPushConfig() {
  StreamVideoRN.setPushConfig({
    ios: {
      // add your push_provider_name for iOS that you have setup in Stream dashboard
      pushProviderName: __DEV__ ? "apn-video-staging" : "apn-video-production",
      supportsVideo: true,
      callsHistory: true,
      displayCallTimeout: 60000,
    },

    android: {
      // add your push_provider_name for Android that you have setup in Stream dashboard
      pushProviderName: __DEV__
        ? "firebase-video-staging"
        : "firebase-video-production",
      incomingChannel: {
        id: "incoming_call_channel",
        name: "Call notifications",
        vibration: true,
      },
      notificationTexts: {
        accepting: "Connecting...",
        rejecting: "Declining...",
      },
    },

    shouldRejectCallWhenBusy: true,

    // add the async callback to create a video client
    // for incoming calls in the background on a push notification
    createStreamVideoClient: async () => {
      const userId = await AsyncStorage.getItem("@userId");
      const userName = await AsyncStorage.getItem("@userName");
      if (!userId) return undefined;

      // an example promise to fetch token from your server
      const tokenProvider = async (): Promise<string> =>
        yourServerAPI.getTokenForUser(userId).then((auth) => auth.token);

      const user: User = { id: userId, name: userName };
      return StreamVideoClient.getOrCreateInstance({
        apiKey: STREAM_API_KEY, // pass your stream api key
        user,
        tokenProvider,
        options: { rejectCallWhenBusy: true },
      });
    },
  });
}
Warning:

Always use StreamVideoClient.getOrCreateInstance(..) instead of new StreamVideoClient(..). Reusing the client instance preserves call accept/decline states changed while the app was in the background. The getOrCreateInstance method ensures the same user reuses the existing instance.

iOS calling experience options:

  • supportsVideo - tells CallKit that video calls should be supported. Affects system UI and routing. Default value is true.
  • callsHistory - adds your calls to the Recents list of the iOS Phone app. Tapping an entry opens your app so you can call back. The config plugin does the native setup for call-backs, see Calls history and call-back. Default value is false.
  • displayCallTimeout – timeout value in ms which will be used to hide system UI if JS is not loaded during that time. Default value is 60000.
  • sound - ringtone resource name that will be used by CallKit. Detailed instructions are provided on CallKit options page.
  • imageName - image resource name that will be used on CallKit dialer UI. Detailed instructions are provided on CallKit options page.
  • enableOngoingCalls – enables CallKit support for outgoing calls. Default value is false.
  • skipIncomingPushInForeground – when true, ringing VoIP pushes that arrive while your app is in the foreground are not shown by CallKit. The push is still delivered to JS so your app can show its own ringing UI. Requires iOS 26.4+ at runtime and building your app with Xcode 26.4 or newer. Apps built with older Xcode versions silently ignore this option even on iOS 26.4+ devices. Default value is false.
  • defaultDeviceEndpointType – default audio endpoint for CallKit-managed calls ('speaker' or 'earpiece'). 'earpiece' routes voice-only / phone-style calls to the built-in receiver. Default value is 'speaker'.

Android calling experience options:

  • incomingChannel.id - notification channel id for incoming calls
  • incomingChannel.name - notification channel name
  • incomingChannel.sound - ringtone resource name that will be used for ringing notification. Detailed instructions are provided on Android custom ringtone page.
  • incomingChannel.vibration - enables vibration for notification channel
  • notificationTexts – allows to override default texts displayed in notifications for accepting/declining intermediate state. By default, Connecting... and Declining... will be displayed for corresponding state.
  • titleTransformer - allows you to modify displayed notification title. Receives member name and incoming boolean flag as parameters. By default, just returns the member name value.
  • enableOngoingCalls – enables Telecom support for outgoing calls. Default value is false.
  • callsHistory - adds your calls to the system call log (Android 16 QPR2 / API 36.1 and newer). Tapping an entry opens your app so you can call back, see Calls history and call-back. Default value is false.
  • skipIncomingPushInForeground - When true, incoming call push notifications (call.ring) will not be displayed as a notification when the app is in the foreground. Default value is false.
  • defaultDeviceEndpointType – default audio endpoint for Telecom-managed calls ('speaker' or 'earpiece'). Default value is 'speaker'.

General calling experience options:

  • shouldRejectCallWhenBusy – blocks new incoming calls in cases when there is an active ongoing call. Default value is false. For setting up call interruption behavior on a client level, please check Reject call when busy. Note: for consistent behavior, this flag should be defined both in the client constructor and in setPushConfig call.
Info:

Please note that all described parameters are optional.

Initialize SDK push notification methods

Call the methods we have created outside your application cycle. That is, alongside your AppRegistry.registerComponent() method call at the entry point of your application code. A root file index.js is a good place do this as the app can be opened from a dead state through a push notification, and in that case, we need to use the configuration and notification callbacks as soon as the JS bridge is initialized.

index.js
import { setPushConfig } from "./utils/setPushConfig";

setPushConfig();

// always import expo-router/entry at the end of the file
import "expo-router/entry";

The index.js file must be made as the entry point file to your app. This can be done via editing the main property in the package.json file:

package.json
{
  ...
  "main": "index.js",
  ...
}

Disabling push notifications

Disable push on user logout or user switch:

import { StreamVideoRN } from "@stream-io/video-react-native-sdk";

await StreamVideoRN.onPushLogout();

Android full-screen incoming call view on locked phone

Info:

For apps installed on phones running versions Android 13 or lower, the USE_FULL_SCREEN_INTENT permission is enabled by default.

For all apps being installed on Android 14 and above, the Google Play Store revokes the USE_FULL_SCREEN_INTENT for apps that do not have calling or alarm functionalities. Which means, while submitting your app to the play store, if you do declare that 'Making and receiving calls' is a 'core' functionality in your app, this permission is granted by default on Android 14 and above.

If the USE_FULL_SCREEN_INTENT permission is not granted, the notification will show up as an expanded heads up notification on the lock screen.

Skip CallKit when the app is in the foreground (iOS 26.4+)

Set skipIncomingPushInForeground: true in your push config to hide CallKit for ringing pushes that arrive while the user is already inside your app. The push is still delivered to JS so the in-app ringing UI can take over. Background pushes are unaffected.

setPushConfig.ts
StreamVideoRN.setPushConfig({
  ios: {
    skipIncomingPushInForeground: true,
  },
});

Requires iOS 26.4+ at runtime and building your app with Xcode 26.4 or newer (for EAS Build, use an image that ships Xcode 26.4+). The foreground-push delegate selector is part of the iOS 26.4 SDK, so apps built with older Xcode versions do not include it and the option is silently ignored — even on devices running iOS 26.4+.

Incoming and Outgoing call UI in foreground

Show call UIs during ringing calls. See watching for calls for implementation.

Testing Ringing calls

To test properly:

  • Use a real physical device (APNs do not work in simulators).
  • Ensure your Firebase/APNs credentials are correctly configured in the Stream Dashboard.
  • Ensure your iOS provisioning profile includes Push Notifications capability and the aps-environment entitlement.

For the best experience, run the Android and iOS app without the metro bundler to the respective physical devices using the following command:

To generate native code directories:

npx expo prebuild --clean

For iOS:

npx expo run:ios --no-bundler --device --configuration Release

For Android:

npx expo run:android --no-bundler --device --variant release

Troubleshooting

See the Troubleshooting guide for common issues.