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

@rexovolt/notifee

v9.0.2

Published

Notifee - a feature rich notifications library for React Native. Temp fork for RVMob.

Downloads

2

Readme


A feature rich Android & iOS notifications library for React Native.

> Learn More

Installation

yarn add @notifee/react-native

Documentation

Android

The APIs for Android allow for creating rich, styled and highly interactive notifications. Below you'll find guides that cover the supported Android features.

| Topic | | | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | Appearance | Change the appearance of a notification; icons, colors, visibility etc. | | Behaviour | Customize how a notification behaves when it is delivered to a device; sound, vibration, lights etc. | | Channels & Groups | Organize your notifications into channels & groups to allow users to control how notifications are handled on their device | | Foreground Service | Long running background tasks can take advantage of a Android Foreground Services to display an on-going, prominent notification. | | Grouping & Sorting | Group and sort related notifications in a single notification pane. | | Interaction | Allow users to interact with your application directly from the notification with actions. | | Progress Indicators | Show users a progress indicator of an on-going background task, and learn how to keep it updated. | | Styles | Style notifications to show richer content, such as expandable images/text, or message conversations. | | Timers | Display counting timers on your notification, useful for on-going tasks such as a phone call, or event time remaining. |

iOS

Below you'll find guides that cover the supported iOS features.

| Topic | | | ----------------------------------------------------------------- | ------------------------------------------------------------------------ | | Appearance | Change now the notification is displayed to your users. | | Behaviour | Control how notifications behave when they are displayed to a device; sound, crtitial alerts etc. | | Categories | Create & assign categories to notifications. | | Interaction | Handle user interaction with your notifications. | | | Permissions | Request permission from your application users to display notifications. | |

Jest Testing

To run jest tests after integrating this module, you will need to mock out the native parts of Notifee or you will get an error that looks like:

 ● Test suite failed to run

    Notifee native module not found.

      59 |     this._nativeModule = NativeModules[this._moduleConfig.nativeModuleName];
      60 |     if (this._nativeModule == null) {
    > 61 |       throw new Error('Notifee native module not found.');
         |             ^
      62 |     }
      63 |
      64 |     return this._nativeModule;

Add this to a setup file in your project e.g. jest.setup.js:

If you don't already have a Jest setup file configured, please add the following to your Jest configuration file and create the new jest.setup.js file in project root:

setupFiles: ['<rootDir>/jest.setup.js'],

You can then add the following line to that setup file to mock notifee:

jest.mock('@notifee/react-native', () => require('@notifee/react-native/jest-mock'))

You will also need to add @notifee to transformIgnorePatterns in your config file (jest.config.js):

transformIgnorePatterns: [
    'node_modules/(?!(jest-)?react-native|@react-native|@notifee)'
]

Detox Testing

To utilise Detox's functionality to mock a local notification and trigger notifee's event handlers, you will need a payload with a key __notifee_notification:

{
  title: 'test',
  body: 'Body',
  payload: {
    __notifee_notification: {
      ios: {
        foregroundPresentationOptions: {
          banner: true,
          list: true,
        },
      },
      data: {}
    },
  },
}

The important part is to make sure you have a __notifee_notification object under payload with the default properties.

License