Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[notifications][android] Add methods to request schedule exact permission #28830

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

behenate
Copy link
Member

Why

As of Android 14, SCHEDULE_EXACT_ALARM is denied by default.

This permission is needed for scheduleNotificationAsync to work at an exact time. Without this permission, the notification will still trigger, but it the time will be approximate.

ENG-11673

How

Added appropriate methods to the NotificationPermissions module. This permission requires launching an intent for a result.

Unfortunately when user selects allow and then disallows right away android restarts the app after closing the intent. This causes react to crash, because it tries to deliver intent result to non-existing delegate. I'm still looking for a solution for this problem.

The docs still need to be finished

Test Plan

Tested in BareExpo in Android 14

@expo-bot
Copy link
Collaborator

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

I've found some issues in your pull request that should be addressed (click on them for more details) 👇

⚠️ Suggestion: Missing changelog entries


Your changes should be noted in the changelog. Read Updating Changelogs guide and consider adding an appropriate entry to the following changelogs:


Generated by ExpoBot 🤖 against 532d2ba

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label May 14, 2024
@expo-bot
Copy link
Collaborator

The Pull Request introduced fingerprint changes against the base commit: 202f26a

Fingerprint diff
[
  {
    "type": "dir",
    "filePath": "../../packages/expo-notifications/android",
    "reasons": [
      "expoAutolinkingAndroid"
    ],
    "hash": "4f7df154ac3b8ccf29db2fc6f06843d251cc4d78"
  }
]

Generated by PR labeler 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants