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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-rn-notification-v1

v1.0.5

Published

For React native local push notification

Downloads

7

Readme

react-native-rn-notification

Getting started

$ npm install react-native-rn-notification-v1 --save

Mostly automatic installation

$ react-native link react-native-rn-notification-v1

Usage

import RnNotification from "react-native-rn-notification-v1";

// For android, a channel is needed for showing a notification.

/*
STEP 1:
    Paramenters:
       channelId: String, Every notification channel must be associated with an ID that is      unique within your package. You use this channel ID later, to post your notifications

       channelName: String, Set the channel name. The name is displayed under notification Categories in the device's user-visible Settings app.

       importance: Integer, This param determines how to interrupt the user for any notification that belongs to this channel, By default it is set to it can range from 0 to 5

       description: String, This param specify the description that the user sees in the system settings.
*/
RnNotification.createNotificationChannel(
  channelId,
  channelName,
  importance,
  description
);

/*
For iOS, Request the permission for Notification
This method return a promise
if user grants the permission then the control will go to then section of the Promise otherwise it will give you an error.
*/
RnNotification.requestNotificationPermission();

// After the channle creation, you can call method for showing  the notification
/*
STEP 2:
    Parameters: 
        channelId: String, Provide the channel id that was created previouly
        title: String, It is title for the notification,
        body: String, It is the body part of the notification
*/
RnNotification.showNotification(channelId, title, body);

/*
For android by default it is taking the ic_launcher as small icon for the notification.
if you want your own icon please add icon in the drawable with the name ic_notification.
*/