wumke / react-native-local-notifications

Manageable local notifications for React Native on iOS and Android.
MIT License
84 stars 33 forks source link

custom sound #9

Closed Gys closed 6 years ago

Gys commented 6 years ago

(Future releases: your own custom sounds, name-based!)

Any idea when this future arrives ? ;-) Is it much work for you to implement this ? I want to play a sound file that I created myself.

wumke commented 6 years ago

At the moment I don't have much time, but it is not that much work I think.

If I remember it correctly, the sound files must be converted (and max 30s) and placed in the ios and android project... then it is probably a matter of introducing some conventions and link the right sound.

If you have some time to wait I maybe find some time to implement this feature... but It will not be next week yet.

Gys commented 6 years ago

Would be great ! I can wait two weeks :-)

wumke commented 6 years ago

I've dived back into the native codes, and I will update the code (this week after it has been tested in one of my own projects) so that custom sounds are possible when you include them. Notice that you must convert your custom sounds to CAF for ios. In the first version I will not include checks to check if the given name is available as an asset (So if not set up correctly app could possibly crash or make no sound).

wumke commented 6 years ago

should work now in 1.2.0....