{"_id":"@elemental-design/expo-notifications","_rev":"2-768fbda374562c6c59bdbb6964b08bd9","name":"@elemental-design/expo-notifications","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.0":{"name":"@elemental-design/expo-notifications","version":"0.3.0","description":"Notifications module","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"expo-module build","clean":"expo-module clean","lint":"expo-module lint","test":"expo-module test","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","expo-module":"expo-module"},"keywords":["react-native","expo","notifications","expo-notifications"],"repository":{"type":"git","url":"git+https://github.com/expo/expo.git","directory":"packages/expo-notifications"},"bugs":{"url":"https://github.com/expo/expo/issues"},"author":{"name":"650 Industries, Inc."},"license":"MIT","homepage":"https://github.com/expo/expo/tree/master/packages/expo-notifications","jest":{"preset":"expo-module-scripts/ios"},"unimodulePeerDependencies":{"@unimodules/core":"*","expo-application":"^2.1.0","expo-constants":"<10.0.0","unimodules-permissions-interface":"*"},"dependencies":{"badgin":"^1.1.5","expo-application":"~2.2.1","expo-constants":"9.1.1","uuid":"^3.4.0"},"devDependencies":{"@types/uuid":"^3.4.7","expo-module-scripts":"~1.2.0"},"_id":"@elemental-design/expo-notifications@0.3.0","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Pj6tOZ++HnWqK9Zmlhx9nCDvRPhzxEmpeh4O46LgM6RtR65f0Oq62fG7pib1r/U+52lgcctqot5Edr39jOmg7A==","shasum":"98fb36f842df195bfbb7dc5bb2e7d98abc782074","tarball":"https://registry.npmjs.org/@elemental-design/expo-notifications/-/expo-notifications-0.3.0.tgz","fileCount":332,"unpackedSize":570120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2VTiCRA9TVsSAnZWagAA54MP/RSfru2tLL41GpT4u454\n/ZS/8ubZTuDGL56wUPnJzU8xujrMQQOKQMrs06LGxdHmuS2n6elMsi5QKcyq\nHbGPAAG5VM7jkQiBDL2KZSDfWrdwT1Oh3ejehmRX52JMmkGz/R7zrMd5mxoz\njOnNWnTnM/FDOH866ssiJuTmRC6+4YjQe+KO/QVm1tkes3cKM0iP6n3X+oU+\nE6j4/gP5ENj4z2htVeJsIN7xrCwBy8bfYcQY+ffHmLPDfHa6ho0d+ADEZjQ4\nv681LgDgr9HcUa2qRTEC5/t+3+QPfjy2ni6fqXWbbScxvwKcZ35oSOuqfwEN\nJ6q5zMawz/7bBShDnt9Gy5YxCayBmV/Cl/NScWkl2C00VbB1oyuFLr3wjL+t\nUIyU1FRwZSx1IYYljY5J9xdTcQsZDbIOWY7MVydv5QDhY4kv/AG+2+piO4Ql\nnmfaVyRzrjRO+hF9BTnlyLAR3xegTM7IMAoDDsTyiSFXqNvSlt4lVCPkc60+\nYYMhgg1eeTj6kqLSOpdBM290a4NwoJEXWSJxx9amkXIzcz6UV4efUilhh0md\n0HXH2egDQYRj3jv/Nb9jsmSVj8GT2r5M/XHYQcDa2tuNchvw0LkviDTi+kcP\nGcAeXDebsgWFFy/2LFEfZP8QtOs8CzVs3MkbzyJqPIcvdYjWRQIme3YunElK\nan0R\r\n=OHS7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlLhCyDadXWfHKPe5KCK1KEtk1+KtTVCYbnwhQtutk5AiASfQ3j83uj3EQaitaQmHPMyRAzGA33oPQ2qzWYUjXa1A=="}]},"maintainers":[{"name":"macintoshhelper","email":"contact+npm@macintoshhelper.com"}],"_npmUser":{"name":"macintoshhelper","email":"contact+npm@macintoshhelper.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expo-notifications_0.3.0_1591301345824_0.5711940607428001"},"_hasShrinkwrap":false},"0.3.1":{"name":"@elemental-design/expo-notifications","version":"0.3.1","description":"Notifications module","main":"build/index.js","types":"build/index.d.ts","scripts":{"build":"expo-module build","clean":"expo-module clean","lint":"expo-module lint","test":"expo-module test","prepare":"expo-module prepare","prepublishOnly":"expo-module prepublishOnly","expo-module":"expo-module"},"keywords":["react-native","expo","notifications","expo-notifications"],"repository":{"type":"git","url":"git+https://github.com/elemental-design/expo.git","directory":"packages/expo-notifications"},"bugs":{"url":"https://github.com/expo/expo/issues"},"author":{"name":"650 Industries, Inc."},"license":"MIT","homepage":"https://github.com/expo/expo/tree/master/packages/expo-notifications","jest":{"preset":"expo-module-scripts/ios"},"unimodulePeerDependencies":{"@unimodules/core":"*","expo-application":"^2.1.0","expo-constants":"<10.0.0","unimodules-permissions-interface":"*"},"dependencies":{"badgin":"^1.1.5","expo-application":"~2.2.1","expo-constants":"9.1.1","uuid":"^3.4.0"},"devDependencies":{"@types/uuid":"^3.4.7","expo-module-scripts":"~1.2.0"},"_id":"@elemental-design/expo-notifications@0.3.1","_nodeVersion":"10.19.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-A5u0EzeIpvcDR+/dQLMdFN7OYiYhVilcBFqP8D1CMKS5G//NXK922hm4FRl1SWdqk91zSlu6SJBHYwHl2VNUXw==","shasum":"c0fe2c869c14f16be9983269ba81399be89f50f6","tarball":"https://registry.npmjs.org/@elemental-design/expo-notifications/-/expo-notifications-0.3.1.tgz","fileCount":332,"unpackedSize":573657,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5AYICRA9TVsSAnZWagAAmGUP/jII/eCPA4CxOs0HVhXb\n98+r/scNTJK/tZX/nB84g4bw/WSMkzCdncK0cwmXB3ELp7YVZKjLRQibQAb3\ntXPss7kc15M1Twpvx07fC8fKNxXffMHXg3VpdciY9eLG2KF4G63dsgI432of\nUv0gafpyqmrDncnqaXnCyOuEcO7XeyoVTtmTJBvFWwX13xFcwMsJ4XeJ0Xnv\nRYcnKT0ldWTyUcZForvW/gm2q00AJAyfUwlZsheeottz/QDLF0G7vFoIeBLy\nTKoKUC3hQlTl212LdlpvUYzG/MwAY+RhhFuAsrcMr92+W3YVYpA/JF6hpTkc\nhh0f2v1WmvGGbpcxgmnVg0skXSMAupu2YnpY0JrWbPIi9tUO4ANTupEIZ3BX\nacC3IxBN8R1HLQR3DXKo+BqDVL6cwH+ec/flsh1UF6Gm4YKrZY8lr/XdW/Qz\nR6UAxIlK8ZDVq7dvHK1W8M3Mw0AU+UFEwDzMVY6r/qf1kgPSKVSkWc4T279S\nJ5T1SjEhatm2ozAlsvyXOH2AXU35RXwqrnr/OjrzEOzuf6jjdWGkSuQRVZua\nwldmNZgeCwbYxTW6GI00IT8/MOs1V9jBc0GOdpTLAPDhkmQcq0OJi5QZGkFM\nBdmEz+QhdMRs3wzl8CC8QcqwaIFiWgCSKL1pDR/EqDRCe4dYZRWRAryQak4o\ncYFT\r\n=Ogdm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFF4umBl09P2Z+KLWyoZGUYuDcl0GIdZ+etg1VWeMmsDAiEA8RHKAOpHvcusdQNqYbZUw5HPLjv1VmubU+OuMuF/j5Q="}]},"maintainers":[{"name":"macintoshhelper","email":"contact+npm@macintoshhelper.com"}],"_npmUser":{"name":"macintoshhelper","email":"contact+npm@macintoshhelper.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expo-notifications_0.3.1_1592002055533_0.06028873660555778"},"_hasShrinkwrap":false}},"time":{"created":"2020-06-04T20:09:05.593Z","0.3.0":"2020-06-04T20:09:05.969Z","modified":"2022-04-05T07:08:51.938Z","0.3.1":"2020-06-12T22:47:35.690Z"},"maintainers":[{"name":"macintoshhelper","email":"contact+npm@macintoshhelper.com"}],"description":"Notifications module","homepage":"https://github.com/expo/expo/tree/master/packages/expo-notifications","keywords":["react-native","expo","notifications","expo-notifications"],"repository":{"type":"git","url":"git+https://github.com/elemental-design/expo.git","directory":"packages/expo-notifications"},"author":{"name":"650 Industries, Inc."},"bugs":{"url":"https://github.com/expo/expo/issues"},"license":"MIT","readme":"# expo-notifications\n\nProvides an API to fetch push notification tokens and to present, schedule, receive and respond to notifications.\n\n## Features\n\n- 📣 schedule a one-off notification for a specific date, or some time from now,\n- 🔁 schedule a notification repeating in some time interval (or a calendar date match on iOS),\n- 1️⃣ get and set application badge icon number,\n- 📲 fetch a native device push token so you can send push notifications with FCM and APNS,\n- 😎 fetch an Expo push token so you can send push notifications with Expo,\n- 📬 listen to incoming notifications,\n- 👆 listen to interactions with notifications (tapping or dismissing),\n- 🎛 handle notifications when the app is in foreground,\n- 🔕 imperatively dismiss notifications from Notification Center/tray,\n- 🗂 create, update, delete Android notification channels,\n- 🎨 set custom icon and color for notifications on Android.\n\n# Installation in managed Expo projects\n\nThis library is not yet usable within managed projects &mdash; it is likely to be included in an upcoming Expo SDK release.\n\n# Installation in bare React Native projects\n\nFor bare React Native projects, you must ensure that you have [installed and configured the `react-native-unimodules` package](https://github.com/unimodules/react-native-unimodules) before continuing.\n\n### Add the package to your npm dependencies\n\n```\nexpo install expo-notifications\n```\n\n### Configure for iOS\n\nRun `npx pod-install` after installing the npm package.\n\nIn order to be able to receive push notifications on the device:\n\n- open Xcode workspace from your `ios` folder\n- select your project from the _Navigator_ pane\n- switch to _Signing & Capabilities_ tab\n- ensure that the _Push notifications_ capability is present (if it's not, click the \"+ Capability\" button and add the capability to the project).\n\n### Configure for Android\n\nIn order to be able to receive push notifications on the device ensure that your project is set up for Firebase. For more information on how to do it, see [this guide](https://docs.expo.io/guides/setup-native-firebase/#bare-workflow-setup).\n\nThe notification icon and the default color can be customized.\n- **To customize the icon**:\n  1. You will need to ensure that the icon is properly set up and added the project. To read more on how to create a notification icon and add it to the project check out the [“Create notification icon” section](https://developer.android.com/studio/write/image-asset-studio#create-notification) at the official Android guide. Remember the name you use for the icon asset, you will need it later!\n  2. Then head over to `android/app/src/main/AndroidManifest.xml` and add a `<meta-data>` tag of `android:name=\"expo.modules.notifications.default_notification_icon\"` inside the `<application>` node referencing the custom icon with `@drawable/<notification_icon_name_you_used_in_step_1>`, like [here](https://github.com/expo/expo/blob/335e67a1a3a91598c02061f3318a881541d0d57a/apps/bare-expo/android/app/src/main/AndroidManifest.xml#L44-L46).\n  3. In the end your `AndroidManifest.xml` should look more or less like this:\n  ```xml\n  <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" ...>\n    ...\n    <application ...>\n      ...\n      <meta-data\n        android:name=\"expo.modules.notifications.default_notification_icon\"\n        android:resource=\"@drawable/ic_stat_notifications\" /> <!-- @drawable/<insert_notification_icon_name> -->\n      ...\n    </application>\n  </manifest>\n  ```\n- **To customize the default color of the notification**:\n  1. you will need a color resource added to the native project's resources. Some information on how to do this can be found in [the official Android guide](https://developer.android.com/guide/topics/resources/more-resources#Color). The most simple and fail-safe instructions would be to:\n      1. ensure that there is a file under `android/app/src/main/res/values/colors.xml` (if there is none, create it)\n      2. ensure that it's a valid resources XML file (it should start with a `<?xml version=\"1.0\" encoding=\"utf-8\"?>` declaration and have a root node of `<resources>`)\n      3. inside the `<resources>` node add a `<color>` node with an arbitrary name (like `notification_icon_color`) containing the color in HEX format inside, like [here](https://github.com/expo/expo/blob/335e67a1a3a91598c02061f3318a881541d0d57a/apps/bare-expo/android/app/src/main/res/values/colors.xml#L3).\n      4. in the end your `colors.xml` should look more or less like this:\n          ```java\n          <?xml version=\"1.0\" encoding=\"utf-8\"?>\n          <resources>\n            <color name=\"notification_icon_color\">#4630EB</color>\n          </resources>\n          ```\n  2. now, when the color is added to the project, we need to configure `expo-notifications` to use it when it displays a notification — head over to `android/app/src/main/AndroidManifest.xml` and add a `<meta-data>` tag of `android:name=\"expo.modules.notifications.default_notification_color\"` inside the `<application>` node referencing the custom icon with `@color/<notification_icon_color_name>`, like [here](https://github.com/expo/expo/blob/335e67a1a3a91598c02061f3318a881541d0d57a/apps/bare-expo/android/app/src/main/AndroidManifest.xml#L47-L49).\n  3. In the end your `AndroidManifest.xml` should look more or less like this:\n  ```xml\n  <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" ...>\n    ...\n    <application ...>\n      ...\n      <meta-data\n        android:name=\"expo.modules.notifications.default_notification_color\"\n        android:resource=\"@color/notification_icon_color\" /> <!-- @color/<insert_notification_icon_color_name> -->\n      ...\n    </application>\n  </manifest>\n  ```\n- An `AndroidManifest.xml` with both color (of name `notification_icon_color`) and an icon (of name `ic_stat_notifications`) name would look like this:\n  ```xml\n  <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" ...>\n    <application ...>\n      ...\n      <meta-data\n        android:name=\"expo.modules.notifications.default_notification_icon\"\n        android:resource=\"@drawable/ic_stat_notifications\" />\n      <meta-data\n        android:name=\"expo.modules.notifications.default_notification_color\"\n        android:resource=\"@color/notification_icon_color\" />\n      ...\n    </application>\n  </manifest>\n  ```\n\n### Add your project's credentials to Expo server (optional)\n\nIf you would like to send notifications with Expo servers, the servers will need to have a way to authenticate with APNS/FCM that they are authorized to send notifications on your behalf. To do this:\n\n- for Firebase Cloud Messaging, check out this guide: _[Uploading Server Credentials](https://docs.expo.io/guides/using-fcm/#uploading-server-credentials)_,\n- for APNS:\n  - run `expo credentials:manager` in the root of your application,\n  - if you've already uploaded a Push Notifications Key in another project and would like to reuse it in the current project, select _Use existing Push Notifications Key in current project_ (you may need to set `slug` and `ios.bundleIdentifier` fields in `app.json` so that the server knows to which `experienceId` and `bundleIdentifier` the key should be attributed),\n  - if you've never uploaded a Push Notifications Key or would like to add a new one\n    - select _Add new Push Notifications Key_\n    - if you'd like to let Expo handle the process, select _Let Expo handle the process_\n    - if you can't let Expo handle the process or you want to upload your own key, select _I want to upload my own file_\n      - provide a path to the P8 file you have downloaded from [developer.apple.com](https://developer.apple.com/) website.\n\n# Contributing\n\nContributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).\n\n---\n\n# API\n\nThe following methods are exported by the `expo-notifications` module:\n\n- **fetching token for sending push notifications**\n  - [`getExpoPushTokenAsync`](#getexpopushtokenasyncoptions-expotokenoptions-expopushtoken) -- resolves with an Expo push token\n  - [`getDevicePushTokenAsync`](#getdevicepushtokenasync-devicepushtoken) -- resolves with a device push token\n  - [`addPushTokenListener`](#addpushtokenlistenerlistener-pushtokenlistener-subscription) -- adds a listener called when a new push token is issued\n  - [`removePushTokenSubscription`](#removepushtokensubscriptionsubscription-subscription-void) -- removes the listener registered with `addPushTokenListener`\n  - [`removeAllPushTokenListeners`](#removeallpushtokenlisteners-void) -- removes all listeners registered with `addPushTokenListener`\n- **listening to notification events**\n  - [`addNotificationReceivedListener`](#addnotificationreceivedlistenerlistener-event-notification--void-void) -- adds a listener called whenever a new notification is received\n  - [`addNotificationsDroppedListener`](#addnotificationsdroppedlistenerlistener---void-void) -- adds a listener called whenever some notifications have been dropped\n  - [`addNotificationResponseReceivedListener`](#addnotificationresponsereceivedlistenerlistener-event-notificationresponse--void-void) -- adds a listener called whenever user interacts with a notification\n  - [`removeNotificationSubscription`](#removenotificationsubscriptionsubscription-subscription-void) -- removes the listener registered with `addNotification*Listener()`\n  - [`removeAllNotificationListeners`](#removeallnotificationlisteners-void) -- removes all listeners registered with `addNotification*Listener()`\n- **handling incoming notifications when the app is in foreground**\n  - [`setNotificationHandler`](#setnotificationhandlerhandler-notificationhandler--null-void) -- sets the handler function responsible for deciding what to do with a notification that is received when the app is in foreground\n- **fetching permissions information**\n  - [`getPermissionsAsync`](#getpermissionsasync-promisenotificationpermissionsstatus) -- fetches current permission settings related to notifications\n  - [`requestPermissionsAsync`](#requestpermissionsasyncrequest-notificationpermissionsrequest-promisenotificationpermissionsstatus) -- requests permissions related to notifications\n- **managing application badge icon**\n  - [`getBadgeCountAsync`](#getbadgecountasync-promisenumber) -- fetches the application badge number value\n  - [`setBadgeCountAsync`](#setbadgecountasyncbadgecount-number-options-setbadgecountoptions-promiseboolean) -- sets the application badge number value\n- **scheduling notifications**\n  - [`getAllScheduledNotificationsAsync`](#getallschedulednotificationsasync-promisenotification) -- fetches information about all scheduled notifications\n  - [`presentNotificationAsync`](#presentnotificationasynccontent-notificationcontentinput-identifier-string-promisestring) -- schedules a notification for immediate trigger\n  - [`scheduleNotificationAsync`](#schedulenotificationasyncnotificationrequest-notificationrequestinput-promisestring) -- schedules a notification to be triggered in the future\n  - [`cancelScheduledNotificationAsync`](#cancelschedulednotificationasyncidentifier-string-promisevoid) -- removes a specific scheduled notification\n  - [`cancelAllScheduledNotificationsAsync`](#cancelallschedulednotificationsasync-promisevoid) -- removes all scheduled notifications\n- **dismissing notifications**\n  - [`getPresentedNotificationsAsync`](#getpresentednotificationsasync-promisenotification) -- fetches information about all notifications present in the notification tray (Notification Center)\n  - [`dismissNotificationAsync`](#dismissnotificationasyncidentifier-string-promisevoid) -- removes a specific notification from the notification tray\n  - [`dismissAllNotificationsAsync`](#dismissallnotificationsasync-promisevoid) -- removes all notifications from the notification tray\n- **managing notification channels (Android-specific)**\n  - [`getNotificationChannelsAsync`](#getnotificationchannelsasync-promisenotificationchannel) -- fetches information about all known notification channels\n  - [`getNotificationChannelAsync`](#getnotificationchannelasyncidentifier-string-promisenotificationchannel--null) -- fetches information about a specific notification channel\n  - [`setNotificationChannelAsync`](#setnotificationchannelasyncidentifier-string-channel-notificationchannelinput-promisenotificationchannel--null) -- saves a notification channel configuration\n  - [`deleteNotificationChannelAsync`](#deletenotificationchannelasyncidentifier-string-promisevoid) -- deletes a notification channel\n  - [`getNotificationChannelGroupsAsync`](#getnotificationchannelgroupsasync-promisenotificationchannelgroup) -- fetches information about all known notification channel groups\n  - [`getNotificationChannelGroupAsync`](#getnotificationchannelgroupasyncidentifier-string-promisenotificationchannelgroup--null) -- fetches information about a specific notification channel group\n  - [`setNotificationChannelGroupAsync`](#setnotificationchannelgroupasyncidentifier-string-channel-notificationchannelgroupinput-promisenotificationchannelgroup--null) -- saves a notification channel group configuration\n  - [`deleteNotificationChannelGroupAsync`](#deletenotificationchannelgroupasyncidentifier-string-promisevoid) -- deletes a notification channel group\n\n## Android push notification payload specification\n\nWhen sending a push notification, put an object conforming to the following type as `data` of the notification:\n\n```ts\nexport interface FirebaseData {\n  title?: string;\n  message?: string;\n  subtitle?: string;\n  sound?: boolean | string;\n  vibrate?: boolean | number[];\n  priority?: AndroidNotificationPriority;\n  badge?: number;\n}\n```\n\n## Fetching tokens for push notifications\n\n### `getExpoPushTokenAsync(options: ExpoTokenOptions): ExpoPushToken`\n\nReturns an Expo token that can be used to send a push notification to this device using Expo push notifications service. [Read more in the Push Notifications guide](https://docs.expo.io/guides/push-notifications/).\n\n> **Note:** For Expo backend to be able to send notifications to your app, you will need to provide it with push notification keys. This can be done using `expo-cli` (`expo credentials:manager`). [Read more in the “Upload notifications credentials” guide](https://expo.fyi/upload-notifications-credentials). TODO\n\n#### Arguments\n\nThis function accepts an optional object allowing you to pass in configuration, consisting of fields (all are optional, but some may have to be defined if configuration cannot be inferred):\n\n- **experienceId (_string_)** -- The ID of the experience to which the token should be attributed. Defaults to [`Constants.manifest.id`](https://docs.expo.io/versions/latest/sdk/constants/#constantsmanifest) exposed by `expo-constants`. You may need to define it in bare workflow, where `expo-constants` doesn't expose the manifest.\n- **devicePushToken ([_DevicePushToken_](#devicepushtoken))** -- The device push token with which to register at the backend. Defaults to a token fetched with [`getDevicePushTokenAsync()`](#getdevicepushtokenasync-devicepushtoken).\n- **applicationId (_string_)** -- The ID of the application to which the token should be attributed. Defaults to [`Application.applicationId`](https://docs.expo.io/versions/latest/sdk/application/#applicationapplicationid) exposed by `expo-application`.\n- **development (_boolean_)** -- Makes sense only on iOS, where there are two push notification services: sandbox and production. This defines whether the push token is supposed to be used with the sandbox platform notification service. Defaults to [`Application.getIosPushNotificationServiceEnvironmentAsync()`](https://docs.expo.io/versions/latest/sdk/application/#applicationgetiospushnotificationserviceenvironmentasync) exposed by `expo-application` or `false`. Most probably you won't need to customize that. You may want to customize that if you don't want to install `expo-application` and still use the sandbox APNS.\n\n#### Returns\n\nReturns a `Promise` that resolves to an object with the following fields:\n\n- **type (_string_)** -- Always `expo`.\n- **data (_string_)** -- The push token as a string.\n\n#### Examples\n\n##### Fetching the Expo push token and uploading it to a server\n\n```ts\nimport Constants from 'expo-constants';\nimport * as Notifications from 'expo-notifications';\n\nexport async function registerForPushNotificationsAsync(userId: string) {\n  let experienceId = undefined;\n  if (!Constants.manifest) {\n    // Absence of the manifest means we're in bare workflow\n    experienceId = '@username/example';\n  }\n  const expoPushToken = await Notifications.getExpoPushTokenAsync({\n    experienceId,\n  });\n  await fetch('https://example.com/', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n    },\n    body: JSON.stringify({\n      userId,\n      expoPushToken,\n    }),\n  });\n}\n```\n\n### `getDevicePushTokenAsync(): DevicePushToken`\n\nReturns a native APNS, FCM token or a [`PushSubscription` data](https://developer.mozilla.org/en-US/docs/Web/API/PushSubscription) that can be used with another push notification service.\n\n#### Returns\n\nA `Promise` that resolves to an object with the following fields:\n\n- **type (_string_)** -- Either `ios`, `android` or `web`.\n- **data (_string_ or _object_)** -- Either the push token as a string (for `type == \"ios\" | \"android\"`) or an object conforming to the type below (for `type == \"web\"`):\n  ```ts\n  {\n    endpoint: string;\n    keys: {\n      p256dh: string;\n      auth: string;\n    }\n  }\n  ```\n\n### `addPushTokenListener(listener: PushTokenListener): Subscription`\n\nIn rare situations a push token may be changed by the push notification service while the app is running. When a token is rolled, the old one becomes invalid and sending notifications to it will fail. A push token listener will let you handle this situation gracefully by registering the new token with your backend right away.\n\n#### Arguments\n\nA single and required argument is a function accepting a push token as an argument. It will be called whenever the push token changes.\n\n#### Returns\n\nA [`Subscription`](#subscription) object representing the subscription of the provided listener.\n\n#### Examples\n\nRegistering a push token listener using a React hook\n\n```tsx\nimport React from 'react';\nimport * as Notifications from 'expo-notifications';\n\nimport { registerDevicePushTokenAsync } from '../api';\n\nexport default function App() {\n  React.useEffect(() => {\n    const subscription = Notifications.addPushTokenListener(registerDevicePushTokenAsync);\n    return () => subscription.remove();\n  }, []);\n\n  return (\n    // Your app content\n  );\n}\n```\n\n### `removePushTokenSubscription(subscription: Subscription): void`\n\nRemoves a push token subscription returned by a `addPushTokenListener` call.\n\n#### Arguments\n\nA single and required argument is a subscription returned by `addPushTokenListener`.\n\n### `removeAllPushTokenListeners(): void`\n\nRemoves all push token subscriptions that may have been registered with `addPushTokenListener`.\n\n## Listening to notification events\n\n### `addNotificationReceivedListener(listener: (event: Notification) => void): void`\n\nListeners registered by this method will be called whenever a notification is received while the app is running.\n\n#### Arguments\n\nA single and required argument is a function accepting a notification ([`Notification`](#notification)) as an argument.\n\n#### Returns\n\nA [`Subscription`](#subscription) object representing the subscription of the provided listener.\n\n#### Examples\n\nRegistering a notification listener using a React hook\n\n```tsx\nimport React from 'react';\nimport * as Notifications from 'expo-notifications';\n\nexport default function App() {\n  React.useEffect(() => {\n    const subscription = Notifications.addNotificationReceivedListener(notification => {\n      console.log(notification);\n    });\n    return () => subscription.remove();\n  }, []);\n\n  return (\n    // Your app content\n  );\n}\n```\n\n### `addNotificationsDroppedListener(listener: () => void): void`\n\nListeners registered by this method will be called whenever some notifications have been dropped by the server. Applicable only to Firebase Cloud Messaging which we use as notifications service on Android. It corresponds to `onDeletedMessages()` callback. [More information can be found in Firebase docs](https://firebase.google.com/docs/cloud-messaging/android/receive#override-ondeletedmessages).\n\n#### Arguments\n\nA single and required argument is a function–callback.\n\n#### Returns\n\nA [`Subscription`](#subscription) object representing the subscription of the provided listener.\n\n### `addNotificationResponseReceivedListener(listener: (event: NotificationResponse) => void): void`\n\nListeners registered by this method will be called whenever a user interacts with a notification (eg. taps on it).\n\n#### Arguments\n\nA single and required argument is a function accepting notification response ([`NotificationResponse`](#notificationresponse)) as an argument.\n\n#### Returns\n\nA [`Subscription`](#subscription) object representing the subscription of the provided listener.\n\n#### Examples\n\nRegistering a notification listener using a React hook\n\n```tsx\nimport React from 'react';\nimport { Linking } from 'react-native';\nimport * as Notifications from 'expo-notifications';\n\nexport default function Container({ navigation }) {\n  React.useEffect(() => {\n    const subscription = Notifications.addNotificationResponseReceivedListener(response => {\n      const url = response.notification.request.content.data.url;\n      Linking.openUrl(url);\n    });\n    return () => subscription.remove();\n  }, [navigation]);\n\n  return (\n    // Your app content\n  );\n}\n```\n\n### `removeNotificationSubscription(subscription: Subscription): void`\n\nRemoves a notification subscription returned by a `addNotification*Listener` call.\n\n#### Arguments\n\nA single and required argument is a subscription returned by `addNotification*Listener`.\n\n### `removeAllNotificationListeners(): void`\n\nRemoves all notification subscriptions that may have been registered with `addNotification*Listener`.\n\n## Handling incoming notifications when the app is in foreground\n\n### `setNotificationHandler(handler: NotificationHandler | null): void`\n\nWhen a notification is received while the app is running, using this function you can set a callback that will decide whether the notification should be shown to the user or not.\n\nWhen a notification is received, `handleNotification` is called with the incoming notification as an argument. The function should respond with a behavior object within 3 seconds, otherwise the notification will be discarded. If the notification is handled successfully, `handleSuccess` is called with the identifier of the notification, otherwise (or on timeout) `handleError` will be called.\n\nThe default behavior when the handler is not set or does not respond in time is not to show the notification.\n\n#### Arguments\n\nThe function receives a single argument which should be either `null` (if you want to clear the handler) or an object of fields:\n\n- **handleNotification (_(Notification) => Promise<NotificationBehavior>_**) -- (required) a function accepting an incoming notification returning a `Promise` resolving to a behavior ([`NotificationBehavior`](#notificationbehavior)) applicable to the notification\n- **handleSuccess (_(notificationId: string) => void_)** -- (optional) a function called whenever an incoming notification is handled successfully\n- **handleError (_(error: Error) => void_)** -- (optional) a function called whenever handling of an incoming notification fails\n\n#### Examples\n\nImplementing a notification handler that always shows the notification when it is received\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nNotifications.setNotificationHandler({\n  handleNotification: async () => ({\n    shouldShowAlert: true,\n    shouldPlaySound: false,\n    shouldSetBadge: false,\n  }),\n});\n```\n\n## Fetching information about notifications-related permissions\n\n### `getPermissionsAsync(): Promise<NotificationPermissionsStatus>`\n\nCalling this function checks current permissions settings related to notifications. It lets you verify whether the app is currently allowed to display alerts, play sounds, etc. There is no user-facing effect of calling this.\n\n#### Returns\n\nIt returns a `Promise` resolving to an object representing permission settings (`NotificationPermissionsStatus`).\n\n#### Examples\n\nCheck if the app is allowed to send any type of notifications (interrupting and non-interrupting–provisional on iOS)\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nexport async function allowsNotificationsAsync() {\n  const settings = await Notifications.getPermissionsAsync();\n  return (\n    settings.granted || settings.ios?.status === Notifications.IosAuthorizationStatus.PROVISIONAL\n  );\n}\n```\n\n### `requestPermissionsAsync(request?: NotificationPermissionsRequest): Promise<NotificationPermissionsStatus>`\n\nPrompts the user for notification permissions according to request. Request defaults to asking the user to allow displaying alerts, setting badge count and playing sounds.\n\n#### Arguments\n\nAn optional object of conforming to the following interface:\n\n```ts\n{\n  android?: {};\n  ios?: {\n    allowAlert?: boolean;\n    allowBadge?: boolean;\n    allowSound?: boolean;\n    allowDisplayInCarPlay?: boolean;\n    allowCriticalAlerts?: boolean;\n    provideAppNotificationSettings?: boolean;\n    allowProvisional?: boolean;\n    allowAnnouncements?: boolean;\n  }\n}\n```\n\nEach option corresponds to a different native platform authorization option (a list of iOS options is available [here](https://developer.apple.com/documentation/usernotifications/unauthorizationoptions), on Android all available permissions are granted by default and if a user declines any permission an app can't prompt the user to change).\n\n#### Returns\n\nIt returns a `Promise` resolving to an object representing permission settings (`NotificationPermissionsStatus`).\n\n#### Examples\n\nPrompts the user to allow the app to show alerts, play sounds, set badge count and let Siri read out messages through AirPods\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nexport function requestPermissionsAsync() {\n  return await Notifications.requestPermissionsAsync({\n    ios: {\n      allowAlert: true,\n      allowBadge: true,\n      allowSound: true,\n      allowAnnouncements: true,\n    },\n  });\n}\n```\n\n## Managing application badge icon\n\n### `getBadgeCountAsync(): Promise<number>`\n\nFetches the number currently set as the badge of the app icon on device's home screen. A `0` value means that the badge is not displayed.\n\n> **Note:** Not all Android launchers support application badges. If the launcher does not support icon badges, the method will always resolve to `0`.\n\n#### Returns\n\nIt returns a `Promise` resolving to a number representing current badge of the app icon.\n\n### `setBadgeCountAsync(badgeCount: number, options?: SetBadgeCountOptions): Promise<boolean>`\n\nSets the badge of the app's icon to the specified number. Setting to `0` clears the badge.\n\n> **Note:** Not all Android launchers support application badges. If the launcher does not support icon badges, the method will resolve to `false`.\n\n#### Arguments\n\nThe function accepts a number as the first argument. A value of `0` will clear the badge.\n\nAs a second, optional argument you can pass in an object of options configuring behavior applied in Web environment. The object should be of format:\n\n```ts\n{\n  web?: badgin.Options\n}\n```\n\nwhere the type `badgin.Options` is an object described [in the `badgin`'s documentation](https://github.com/jaulz/badgin#options).\n\n#### Returns\n\nIt returns a `Promise` resolving to a boolean representing whether setting of the badge succeeded.\n\n## Scheduling notifications\n\n### `getAllScheduledNotificationsAsync(): Promise<Notification[]>`\n\nFetches information about all scheduled notifications.\n\n#### Returns\n\nIt returns a `Promise` resolving to an array of objects conforming to the [`Notification`](#notification) interface.\n\n### `presentNotificationAsync(content: NotificationContentInput, identifier?: string): Promise<string>`\n\nSchedules a notification for immediate trigger.\n\n> **Note:** This method has been deprecated in favor of using an explicit `NotificationHandler` and the `scheduleNotificationAsync` method. More info may be found at https://expo.fyi/presenting-notifications-deprecated.\n\n#### Arguments\n\nThe only argument to this function is a [`NotificationContentInput`](#notificationcontentinput).\n\n#### Returns\n\nIt returns a `Promise` resolving with the notification's identifier once the notification is successfully scheduled for immediate display.\n\n#### Examples\n\n##### Presenting the notification to the user (deprecated way)\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nNotifications.presentNotificationAsync({\n  title: 'Look at that notification',\n  body: \"I'm so proud of myself!\",\n});\n```\n\n##### Presenting the notification to the user (recommended way)\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\n// First, set the handler that will cause the notification\n// to show the alert\n\nNotifications.setNotificationHandler({\n  handleNotification: async () => ({\n    shouldShowAlert: true,\n    shouldPlaySound: false,\n    shouldSetBadge: false,\n  }),\n});\n\n// Second, call the method\n\nNotifications.scheduleNotificationAsync({\n  content: {\n    title: 'Look at that notification',\n    body: \"I'm so proud of myself!\",\n  },\n  trigger: null,\n});\n```\n\n### `scheduleNotificationAsync(notificationRequest: NotificationRequestInput): Promise<string>`\n\nSchedules a notification to be triggered in the future.\n\n> **Note:** Please note that this does not mean that the notification will be presented when it is triggereed. For the notification to be presented you have to set a notification handler with [`setNotificationHandler`](#setnotificationhandlerhandler-notificationhandler--null-void) that will return an appropriate notification behavior. For more information see the example below.\n\n#### Arguments\n\nThe one and only argument to this method is a [`NotificationRequestInput`](#notificationrequestinput) describing the notification to be triggered.\n\n#### Returns\n\nIt returns a `Promise` resolving to a string --- a notification identifier you can later use to cancel the notification or to identify an incoming notification.\n\n#### Examples\n\n##### Scheduling the notification that will trigger once, in one minute from now\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nNotifications.scheduleNotificationAsync({\n  content: {\n    title: \"Time's up!\",\n    body: 'Change sides!',\n  },\n  trigger: {\n    seconds: 60,\n  },\n});\n```\n\n##### Scheduling the notification that will trigger repeatedly, every 20 minutes\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nNotifications.scheduleNotificationAsync({\n  content: {\n    title: 'Remember to drink water!,\n  },\n  trigger: {\n    seconds: 60 * 20,\n    repeats: true\n  },\n});\n```\n\n##### Scheduling the notification that will trigger once, at the beginning of next hour\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nconst trigger = new Date(Date.now() + 60 * 60 * 1000);\ntrigger.setMinutes(0);\ntrigger.setSeconds(0);\n\nNotifications.scheduleNotificationAsync({\n  content: {\n    title: 'Happy new hour!',\n  },\n  trigger,\n});\n```\n\n### `cancelScheduledNotificationAsync(identifier: string): Promise<void>`\n\nCancels a single scheduled notification. The scheduled notification of given ID will not trigger.\n\n#### Arguments\n\nThe notification identifier with which `scheduleNotificationAsync` resolved when the notification has been scheduled.\n\n#### Returns\n\nA `Promise` resolving once the scheduled notification is successfully cancelled or if there is no scheduled notification for given identifier.\n\n#### Examples\n\n##### Scheduling and then canceling the notification\n\n```ts\nimport * as Notifications from 'expo-notifications';\n\nasync function scheduleAndCancel() {\n  const identifier = await Notifications.scheduleNotificationAsync({\n    content: {\n      title: 'Hey!',\n    },\n    trigger: { seconds: 5, repeats: true }\n  });\n  await Notifications.cancelScheduledNotificationAsync(identifier);\n}\n```\n\n### `cancelAllScheduledNotificationsAsync(): Promise<void>`\n\nCancels all scheduled notifications.\n\n#### Returns\n\nA `Promise` resolving once all the scheduled notifications are successfully cancelled or if there are no scheduled notifications.\n\n## Dismissing notifications\n\n### `getPresentedNotificationsAsync(): Promise<Notification[]>`\n\nFetches information about all notifications present in the notification tray (Notification Center).\n\n> **Note:** This method is not supported on Android below 6.0 (API level 23) – on these devices it will resolve to an empty array.\n\n#### Returns\n\nA `Promise` resolving with a list of notifications ([`Notification`](#notification)) currently present in the notification tray (Notification Center).\n\n### `dismissNotificationAsync(identifier: string): Promise<void>`\n\nRemoves notification displayed in the notification tray (Notification Center).\n\n#### Arguments\n\nThe first and only argument to the function is the notification identifier, obtained either in `setNotificationHandler` or in the listener added with `addNotificationReceivedListener`.\n\n#### Returns\n\nResolves once the request to dismiss the notification is successfully dispatched to the notifications manager.\n\n### `dismissAllNotificationsAsync(): Promise<void>`\n\nRemoves all application's notifications displayed in the notification tray (Notification Center).\n\n#### Returns\n\nResolves once the request to dismiss the notifications is successfully dispatched to the notifications manager.\n\n## Managing notification channels (Android-specific)\n\n> Starting in Android 8.0 (API level 26), all notifications must be assigned to a channel. For each channel, you can set the visual and auditory behavior that is applied to all notifications in that channel. Then, users can change these settings and decide which notification channels from your app should be intrusive or visible at all. [(source: developer.android.com)](https://developer.android.com/training/notify-user/channels)\n\nIf you do not specify a notification channel, `expo-notifications` will create a fallback channel for you, named _Miscellaneous_. We encourage you to always ensure appropriate channels with informative names are set up for the application and to always send notifications to these channels.\n\nCalling these methods is a no-op for platforms that do not support this feature (iOS, Web and Android below version 8.0 (26)).\n\n### `getNotificationChannelsAsync(): Promise<NotificationChannel[]>`\n\nFetches information about all known notification channels.\n\n#### Returns\n\nA `Promise` resolving to an array of channels. On platforms that do not support notification channels, it will always resolve to an empty array.\n\n### `getNotificationChannelAsync(identifier: string): Promise<NotificationChannel | null>`\n\nFetches information about a single notification channel.\n\n#### Arguments\n\nThe only argument to this method is the channel's identifier.\n\n#### Returns\n\nA `Promise` resolving to the channel object (of type [`NotificationChannel`](#notificationchannel)) or to `null` if there was no channel found for this identifier. On platforms that do not support notification channels, it will always resolve to `null`.\n\n### `setNotificationChannelAsync(identifier: string, channel: NotificationChannelInput): Promise<NotificationChannel | null>`\n\nAssigns the channel configuration to a channel of a specified name (creating it if need be). This method lets you assign given notification channel to a notification channel group.\n\n#### Arguments\n\nFirst argument to the method is the channel identifier.\n\nSecond argument is the channel's configuration of type [`NotificationChannelInput`](#notificationchannelinput)\n\n#### Returns\n\nA `Promise` resolving to the object (of type [`NotificationChannel`](#notificationchannel)) describing the modified channel or to `null` if the platform does not support notification channels.\n\n### `deleteNotificationChannelAsync(identifier: string): Promise<void>`\n\nRemoves the notification channel.\n\n#### Arguments\n\nFirst and only argument to the method is the channel identifier.\n\n#### Returns\n\nA `Promise` resolving once the channel is removed (or if there was no channel for given identifier).\n\n### `getNotificationChannelGroupsAsync(): Promise<NotificationChannelGroup[]>`\n\nFetches information about all known notification channel groups.\n\n#### Returns\n\nA `Promise` resolving to an array of channel groups. On platforms that do not support notification channel groups, it will always resolve to an empty array.\n\n### `getNotificationChannelGroupAsync(identifier: string): Promise<NotificationChannelGroup | null>`\n\nFetches information about a single notification channel group.\n\n#### Arguments\n\nThe only argument to this method is the channel group's identifier.\n\n#### Returns\n\nA `Promise` resolving to the channel group object (of type [`NotificationChannelGroup`](#notificationchannelgroup)) or to `null` if there was no channel group found for this identifier. On platforms that do not support notification channels, it will always resolve to `null`.\n\n### `setNotificationChannelGroupAsync(identifier: string, channel: NotificationChannelGroupInput): Promise<NotificationChannelGroup | null>`\n\nAssigns the channel group configuration to a channel group of a specified name (creating it if need be).\n\n#### Arguments\n\nFirst argument to the method is the channel group identifier.\n\nSecond argument is the channel group's configuration of type [`NotificationChannelGroupInput`](#notificationchannelgroupinput)\n\n#### Returns\n\nA `Promise` resolving to the object (of type [`NotificationChannelGroup`](#notificationchannelgroup)) describing the modified channel group or to `null` if the platform does not support notification channels.\n\n### `deleteNotificationChannelGroupAsync(identifier: string): Promise<void>`\n\nRemoves the notification channel group and all notification channels that belong to it.\n\n#### Arguments\n\nFirst and only argument to the method is the channel group identifier.\n\n#### Returns\n\nA `Promise` resolving once the channel group is removed (or if there was no channel group for given identifier).\n\n## Types\n\n### `DevicePushToken`\n\nIn simple terms, an object of `type: Platform.OS` and `data: any`. The `data` type depends on the environment -- on a native device it will be a string, which you can then use to send notifications via Firebase Cloud Messaging (Android) or APNS (iOS); on web it will be a registration object (VAPID).\n\n```ts\nexport interface NativeDevicePushToken {\n  type: 'ios' | 'android';\n  data: string;\n}\n\nexport interface WebDevicePushToken {\n  type: 'web';\n  data: {\n    endpoint: string;\n    keys: {\n      p256dh: string;\n      auth: string;\n    };\n  };\n}\n\nexport type DevicePushToken = NativeDevicePushToken | WebDevicePushToken;\n```\n\n### `PushTokenListener`\n\nA function accepting a device push token ([`DevicePushToken`](#devicepushtoken)) as an argument.\n\n> **Note:** You should not call `getDevicePushTokenAsync` inside this function, as it triggers the listener and may lead to an infinite loop.\n\n### `ExpoPushToken`\n\nBorrowing from `DevicePushToken` a little bit, it's an object of `type: 'expo'` and `data: string`. You can use the `data` value to send notifications via Expo Notifications service.\n\n```ts\nexport interface ExpoPushToken {\n  type: 'expo';\n  data: string;\n}\n```\n\n### `Subscription`\n\nA common-in-React-Native type to abstract an active subscription. Call `.remove()` to remove the subscription. You can then discard the object.\n\n```ts\nexport type Subscription = {\n  remove: () => void;\n};\n```\n\n### `Notification`\n\nAn object representing a single notification that has been triggered by some request ([`NotificationRequest`](#notificationrequest)) at some point in time.\n\n```ts\nexport interface Notification {\n  date: number;\n  request: NotificationRequest;\n}\n```\n\n### `NotificationRequest`\n\nAn object representing a request to present a notification. It has content — how it's being represented — and a trigger — what triggers the notification. Many notifications ([`Notification`](#notification)) may be triggered with the same request (eg. a repeating notification).\n\n```ts\nexport interface NotificationRequest {\n  identifier: string;\n  content: NotificationContent;\n  trigger: NotificationTrigger;\n}\n```\n\n### `NotificationContent`\n\nAn object representing notification's content.\n\n```ts\nexport type NotificationContent = {\n  // Notification title - the bold text displayed above the rest of the content\n  title: string | null;\n  // On iOS - subtitle - the bold text displayed between title and the rest of the content\n  // On Android - subText - the display depends on the platform\n  subtitle: string | null;\n  // Notification body - the main content of the notification\n  body: string | null;\n  // Data associated with the notification, not displayed\n  data: { [key: string]: unknown };\n  // Application badge number associated with the notification\n  badge: number | null;\n  sound: 'default' | 'defaultCritical' | 'custom' | null;\n} & (\n  | {\n      // iOS-specific additions\n      // See https://developer.apple.com/documentation/usernotifications/unnotificationcontent?language=objc\n      // for more information on specific fields.\n      launchImageName: string | null;\n      attachments: {\n        identifier: string | null;\n        url: string | null;\n        type: string | null;\n      }[];\n      summaryArgument?: string | null;\n      summaryArgumentCount?: number;\n      categoryIdentifier: string | null;\n      threadIdentifier: string | null;\n      targetContentIdentifier?: string;\n    }\n  | {\n      // Android-specific additions\n      // See https://developer.android.com/reference/android/app/Notification.html#fields\n      // for more information on specific fields.\n      priority?: AndroidNotificationPriority;\n      vibrationPattern?: number[];\n      // Format: '#AARRGGBB'\n      color?: string;\n    }\n);\n```\n\n### `NotificationContentInput`\n\nAn object representing notification content that you pass in to `presentNotificationAsync` or as a part of `NotificationRequestInput`.\n\n```ts\nexport interface NotificationContentInput {\n  // Fields corresponding to NotificationContent\n  title?: string;\n  subtitle?: string;\n  body?: string;\n  data?: { [key: string]: unknown };\n  badge?: number;\n  sound?: boolean | string;\n  // Android-specific fields\n  // See https://developer.android.com/reference/android/app/Notification.html#fields\n  // for more information on specific fields.\n  vibrate?: boolean | number[];\n  priority?: AndroidNotificationPriority;\n  // Format: '#AARRGGBB', '#RRGGBB' or one of the named colors,\n  // see https://developer.android.com/reference/kotlin/android/graphics/Color?hl=en\n  color?: string;\n  // If set to false, the notification will not be automatically dismissed when clicked.\n  // The setting used when the value is not provided or is invalid is true (the notification\n  // will be dismissed automatically). Corresponds directly to Android's `setAutoCancel`\n  // behavior. In Firebase terms this property of a notification is called `sticky`.\n  // See:\n  // - https://developer.android.com/reference/android/app/Notification.Builder#setAutoCancel(boolean),\n  // - https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidNotification.FIELDS.sticky\n  autoDismiss?: boolean;\n  // iOS-specific fields\n  // See https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent?language=objc\n  // for more information on specific fields.\n  launchImageName?: string;\n  attachments?: {\n    url: string;\n    identifier?: string;\n\n    typeHint?: string;\n    hideThumbnail?: boolean;\n    thumbnailClipArea?: { x: number; y: number; width: number; height: number };\n    thumbnailTime?: number;\n  }[];\n}\n```\n\n### `NotificationRequestInput`\n\nAn object representing a notification request you can pass into `scheduleNotificationAsync`.\n\n```ts\nexport interface NotificationRequestInput {\n  identifier?: string;\n  content: NotificationContentInput;\n  trigger: NotificationTriggerInput;\n}\n```\n\n### `AndroidNotificationPriority`\n\nAn enum corresponding to values appropriate for Android's [`Notification#priority`](https://developer.android.com/reference/android/app/Notification#priority) field.\n\n```ts\nexport enum AndroidNotificationPriority {\n  MIN = 'min',\n  LOW = 'low',\n  DEFAULT = 'default',\n  HIGH = 'high',\n  MAX = 'max',\n}\n```\n\n### `NotificationTrigger`\n\nA union type containing different triggers which may cause the notification to be delivered to the application.\n\n```ts\nexport type NotificationTrigger =\n  | PushNotificationTrigger\n  | CalendarNotificationTrigger\n  | LocationNotificationTrigger\n  | TimeIntervalNotificationTrigger\n  | DailyNotificationTrigger\n  | UnknownNotificationTrigger;\n```\n\n### `PushNotificationTrigger`\n\nAn object representing a notification delivered by a push notification system.\n\nOn Android under `remoteMessage` field a JS version of the Firebase `RemoteMessage` may be accessed.\n\n```ts\nexport interface PushNotificationTrigger {\n  type: 'push';\n  remoteMessage?: FirebaseRemoteMessage;\n}\n```\n\n### `FirebaseRemoteMessage`\n\nA Firebase `RemoteMessage` that caused the notification to be delivered to the app.\n\n```ts\nexport interface FirebaseRemoteMessage {\n  collapseKey: string | null;\n  data: { [key: string]: string };\n  from: string | null;\n  messageId: string | null;\n  messageType: string | null;\n  originalPriority: number;\n  priority: number;\n  sentTime: number;\n  to: string | null;\n  ttl: number;\n  notification: null | {\n    body: string | null;\n    bodyLocalizationArgs: string[] | null;\n    bodyLocalizationKey: string | null;\n    channelId: string | null;\n    clickAction: string | null;\n    color: string | null;\n    usesDefaultLightSettings: boolean;\n    usesDefaultSound: boolean;\n    usesDefaultVibrateSettings: boolean;\n    eventTime: number | null;\n    icon: string | null;\n    imageUrl: string | null;\n    lightSettings: number[] | null;\n    link: string | null;\n    localOnly: boolean;\n    notificationCount: number | null;\n    notificationPriority: number | null;\n    sound: string | null;\n    sticky: boolean;\n    tag: string | null;\n    ticker: string | null;\n    title: string | null;\n    titleLocalizationArgs: string[] | null;\n    titleLocalizationKey: string | null;\n    vibrateTimings: number[] | null;\n    visibility: number | null;\n  };\n}\n```\n\n### `TimeIntervalNotificationTrigger`\n\nA trigger related to an elapsed time interval. May be repeating (see `repeats` field).\n\n```ts\nexport interface TimeIntervalNotificationTrigger {\n  type: 'timeInterval';\n  repeats: boolean;\n  seconds: number;\n}\n```\n\n### `DailyNotificationTrigger`\n\nA trigger related to a daily notification. This is an Android-only type, the same functionality will be achieved on iOS with a `CalendarNotificationTrigger`.\n\n```ts\nexport interface DailyNotificationTrigger {\n  type: 'daily';\n  hour: number;\n  minute: number;\n}\n```\n\n### `CalendarNotificationTrigger`\n\nA trigger related to a [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc), available only on iOS.\n\n```ts\nexport interface CalendarNotificationTrigger {\n  type: 'calendar';\n  repeats: boolean;\n  dateComponents: {\n    era?: number;\n    year?: number;\n    month?: number;\n    day?: number;\n    hour?: number;\n    minute?: number;\n    second?: number;\n    weekday?: number;\n    weekdayOrdinal?: number;\n    quarter?: number;\n    weekOfMonth?: number;\n    weekOfYear?: number;\n    yearForWeekOfYear?: number;\n    nanosecond?: number;\n    isLeapMonth: boolean;\n    timeZone?: string;\n    calendar?: string;\n  };\n}\n```\n\n### `LocationNotificationTrigger`\n\nA trigger related to a [`UNLocationNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/unlocationnotificationtrigger?language=objc), available only on iOS.\n\n```ts\nexport interface LocationNotificationTrigger {\n  type: 'location';\n  repeats: boolean;\n  region: CircularRegion | BeaconRegion;\n}\n\ninterface Region {\n  type: string;\n  identifier: string;\n  notifyOnEntry: boolean;\n  notifyOnExit: boolean;\n}\n\nexport interface CircularRegion extends Region {\n  type: 'circular';\n  radius: number;\n  center: {\n    latitude: number;\n    longitude: number;\n  };\n}\n\nexport interface BeaconRegion extends Region {\n  type: 'beacon';\n  notifyEntryStateOnDisplay: boolean;\n  major: number | null;\n  minor: number | null;\n  uuid?: string;\n  beaconIdentityConstraint?: {\n    uuid: string;\n    major: number | null;\n    minor: number | null;\n  };\n}\n```\n\n### `UnknownNotificationTrigger`\n\nRepresents a notification trigger that is unknown to `expo-notifications` and that it didn't know how to serialize for JS.\n\n```ts\nexport interface UnknownNotificationTrigger {\n  type: 'unknown';\n}\n```\n\n### `NotificationTriggerInput`\n\nA type representing possible triggers with which you can schedule notifications. A `null` trigger means that the notification should be scheduled for delivery immediately.\n\n```ts\nexport type NotificationTriggerInput =\n  | null\n  | DateTriggerInput\n  | TimeIntervalTriggerInput\n  | DailyTriggerInput\n  | CalendarTriggerInput;\n```\n\n### `DateTriggerInput`\n\nA trigger that will cause the notification to be delivered once at the specified `Date`. If you pass in a `number` it will be interpreted as a UNIX timestamp.\n\n```ts\nexport type DateTriggerInput = Date | number;\n```\n\n### `TimeIntervalTriggerInput`\n\nA trigger that will cause the notification to be delivered once or many times (depends on the `repeats` field) after `seconds` time elapse.\n\n```ts\nexport interface TimeIntervalTriggerInput {\n  repeats?: boolean;\n  seconds: number;\n}\n```\n\n### `DailyTriggerInput`\n\nA trigger that will cause the notification to be delivered once per day.\n\n```ts\nexport interface DailyTriggerInput {\n  hour: number;\n  minute: number;\n  repeats: true;\n}\n```\n\n### `CalendarTriggerInput`\n\nA trigger that will cause the notification to be delivered once or many times when the date components match the specified values. Corresponds to native [`UNCalendarNotificationTrigger`](https://developer.apple.com/documentation/usernotifications/uncalendarnotificationtrigger?language=objc).\n\n> **Note:** This type of trigger is only available on iOS.\n\n```ts\nexport interface CalendarTriggerInput {\n  repeats?: boolean;\n  timezone?: string;\n\n  year?: number;\n  month?: number;\n  weekday?: number;\n  weekOfMonth?: number;\n  weekOfYear?: number;\n  weekdayOrdinal?: number;\n  day?: number;\n\n  hour?: number;\n  minute?: number;\n  second?: number;\n}\n```\n\n### `NotificationResponse`\n\nAn object representing user's interaction with the notification.\n\n> **Note:** If the user taps on a notification `actionIdentifier` will be equal to `Notifications.DEFAULT_ACTION_IDENTIFIER`.\n\n```ts\nexport interface NotificationResponse {\n  notification: Notification;\n  actionIdentifier: string;\n  userText?: string;\n}\n```\n\n### `NotificationBehavior`\n\nAn object representing behavior that should be applied to the incoming notification.\n\n```ts\nexport interface NotificationBehavior {\n  shouldShowAlert: boolean;\n  shouldPlaySound: boolean;\n  shouldSetBadge: boolean;\n  priority?: AndroidNotificationPriority;\n}\n```\n\n### `NotificationChannel`\n\nAn object representing a notification channel (feature available only on Android).\n\n```ts\nexport enum AndroidNotificationVisibility {\n  UNKNOWN,\n  PUBLIC,\n  PRIVATE,\n  SECRET,\n}\n\nexport enum AndroidAudioContentType {\n  UNKNOWN,\n  SPEECH,\n  MUSIC,\n  MOVIE,\n  SONIFICATION,\n}\n\nexport enum AndroidImportance {\n  UNKNOWN,\n  UNSPECIFIED,\n  NONE,\n  MIN,\n  LOW,\n  DEFAULT,\n  HIGH,\n  MAX,\n}\n\nexport enum AndroidAudioUsage {\n  UNKNOWN,\n  MEDIA,\n  VOICE_COMMUNICATION,\n  VOICE_COMMUNICATION_SIGNALLING,\n  ALARM,\n  NOTIFICATION,\n  NOTIFICATION_RINGTONE,\n  NOTIFICATION_COMMUNICATION_REQUEST,\n  NOTIFICATION_COMMUNICATION_INSTANT,\n  NOTIFICATION_COMMUNICATION_DELAYED,\n  NOTIFICATION_EVENT,\n  ASSISTANCE_ACCESSIBILITY,\n  ASSISTANCE_NAVIGATION_GUIDANCE,\n  ASSISTANCE_SONIFICATION,\n  GAME,\n}\n\nexport interface AudioAttributes {\n  usage: AndroidAudioUsage;\n  contentType: AndroidAudioContentType;\n  flags: {\n    enforceAudibility: boolean;\n    requestHardwareAudioVideoSynchronization: boolean;\n  };\n}\n\nexport interface NotificationChannel {\n  id: string;\n  name: string | null;\n  importance: AndroidImportance;\n  bypassDnd: boolean;\n  description: string | null;\n  groupId?: string | null;\n  lightColor: string;\n  lockscreenVisibility: AndroidNotificationVisibility;\n  showBadge: boolean;\n  sound: 'default' | 'custom' | null;\n  audioAttributes: AudioAttributes;\n  vibrationPattern: number[] | null;\n  enableLights: boolean;\n  enableVibrate: boolean;\n}\n```\n\n### `NotificationChannelInput`\n\nAn object representing a notification channel to be set.\n\n```ts\nexport interface NotificationChannelInput {\n  name: string | null;\n  importance: AndroidImportance;\n  // Optional attributes\n  bypassDnd?: boolean;\n  description?: string | null;\n  groupId?: string | null;\n  lightColor?: string;\n  lockscreenVisibility?: AndroidNotificationVisibility;\n  showBadge?: boolean;\n  sound?: string | null;\n  audioAttributes?: Partial<AudioAttributes>;\n  vibrationPattern?: number[] | null;\n  enableLights?: boolean;\n  enableVibrate?: boolean;\n}\n```\n\n### `NotificationChannelGroup`\n\nAn object representing a notification channel group (feature available only on Android).\n\n```ts\nexport interface NotificationChannelGroup {\n  id: string;\n  name: string | null;\n  description?: string | null;\n  isBlocked?: boolean;\n  channels: NotificationChannel[];\n}\n```\n\n### `NotificationChannelGroupInput`\n\nAn object representing a notification channel group to be set.\n\n```ts\nexport interface NotificationChannelGroupInput {\n  name: string | null;\n  description?: string | null;\n}\n```\n","readmeFilename":"README.md"}