npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@msg91comm/react-native-push-notification-sdk

v1.0.0

Published

Hello Push Notification SDK for react native application.

Downloads

53

Readme

📲 MSG91 Push Notification SDK for React Native

Easily integrate in-app pop-up notifications and Firebase Cloud Messaging (FCM) notifications in your React Native app using MSG91's Push Notification SDK.

Supports:

  • 🔔 In-App HTML Pop-up Notifications
  • 📩 FCM Notifications on Android with HTML Templates

🚀 Installation

npm install @msg91comm/react-native-push-notification-sdk
# or
yarn add @msg91comm/react-native-push-notification-sdk

📦 Requirements

For FCM Push-Notifications Only:


💻 Basic Usage

Basic Setup (without FCM Notifications)

import MSG91PushNotificationSDK from '@msg91comm/MSG91PushNotificationSDK';
import { SafeAreaView } from 'react-native';

<>
  <AppNavigator/>
  <MSG91PushNotificationSDK
    helloConfig={{ widgetToken: 'your_widget_token' }}
    projectId="your_msg91_project_id"
  />
</>

With this minimal setup, your app will receive In-App HTML Notification when your app is in foreground.


🔧 Firebase Setup (for FCM Notifications)

To send FCM notifications, your app must be connected to a Firebase project.

1. Generate Firebase Admin SDK Key

  • Go to your Firebase project.
  • Navigate to Project Settings > Service Accounts.
  • Click "Generate new private key" and download the JSON file.

| Step 1 | Step 2 | Step 3 | Step 4 | |--------|--------|--------|--------| | Step1 | Step2 | Step3 | Step4 |

2. Upload Firebase Key to MSG91 Dashboard

Upload this Firebase Admin JSON in the Push Notification Panel via the Firebase Integration section.

3. Add google-services.json (Android)

Place your google-services.json file inside:

android/app/google-services.json

4. Enable FCM in Your App

Follow the official Firebase setup guide to enable FCM support in your app.

💻 Usage

🧑‍💻 Example with Firebase Messaging

import React, { useEffect } from 'react';
import messaging from '@react-native-firebase/messaging';
import MSG91PushNotificationSDK from '@msg91comm/MSG91PushNotificationSDK';

export default function App() {
  useEffect(() => {
    messaging().getToken().then(token => {
      // Registers device FCM token with MSG91 for FCM Notifications.
      MSG91PushNotificationSDK.registerFCM(token);
    });

    messaging().onNotificationOpenedApp(remoteMessage => {
      if (remoteMessage?.data?.key === 'msg91') {
        // Shows in-app notification popup on click of FCM notification.
        MSG91PushNotificationSDK.handleFCMNotification(remoteMessage?.data?.html_url as string);
      }
    });

    messaging().onMessage((remoteMessage) => {
      if (remoteMessage?.data?.key === 'msg91') {
        // Show in-app notification popup from FCM event.
        MSG91PushNotificationSDK.handleFCMNotification(remoteMessage?.data?.html_url as string);
      }
    });
  }, []);

  return (
    <>
      <AppNavigator/>
      <MSG91PushNotificationSDK
        helloConfig={{ widgetToken: 'your_widget_token' }}
        projectId="your_firebase_project_id"
      />
    </>
  );
}

⚙️ Props

| Prop | Type | Required | Description | |-------------|----------|----------|------------------------------------------| | helloConfig | object | Yes | Hello widget configuration, must include widgetToken | | projectId | string | Yes | MSG91 FCM project ID |


🧪 SDK Methods (for FCM Project only)

| Method | Description | |--------|-------------| | MSG91PushNotificationSDK.registerFCM(fcmToken: string) | Registers user device FCM token with project ID | | MSG91PushNotificationSDK.handleFCMNotification(htmlUrl: string) | Opens FCM notification as Popup |