New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor/push-notifications

Package Overview
Dependencies
Maintainers
0
Versions
706
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/push-notifications

The Push Notifications API provides access to native push notifications.

  • 7.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created

What is @capacitor/push-notifications?

@capacitor/push-notifications is a Capacitor plugin that enables push notification functionality for iOS and Android applications. It allows developers to register for push notifications, handle incoming notifications, and manage notification permissions.

What are @capacitor/push-notifications's main functionalities?

Register for Push Notifications

This feature allows the application to register for push notifications. Once registered, the device will be able to receive push notifications.

import { PushNotifications } from '@capacitor/push-notifications';

PushNotifications.register();

Handle Incoming Notifications

This feature allows the application to handle incoming push notifications. The provided callback function will be executed whenever a push notification is received.

import { PushNotifications } from '@capacitor/push-notifications';

PushNotifications.addListener('pushNotificationReceived', (notification) => {
  console.log('Push notification received:', notification);
});

Manage Notification Permissions

This feature allows the application to request and manage push notification permissions. The result of the permission request can be used to determine if the user has granted or denied push notification permissions.

import { PushNotifications } from '@capacitor/push-notifications';

PushNotifications.requestPermissions().then(result => {
  if (result.receive === 'granted') {
    console.log('Push notification permission granted');
  } else {
    console.log('Push notification permission denied');
  }
});

Other packages similar to @capacitor/push-notifications

Keywords

FAQs

Package last updated on 20 Jan 2025

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc