No description, website, or topics provided.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo Initial commit Dec 5, 2018
src fix(android): missing files Jan 3, 2019
.gitignore fix(android): missing files Jan 3, 2019
CHANGELOG.md
README.md

README.md

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