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

# Handle incoming notifications

> Receive notifications and capture delivery analytics.

The Pushbase SDK offers a hook to listen for incoming notifications and automatically track delivery metrics when notifications are received and opened by users.

<Tabs>
  <Tab title="Expo Router">
    ```js app/_layout.tsx theme={null}

    import React from 'react';
    import {Slot} from 'expo-router'
    import {usePushbaseListeners} from '@pushbase/sdk'

    // Configure how your app will handle notification
    Notifications.setNotificationHandler({
      handleNotification: async () => ({
        shouldShowAlert: true,
        shouldPlaySound: true,
        shouldSetBadge: true,
      }),
    });

    export default function Layout() {

    // Optional enable automatic deep linking
    usePushbaseListeners({ enableDeepLinking: true })

    return <Slot>
    }

    ```
  </Tab>

  <Tab title="React Navigation">
    ```js App.tsx theme={null}
    import React from "react";
    import * as Notifications from "expo-notifications";
    import { NavigationContainer } from "@react-navigation/native";

    import { usePushbaseListeners } from "@pushbase/sdk";

    // Configure how your app will handle notification
    Notifications.setNotificationHandler({
      handleNotification: async () => ({
        shouldShowAlert: true,
        shouldPlaySound: true,
        shouldSetBadge: true,
      }),
    });

    export default function App() {
      // Optional enable automatic deep linking
      usePushbaseListeners({ enableDeepLinking: true });

      return <NavigationContainer>{/* Your content here */}></NavigationContainer>;
    }
    ```
  </Tab>
</Tabs>

<Tip>
  Having trouble setting up or configuring the SDK? Our support team is here to
  help — [feel free to reach
  out](mailto:hello@pushbase.dev?subject=Pushbase%20Product%20Support)
</Tip>
