Skip to content

shide1989/fancy-notifications

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capacitor Fancy Notifications

npm npm

Installation

  • npm i fancy-notifications

Usage

import 'fancy-notifications';
import { Plugins } from '@capacitor/core';
const {FancyNotifications} = Plugins;
async function updateBadgeCount() {
  const check = await FancyNotifications.hasPermission();
  if(check.value){
  FancyNotifications.setBadgeCount(2);
  }else{
  const request = await FancyNotifications.requestPermission();
  if(request.value){
      FancyNotifications.setBadgeCount(2);
  }else{
      // User failed to grant permission show some dialog
  }
  }
}

Api

Method Default Type Description
hasPermission Promise<{value:boolean}>
requestPermission Promise<{value:boolean}>
setBadgeCount Promise<any>
clearBadgeCount Promise<any>

TODO

  • Add Notifications Support

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 32.1%
  • Java 30.3%
  • TypeScript 14.4%
  • Objective-C 10.3%
  • Ruby 9.9%
  • JavaScript 3.0%