Notifee for React Native

website·Indexed 33 days ago

https://notifee.app/react-native/docs/

A local notifications library for React Native. Provides comprehensive APIs for displaying notifications on Android and iOS, including support for channels, groups, triggers, progress indicators, foreground services, and badges. Includes integration guides for Firebase Cloud Messaging (FCM) and OneSignal.

Tokens
44.2K
Snippets
279
Records
375
Agent score
68%

What's inside Notifee

  1. Overview of Notifee Android Notification Features

    Notifee provides a comprehensive set of tools for creating rich, styled, and interactive notifications on Android. It supports the latest Android API features while maintaining backwards compatibility down to Android 4.4W (API 20). Key customization areas include:

    • Appearance: Managing icons, colors, and visibility.
    • Behaviour: Configuring sound, vibration, and lights upon delivery.
    • Channels & Groups: Organizing notifications to allow user-level control over handling.
    • Foreground Services: Displaying prominent notifications for long-running background tasks.
    • Grouping & Sorting: Consolidating related notifications into a single pane.
    • Interaction: Adding actionable elements for direct app interaction from the notification.
    • Permissions: Checking notification status for the app, channel groups, or specific channels.
    • Progress Indicators: Showing and updating the progress of background tasks.
    • Styles: Implementing rich content like expandable images, text, or conversation views.
    • Timers: Adding counting timers for events or ongoing tasks.
  2. Overview of Notifee for React Native

    Notifee is a Free and Open Source Software (FOSS) library that provides a single JavaScript API to access native Android and iOS notification SDKs within React Native. It is the successor to the notifications module found in React Native Firebase v5 and is maintained by Invertase under the Apache License 2.0.
  3. Overview of Notifee for React Native

    Notifee is an open-source JavaScript library for React Native that allows developers to create and manage rich local notifications on Android and iOS. It abstracts complex native behaviors such as scheduling, background tasks, and device API compatibility into a simplified API.
  4. Introduction to Notifee for React Native

    Notifee is a local notifications library for React Native that provides support for both Android and iOS applications. Unlike some notification libraries, Notifee does not integrate with 3rd party messaging services, giving developers full flexibility over how notifications are managed and integrated into their apps. It is the successor to the notifications module in React Native Firebase v5.
  5. Overview of Notifee iOS Notification Features

    Notifee provides a comprehensive API for creating interactive notifications on iOS devices running iOS 10 and above. Key capabilities include managing notification appearance, controlling badge counts, defining notification behavior, creating action categories, handling user interactions, requesting user permissions, and integrating remote notification support.
  6. Retrieve device power manager information with getPowerManagerInfo

    Use getPowerManagerInfo() to retrieve details about the device's power manager settings, including the manufacturer, model, version, and current activity. This API is primarily for Android. On iOS, it returns a PowerManagerInfo object where the activity property is set to null. If the activity property is null on Android, calling openPowerManagerSettings() will have no effect (noop).
    import notifee from '@notifee/react-native';
    
    const powerManagerInfo = await notifee.getPowerManagerInfo();
    
    if (powerManagerInfo.activity) {
      // 1. Ask the user to adjust their Power Manager settings
      // ...
    
      // 2. Open the power manager settings page
      await notifee.openPowerManagerSettings();
    }
  7. Use PowerManagerInfo to identify device power settings (Android Only)

    The PowerManagerInfo interface represents the data returned from the getPowerManagerInfo() method on Android. It provides details about the device manufacturer, model, Android version, and the specific settings activity the user would be navigated to when calling openPowerManagerSettings(). This information is primarily used to determine the steps a user must take to prevent the app from being killed by background restrictions.
  8. AndroidChannel Interface Overview

    The AndroidChannel interface is used to describe an Android notification channel. Channels override individual notification preferences (such as lights or vibration), and the end-user has final control over these settings in the system menu. Note that once a channel is created, most properties cannot be changed; only metadata like the channel name and description can be updated.
  9. Use the DisplayedNotification interface

    The DisplayedNotification interface represents a notification that is currently displayed in the notification tray. It provides metadata about the notification's timing, its unique identifier, and the original payload or trigger used to create it.
  10. Use the NativeAndroidChannelGroup interface for Android channel groups

    The NativeAndroidChannelGroup interface describes a notification channel group fetched from an Android device. It provides metadata about the group and its associated channels.
    interface NativeAndroidChannelGroup {
      id: string;
      name: string;
      description?: string | undefined;
      blocked: boolean;
      channels: NativeAndroidChannel[];
    }
  11. Understand Notifee cross-platform behavior (Android vs iOS)

    Notifee uses a unified interface for both Android and iOS. If a specific API feature is not supported on a particular platform, the method will 'noop' (no operation) or resolve instantly without crashing.
  12. Notifee Licensing Overview

    Notifee has transitioned to being free and Open Source. Current licensing is governed by the repository license on GitHub. The legacy product license applies only to versions released prior to the open-source transition.
    https://github.com/invertase/notifee/blob/main/LICENSE