In the showNotification function, there could be a new parameter that when provided with a value (this could either be an enable/disable boolean or the name of the sound as a constant), the notification will make a sound effect.
This will be useful for messaging apps that use this library for in-app notifications. For a potential enhancement, it would be great to have a couple of choices for the sound.
Example Implementations:
// Enable default sound
Notifier.showNotification({
title: 'John Doe',
description: 'Hello! Can you help me with notifications?',
duration: 0,
showAnimationDuration: 800,
showEasing: Easing.bounce,
onHidden: () => console.log('Hidden'),
onPress: () => console.log('Press'),
hideOnPress: false,
enableSound: true,
});
// Choose sound
Notifier.showNotification({
title: 'John Doe',
description: 'Hello! Can you help me with notifications?',
duration: 0,
showAnimationDuration: 800,
showEasing: Easing.bounce,
onHidden: () => console.log('Hidden'),
onPress: () => console.log('Press'),
hideOnPress: false,
playSound: SOUND_CHIME,
});
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In the
showNotification
function, there could be a new parameter that when provided with a value (this could either be an enable/disable boolean or the name of the sound as a constant), the notification will make a sound effect.This will be useful for messaging apps that use this library for in-app notifications. For a potential enhancement, it would be great to have a couple of choices for the sound.
Example Implementations: