0.0.3 • Published 28 days ago

@developerswarehouse/notification-settings-opener v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
28 days ago

@developerswarehouse/notification-settings-opener

An Ionic Capacitor plugin to open an apps native notificaiton settings.

Currently only supports Android.

Resourced and built with our trusty friend ChatGPT.

TODO

  1. Add support for iOS

Install

npm install @developerswarehouse/notification-settings-opener
ionic cap sync android

Add to a component

Ionic+VueJS

<script setup>
import { NotificationSettingsOpener } from '@developerswarehouse/notification-settings-opener';

// Open native notification settings
const openAppNotificationSettings = () => {
  NotificationSettingsOpener.openNotificationSettings().then(() => {
    console.log('Notification settings opened');
  });
}

// Or...
// const openAppNotificationSettings = async () => {
//  await NotificationSettingsOpener.openNotificationSettings();
// }
</script>

<template>
  <ion-page>
    <ion-content>
      <h1>Push Notifications</h1>

      <ion-note class="ion-margin-top">
        <p>You can manage your notifications under app settings.</p>
      </ion-note>

      <ion-button @click="openAppNotificationSettings" class="ion-margin-vertical">Open App Notification Settings</ion-button>
    </ion-content>
  </ion-page>
</template>

API

openNotificationSettings()

openNotificationSettings() => Promise<void>

This method opens the device's native notification settings for the app.


acornacorn-jsxajvansi-colorsansi-regexansi-stylesargparsearray-buffer-byte-lengtharray-includesarray-unionarray.prototype.findlastindexarray.prototype.flatarray.prototype.flatmaparraybuffer.prototype.sliceastral-regexat-least-nodeavailable-typed-arraysbalanced-matchbrace-expansionbracescall-bindcallsiteschalkchevrotaincolor-convertcolor-namecoloretteconcat-mapcosmiconfigcross-spawndata-view-bufferdata-view-byte-lengthdata-view-byte-offsetdebugdeep-isdefine-data-propertydefine-propertiesdir-globdoctrineemoji-regexenquirererror-exes-abstractes-define-propertyes-errorses-object-atomses-set-tostringtages-shim-unscopableses-to-primitiveescape-string-regexpeslint-config-prettiereslint-import-resolver-nodeeslint-module-utilseslint-plugin-importeslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseesutilsfast-deep-equalfast-globfast-json-stable-stringifyfast-levenshteinfastqfile-entry-cachefill-rangeflat-cacheflattedfor-eachfs-extrafs.realpathfseventsfunction-bindfunction.prototype.namefunctional-red-black-treefunctions-have-namesget-intrinsicget-stdinget-symbol-descriptiongithub-sluggerglobglob-parentglobalsglobalthisglobbygopdgraceful-fshas-bigintshas-flaghas-property-descriptorshas-protohas-symbolshas-tostringtaghasownignoreimport-freshimurmurhashinflightinheritsinternal-slotis-array-bufferis-arrayishis-bigintis-boolean-objectis-callableis-core-moduleis-data-viewis-date-objectis-extglobis-fullwidth-code-pointis-globis-negative-zerois-numberis-number-objectis-regexis-shared-array-bufferis-stringis-symbolis-typed-arrayis-weakrefisarrayisexejava-parserjs-tokensjs-yamljson-bufferjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson5jsonfilekeyvlevnlines-and-columnslodashlodash.mergelodash.truncatelru-cachemerge2micromatchminimatchminimistmsnatural-compareobject-inspectobject-keysobject.assignobject.fromentriesobject.groupbyobject.valuesonceoptionatorparent-moduleparse-jsonpath-is-absolutepath-keypath-parsepath-typepicocolorspicomatchpossible-typed-array-namesprelude-lsprogresspunycodequeue-microtaskregexp-to-astregexp.prototype.flagsregexpprequire-from-stringresolveresolve-fromreusifyrun-parallelsafe-array-concatsafe-regex-testsemverset-function-lengthset-function-nameshebang-commandshebang-regexside-channelsignal-exitslashslice-ansisprintf-jsstring-widthstring.prototype.trimstring.prototype.trimendstring.prototype.trimstartstrip-ansistrip-bomstrip-json-commentssupports-colorsupports-preserve-symlinks-flagtabletext-tableto-regex-rangetree-killtsconfig-pathstslibtsutilstype-checktype-festtyped-array-buffertyped-array-byte-lengthtyped-array-byte-offsettyped-array-lengthunbox-primitiveuniversalifyuntildifyuri-jsv8-compile-cachewhichwhich-boxed-primitivewhich-typed-arraywrap-ansiwrappyyallistyaml
0.0.3

28 days ago

0.0.2

28 days ago

0.0.1

28 days ago