Skip to content

ovos/fancy-notifications

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capacitor Fancy Notifications

npm npm

Installation

  • yarn add @ovos-media/fancy-notifications

Publish

  • yarn publish

Usage

import { FancyNotifications } from '@ovos-media/fancy-notifications';

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 31.1%
  • Java 29.9%
  • TypeScript 16.3%
  • Objective-C 10.1%
  • Ruby 9.7%
  • JavaScript 2.9%