# Push Providers Configuration

## Configuring Push Notification Manager

To handle push notifications in your Flutter app, configure the `pushNotificationManagerProvider` in the `StreamVideo` instance. This manager handles device token registration, incoming call notifications, and listening to call events (e.g., ending a call on the callee's side when the caller ends the call).

When creating a `StreamVideo` instance, pass a `pushNotificationManagerProvider` parameter. This parameter is an instance of `StreamVideoPushNotificationManager`, which is created using the `StreamVideoPushNotificationManager.create()` method.

```dart
 StreamVideo(
      // ...
       options: const StreamVideoOptions(
        // It's important to keep connections alive when the app is in the background to properly handle incoming calls while the app is in the background
        keepConnectionsAliveWhenInBackground: true,
      ),
      // Make sure you initialise push notification manager
      pushNotificationManagerProvider: StreamVideoPushNotificationManager.create(
        iosPushProvider: const StreamVideoPushProvider.apn(
          name: 'your-ios-provider-name',
        ),
        androidPushProvider: const StreamVideoPushProvider.firebase(
          name: 'your-fcm-provider',
        ),
        pushConfiguration: const StreamVideoPushConfiguration(
          ios: IOSPushConfiguration(iconName: 'IconMask'),
        ),
      ),
    );
```

- For `androidPushProvider` use the provider name created in [Firebase integration](#upload-the-firebase-credentials-to-stream)

- For `iosPushProvider` use the provider name created in [APN integration](#upload-the-certificate-and-create-a-push-provider​)

- Add app icon asset in Xcode for displaying dedicated app button in CallKit screen (named `IconMask` in the code below). [See details here](https://developer.apple.com/documentation/callkit/cxproviderconfiguration/2274376-icontemplateimagedata)

### Configuring Push Providers

<admonition type="warning">
For the best experience, we strongly recommend using **APNs** for **iOS** and **Firebase** for **Android**. While compatibility with both providers on iOS is a goal, Firebase support for iOS is not yet fully available.
</admonition>

## Creating Firebase Provider

### Get the Firebase Credentials

In order for our backend to send push notifications through Firebase Cloud Messaging (FCM) we need to authenticate it with Firebase.
This authentication ensures that only authorized services can send notifications on behalf of your app.
To allow us to do this you must manually provide a service account [private key](https://firebase.google.com/docs/admin/setup#initialize_the_sdk_in_non-google_environments).

Follow these steps to generate the private key file:

- In the Firebase console, navigate to **Settings > Service Accounts**.

- Click **Generate New Private Key**, then confirm by clicking **Generate Key**.

- Download the JSON file and store it securely, as it grants access to Firebase resources.

In the next step, you’ll upload this JSON file to Stream’s server to complete the setup.

### Upload the Firebase Credentials to Stream

To upload your Firebase credentials to Stream dashboard:

- Go to the dashboard of your video project at the [Stream website](https://dashboard.getstream.io).

- Open the **Push Notifications** tab under **Video & Audio**.

- Select **New Configuration** and select **Firebase**.

![Firebase Configuration](@video/flutter/_assets/advanced_assets/firebase_config.png)

- Provide a name for the push provider in the **Name** field. This name will be referenced in your code to identify the provider.

- Upload the previously generated Firebase credentials JSON file in the **Credentials JSON** field.

- Enable this provider using toggle button.

- Click **Create** to finalize the configuration.

### Add dependencies to your app

To integrate push notifications, include the [`firebase_messaging`](https://pub.dev/packages/firebase_messaging) package in your Flutter app.

Follow the [Flutter Firebase documentation](https://firebase.google.com/docs/flutter/setup?platform=android) for setup instructions for both Android and iOS.

Once set up, FCM will handle push notifications for your devices. Remember to initialize the Firebase when your app starts:

```dart
await Firebase.initializeApp(
      options: DefaultFirebaseOptions.currentPlatform,
    );
```

## Creating APNs Provider

**Prerequisites:**

- Paid Apple developer account
- [Registered App ID](https://developer.apple.com/help/account/identifiers/register-an-app-id/) with [Push Notification capability](https://developer.apple.com/documentation/xcode/adding-capabilities-to-your-app) enabled.

Delivering push notifications to iOS apps requires establishing an authenticated connection with APNs. There are two authentication options — a token-based approach using a `.p8 key` or a certificate-based approach using a `.p12 file`. You only need to set up one of them. We recommend using a `.p8 key`.

<tabs>

<tabs-item value="p8" label=".p8 key">

### Getting a .p8 key (Recommended)

The `.p8` authentication key is the preferred method because a single key works across all your apps and doesn't expire, unlike `.p12` certificates which must be renewed annually.

1. Sign in to your [Apple Developer Account](https://developer.apple.com/account/) and navigate to **Certificates, Identifiers & Profiles** > [**Keys**](https://developer.apple.com/account/resources/authkeys).

2. Click the **+** (plus) button to register a new key.

3. Give your key a descriptive name (e.g., "Stream Push Key") and tick the **Apple Push Notifications service (APNs)** checkbox. Make sure **Sandbox & Production** is selected under the APNs configuration, then click **Continue** followed by **Register**.

4. Click **Download** to save the `.p8` file. Store it in a secure location — Apple only lets you download this file once.

> **Important:** Apple limits you to two `.p8` keys per developer account. If you already have two and need a new one, you must revoke an existing key first — and any service relying on the revoked key will stop working.

5. Make a note of the following values — you'll need them when configuring the push provider in the Stream Dashboard:
   - **Key ID** — shown on the key details page and also embedded in the `.p8` filename (e.g., `AuthKey_ABC123.p8`).
   - **Team ID** — displayed in the upper-right corner of your [Apple Developer account](https://developer.apple.com/account/).
   - **Bundle ID** — your app's identifier, found under [**Identifiers**](https://developer.apple.com/account/resources/identifiers/list) in your developer account or in **Xcode > your target > Signing & Capabilities**.

</tabs-item>

<tabs-item value="p12" label=".p12 certificate file">

### Getting a .p12 certificate file (Alternative to p8)

1. In [Apple's Developer Portal](https://developer.apple.com/account/resources/certificates/add), select **Apple Push Notifications service SSL (Sandbox & Production)**, then click Continue.

2. Create a **Certificate Signing Request (CSR)** by [following these steps](https://developer.apple.com/help/account/create-certificates/create-a-certificate-signing-request).

3. Convert the _.cer_ file into a _.p12_ certificate file using Keychain Access:
   - Add the _.cer_ file to the login keychain.
   - Find it under the Certificates tab, right-click, and export it as a _.p12_ file.
   - Ensure no password is set when exporting.

</tabs-item>

</tabs>

### Upload the certificate and create a push provider

To configure APNs in the Stream dashboard:

- Go to the dashboard of your video project at the [Stream website](https://dashboard.getstream.io).

- Open the **Push Notifications** tab under **Video & Audio**.

- Select **New Configuration** and select **APN**.

![APNs Configuration](@video/flutter/_assets/advanced_assets/apns_config.png)

- Provide a name for the push provider in the **Name** field. This name will be used in your code to configure iOS push notifications.

- Upload the _.p8_ key or _.p12_ file with the required Apple details.

- Enable this provider using toggle button.

- Click **Create** to finalize the configuration.

Now that the providers are configured, the next step is to handle push notifications:

- For regular push notifications, refer to [this guide](/video/docs/flutter/advanced/incoming-calls/push-notifications/).
- For VoIP/ringing notifications:
  - iOS: Follow [this guide](/video/docs/flutter/advanced/incoming-calls/ios-callkit-integration/).
  - Android: Refer to [this guide](/video/docs/flutter/advanced/incoming-calls/android-firebase-integration/).


---

This page was last updated at 2026-06-12T11:05:36.453Z.

For the most recent version of this documentation, visit [https://getstream.io/video/docs/flutter/advanced/incoming-calls/providers-configuration/](https://getstream.io/video/docs/flutter/advanced/incoming-calls/providers-configuration/).