Socket
Socket
Sign inDemoInstall

react-native-notification-badge

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-notification-badge

A notification badge count manager for React Native


Version published
Weekly downloads
1.8K
decreased by-10.44%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-notification-badge

For when you don't want to use a fully featured notification manager

A very simple notification badge count manager for React Native that just works.

API

getBadgeCount

Asynchronously returns the current Badge count.

Note: If no notification permissions have been granted yet, this will also ask the user for notification permissions (only [.badge]), so request permissions before calling this using a library like react-native-permissions

const badgeCount = await getBadgeCount()

getBadgeCountSync

Same as getBadgeCount, but synchronously.

const badgeCount = getBadgeCountSync()

setBadgeCount

Asynchronously sets the Badge count.

Note: If no notification permissions have been granted yet, this will also ask the user for notification permissions (only [.badge]), so request permissions before calling this using a library like react-native-permissions

await setBadgeCount(2)

Keywords

FAQs

Last updated on 25 Jul 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc