Socket
Book a DemoInstallSign in
Socket

capacitor-notify-persistent

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

capacitor-notify-persistent

Notification Persistent

0.0.1
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

capacitor-notify-persistent

Notification Persistent

Install

npm install capacitor-notify-persistent
npx cap sync

API

Interface para gerenciar o plugin de notificações persistentes.

stopContinuousVibration()

stopContinuousVibration() => Promise<{ value: boolean; }>

Interrompe a vibração contínua.

Returns: Promise<{ value: boolean; }>

enablePlugin()

enablePlugin() => Promise<void>

Habilita o plugin.

disablePlugin()

disablePlugin() => Promise<void>

Desabilita o plugin.

isEnabled()

isEnabled() => Promise<{ value: boolean; }>

Verifica se o plugin está habilitado.

Returns: Promise<{ value: boolean; }>

addListener('notificationActionPerformed', ...)

addListener(eventName: 'notificationActionPerformed', listenerFunc: (notification: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Adiciona um listener para o evento de notificação recebida.

ParamTypeDescription
eventName'notificationActionPerformed'O nome do evento ('notificationActionPerformed' ou 'notificationAction').
listenerFunc(notification: any) => voidA função que será chamada quando o evento ocorrer.

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

addListener('notificationLocalActionPerformed', ...)

addListener(eventName: 'notificationLocalActionPerformed', listenerFunc: (action: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle

Adds a listener for the notification action event.

ParamTypeDescription
eventName'notificationLocalActionPerformed'- The name of the event ('notificationLocalActionPerformed' or 'notificationAction').
listenerFunc(action: any) => void- The function that will be called when the event occurs.

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.2.2

addListener('notificationReceived', ...)

addListener(eventName: 'notificationReceived', listenerFunc: (action: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName'notificationReceived'
listenerFunc(action: any) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

addListener('tokenReceived', ...)

addListener(eventName: 'tokenReceived', listenerFunc: TokenReceivedListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Called when a new FCM token is received.

Only available for Android and iOS.

ParamType
eventName'tokenReceived'
listenerFuncTokenReceivedListener

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 0.2.2

removeAllListeners()

removeAllListeners() => Promise<void>

checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Check permission to receive push notifications.

On Android, this method only needs to be called on Android 13+.

Returns: Promise<PermissionStatus>

Since: 0.2.2

requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Request permission to receive push notifications.

On Android, this method only needs to be called on Android 13+.

Returns: Promise<PermissionStatus>

Since: 0.2.2

getToken(...)

getToken(options?: GetTokenOptions | undefined) => Promise<GetTokenResult>
ParamType
optionsGetTokenOptions

Returns: Promise<GetTokenResult>

deleteToken()

deleteToken() => Promise<void>

Delete the FCM token and unregister the app to stop receiving push notifications. Can be called, for example, when a user signs out.

Since: 0.2.2

Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>

TokenReceivedEvent

PropTypeSince
tokenstring0.2.2

PermissionStatus

PropTypeSince
receivePermissionState0.2.2

GetTokenResult

PropTypeSince
tokenstring0.2.2

GetTokenOptions

PropTypeDescription
vapidKeystringYour VAPID public key, which is required to retrieve the current registration token on the web. Only available for Web.
serviceWorkerRegistrationServiceWorkerRegistrationThe service worker registration for receiving push messaging. If the registration is not provided explicitly, you need to have a firebase-messaging-sw.js at your root location. Only available for Web.

Type Aliases

TokenReceivedListener

Callback to receive the token received event.

(event: TokenReceivedEvent): void

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Keywords

capacitor

FAQs

Package last updated on 19 Aug 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.