Skip to content

Conversation

@Arthi-chaud
Copy link
Contributor

Summary

Adding Expo configuration for notification controls on Android

Sources:

Notes

  • First contribution, lmk if the contributed code doesn't comply to norm/coding style
  • The plugin is invoked unconditionally because there is not toggle setting for notifications controls, unlike in v6. It might be relevant to add a boolean in the settings to enable/disable the plugin. I can add do that in this PR if need be.

Motivation

Including this will avoid the user to write the configuration themselves.
(It can be a pain for unexperiences users)

Changes

  • Add Expo config for notification controls
  • Call config function in main plugin

Test plan

  • Test using example app
    • Can't manage to build/run it locally, but I added that same config in my project (link) and it works.

Copy link
Collaborator

@KrzysztofMoch KrzysztofMoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I did miss that one when implementing notificationControls

@KrzysztofMoch KrzysztofMoch merged commit 5b4c692 into TheWidlarzGroup:v7 Nov 2, 2025
1 check passed
@Arthi-chaud Arthi-chaud deleted the v7 branch November 2, 2025 14:06
@jcolicchio
Copy link

I noticed that this plugin has no effect if mainApplication.service is undefined / null; the reference code cited in this PR has an additional line mainApplication.service ??= [] missing from this implementation.

However, this plugin likely should check that the service hasn't already been appended, otherwise the plugin will not be idempotent and will add a new service to the existing manifest every time it's invoked.

Also, the lines adding permissions appear to do nothing in Expo; I believe these permissions are meant to be added to app.json under "android" instead?

@KrzysztofMoch should I open an issue for this apparent bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants