capacitor-plugin-device-settings-permission
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

capacitor-plugin-device-settings-permission

DeviceSettingsPermission is a Capacitor plugin designed to streamline the process of requesting permissions and accessing device settings. It provides a unified API to request and check permissions across different platforms, and offers a simple way to direct users to their device's settings page. This plugin is intended to enhance user experience by making permission management more efficient and user-friendly.

Install

npm install capacitor-plugin-device-settings-permission
npx cap sync

API

requestNotificationPermission()

requestNotificationPermission() => Promise<{ permission: NotificationPermissions; }>

Request permission to show notifications.

Returns: Promise<{ permission: NotificationPermissions; }>

Since: 1.0.0


getNotificationPermission()

getNotificationPermission() => Promise<{ permission: NotificationPermissions; }>

Check the current notification permission status.

Returns: Promise<{ permission: NotificationPermissions; }>

Since: 1.0.0


openAppSettings(...)

openAppSettings(type: AppSettingsType) => Promise<void>

Open the app settings for the app.

Param Type Description
type AppSettingsType The type of settings to open.

Since: 1.0.0


Enums

NotificationPermissions

Members Value
GRANTED 'granted'
DENIED 'denied'

AppSettingsType

Members Value
NOTIFICATION 'notification'
LOCATION 'location'
TRACING 'tracing'
GENERAL 'general'

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i capacitor-plugin-device-settings-permission

    Weekly Downloads

    28

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    31.7 kB

    Total Files

    24

    Last publish

    Collaborators

    • holmio