Skip to content

feat: custom notification sound for android#5

Open
rranjan14 wants to merge 8 commits intoevennit:mainfrom
rranjan14:main
Open

feat: custom notification sound for android#5
rranjan14 wants to merge 8 commits intoevennit:mainfrom
rranjan14:main

Conversation

@rranjan14
Copy link
Copy Markdown

@rranjan14 rranjan14 commented Nov 4, 2024

Description:

  • A new function addSoundsToFolder has been added to the plugin/android.ts file to add sound files to the Android resource folders.
  • A new function to link custom sound files for iOS.
  • The addSoundsToFolder function checks if the androidSounds property in the app config is an array of sound files and adds them to the raw folder in the project root.
  • The saveSound function is used to save a sound file to the raw folder.
  • The plugin/types.ts file has been updated to include a new property androidSounds in the NotifeeExpoPluginProps type.
  • The plugin/utils.ts file has been updated to validate the androidSounds property in the app config.

As mentioned here, to use custom sound for notifications, the local file has to be added to raw folder.

To see the changes, this plugin needs to be build again.

@rranjan14
Copy link
Copy Markdown
Author

Hey @kevpug , thanks for this awesome plugin. I have added support for custom sounds in android. Would love to have your inputs on this.

@kevpug
Copy link
Copy Markdown
Contributor

kevpug commented Nov 10, 2024

Hi @rranjan14! I haven't had the time to test it / integrate it yet. Will do next week! It will be a great addition to the plugin thanks to you :D

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants