History log of /expo/packages/expo-notifications/src/NotificationPermissionsModule.ts (Results 1 – 10 of 10)
Revision Date Author Comments
# 6da15324 27-Aug-2021 Bartosz Kaszubowski <[email protected]>

[eslint-config] bump dependencies and minimum required lint tools versions (#13858)

Co-authored-by: James Ide <[email protected]>


# 8285c032 13-Aug-2021 Tomasz Sapeta <[email protected]>

Rename unimodules imports to expo-modules-core


# fb3d99c5 24-May-2021 Tomasz Sapeta <[email protected]>

[permissions] Migrate interface to expo-modules-core (#12961)


# a56e4a62 21-Dec-2020 Charlie Cruzan <[email protected]>

Remove usage of `fbjs` from most packages (#11396)

* expo-web-browser

* expo-device

* expo-camera

* expo-notifications

* legacynotification in expo package

* expo-font

* expo-const

Remove usage of `fbjs` from most packages (#11396)

* expo-web-browser

* expo-device

* expo-camera

* expo-notifications

* legacynotification in expo package

* expo-font

* expo-constants

* expo-updates

* expo-sensors

* expo-error-recovery

* expo-gl

* expo-linking

* changelogs

* rebuild expo-device

* add missing space to changelog entries

Co-authored-by: Evan Bacon <[email protected]>

Co-authored-by: Evan Bacon <[email protected]>

show more ...


# 82d54437 22-Sep-2020 Stanisław Chmiela <[email protected]>

[expo-notifications] Fix requestPermissions on Safari (at least) (#10296)

# Why

Part of https://github.com/expo/expo/issues/6895.

# How

Noticed <kbd>Request permissions</kbd> button returns

[expo-notifications] Fix requestPermissions on Safari (at least) (#10296)

# Why

Part of https://github.com/expo/expo/issues/6895.

# How

Noticed <kbd>Request permissions</kbd> button returns `status: undetermined` on Safari even though I granted the permissions. It turned out `Notification.requestPermission` has two signatures: a legacy, deprecated one `requestPermission(callback): void` and a new one `requestPermission(): Promise`. This code should cover both method implementations.

# Test Plan

I have verified that the <kbd>Request permissions</kbd> button works as expected in Safari and Chrome.

show more ...


# ce586fbe 06-Aug-2020 Evan Bacon <[email protected]>

[web][notifications] Add permissions (#9576)

* Add web permissions to notifications module

* Update CHANGELOG.md

* fix lint error

* Update packages/expo-notifications/CHANGELOG.md

Co-aut

[web][notifications] Add permissions (#9576)

* Add web permissions to notifications module

* Update CHANGELOG.md

* fix lint error

* Update packages/expo-notifications/CHANGELOG.md

Co-authored-by: Stanisław Chmiela <[email protected]>

* pr feedback

* Update example

Co-authored-by: Stanisław Chmiela <[email protected]>

show more ...


# db1c4130 19-Jun-2020 Stanisław Chmiela <[email protected]>

[expo-notifications] Add preliminary "support" for Web (#8853)

# Why

Even though we don't support Web in `expo-notifications`, we don't want to be a pain to the users and throw errors just becaus

[expo-notifications] Add preliminary "support" for Web (#8853)

# Why

Even though we don't support Web in `expo-notifications`, we don't want to be a pain to the users and throw errors just because of running the code on Web.

# How

Added simple object fallbacks for missing modules on web so that they are queryable by
```ts
if (!Module.methodAsync) {
throw new Unavailability…
}
```

Swapped `.ts` + `.web.ts` for `.native.ts` + `.ts` (or + `.web.ts` + `.ts` where it made sense, eg. if we would need to use `localStorage` inside the `.ts` file I renamed it to `.web.ts` and added an empty fallback in `.ts`).

# Test Plan

- [x] Ran NCL in `bare-expo` on Web, clicked buttons around, noticed the error is readable and makes sense.
- [x] Ran `expo-notifications` test-suite on both iOS and Web. It seems iOS tests are a little bit flaky, unfortunately (the errors could also happen due to erroring Expo API, HTTP error 504 when fetching push token, but I was able to make all of the tests pass just refreshing).

show more ...


# 7cf8d919 27-Mar-2020 Stanisław Chmiela <[email protected]>

[expo-notifications] Unify types across the API


# d09fc44c 05-Mar-2020 Stanisław Chmiela <[email protected]>

[expo-notifications] Implement notification channel management (#7123)

# Why

We want to let developers create and choose where to send the notification.

# How

Implemented a simple module ma

[expo-notifications] Implement notification channel management (#7123)

# Why

We want to let developers create and choose where to send the notification.

# How

Implemented a simple module managing the channels.

Decisions I had to make:

- I didn't add the Expo channel polyfill – do you think it is necessary? I don't know if any other notifications library would do something like this and if users would benefit from it more than from setting appropriate `sound: true, vibrate: [500, 500]` in the remote push notification payload.
- all the methods resolve on platforms that don't support channels, logging a helpful message with `console.debug`
- all enumerable information is an `enum` in TS, and no conversion is done from TS to native and back again, I can add that if it's needed (is it?)

# Test Plan

Added test cases to `test-suite` — they pass on both a device supporting channels and a device not supporting channels.

show more ...


# 2e19934f 12-Feb-2020 Stanisław Chmiela <[email protected]>

[expo-notifications] Add permissions requesting methods (#6807)

# Why

Part of `expo-notifications` rework. BTW fixes https://github.com/expo/expo/issues/5093.

# How

- on iOS:
- implement

[expo-notifications] Add permissions requesting methods (#6807)

# Why

Part of `expo-notifications` rework. BTW fixes https://github.com/expo/expo/issues/5093.

# How

- on iOS:
- implemented a requester that returns full information on current notification settings
- implemented an exported module capable of getting and asking for notification permissions
- added a method so that developers are able to ask for specific notification permissions
- on Android:
- implemented a native module that returns a response based on `NotificationManagerCompat`
- moreover, it also returns `importance` of notifications
- on web:
- nothing yet, to be researched
- in TS:
- added methods and type definitions for all the new features

# Test Plan

Added a simple test to `test-suite` and manually checked if the values returned match the settings.

show more ...